Skip to content

Commit

Permalink
support new interface types CR8/SR8/KR8/LR8 which are brougnt by SAI …
Browse files Browse the repository at this point in the history
…V.1.10.2 (sonic-net#2268)

- What I did
Support new interface types CR8/SR8/KR8/LR8.

- Why I did it
SAI V.1.10.2 introduced new interface types CR8/SR8/KR8/LR8, they shall be added to interface_type_map and interface_type_map_for_an.

- How I verified it
config from CLI, new interface types can be accepted and correctly passed to SAI.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
  • Loading branch information
keboliu authored May 14, 2022
1 parent 9007040 commit a8fb98d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@ static map<string, sai_port_interface_type_t> interface_type_map =
{ "none", SAI_PORT_INTERFACE_TYPE_NONE },
{ "cr", SAI_PORT_INTERFACE_TYPE_CR },
{ "cr4", SAI_PORT_INTERFACE_TYPE_CR4 },
{ "cr8", SAI_PORT_INTERFACE_TYPE_CR8 },
{ "sr", SAI_PORT_INTERFACE_TYPE_SR },
{ "sr4", SAI_PORT_INTERFACE_TYPE_SR4 },
{ "sr8", SAI_PORT_INTERFACE_TYPE_SR8 },
{ "lr", SAI_PORT_INTERFACE_TYPE_LR },
{ "lr4", SAI_PORT_INTERFACE_TYPE_LR4 },
{ "lr8", SAI_PORT_INTERFACE_TYPE_LR8 },
{ "kr", SAI_PORT_INTERFACE_TYPE_KR },
{ "kr4", SAI_PORT_INTERFACE_TYPE_KR4 }
{ "kr4", SAI_PORT_INTERFACE_TYPE_KR4 },
{ "kr8", SAI_PORT_INTERFACE_TYPE_KR8 }
};

// Interface type map used for auto negotiation
Expand All @@ -133,13 +137,17 @@ static map<string, sai_port_interface_type_t> interface_type_map_for_an =
{ "cr", SAI_PORT_INTERFACE_TYPE_CR },
{ "cr2", SAI_PORT_INTERFACE_TYPE_CR2 },
{ "cr4", SAI_PORT_INTERFACE_TYPE_CR4 },
{ "cr8", SAI_PORT_INTERFACE_TYPE_CR8 },
{ "sr", SAI_PORT_INTERFACE_TYPE_SR },
{ "sr2", SAI_PORT_INTERFACE_TYPE_SR2 },
{ "sr4", SAI_PORT_INTERFACE_TYPE_SR4 },
{ "sr8", SAI_PORT_INTERFACE_TYPE_SR8 },
{ "lr", SAI_PORT_INTERFACE_TYPE_LR },
{ "lr4", SAI_PORT_INTERFACE_TYPE_LR4 },
{ "lr8", SAI_PORT_INTERFACE_TYPE_LR8 },
{ "kr", SAI_PORT_INTERFACE_TYPE_KR },
{ "kr4", SAI_PORT_INTERFACE_TYPE_KR4 },
{ "kr8", SAI_PORT_INTERFACE_TYPE_KR8 },
{ "caui", SAI_PORT_INTERFACE_TYPE_CAUI },
{ "gmii", SAI_PORT_INTERFACE_TYPE_GMII },
{ "sfi", SAI_PORT_INTERFACE_TYPE_SFI },
Expand Down

0 comments on commit a8fb98d

Please sign in to comment.