Skip to content

Commit

Permalink
Fix port index for multi-asic (sonic-net#13042)
Browse files Browse the repository at this point in the history
Port indexes of front panel ports are not contiguous in multi-asic because we didn't distiguish between
front panel and internal ports, e.g., recycle ports. Fix this by assigning index to front panel port first
and then internal ports.
  • Loading branch information
ysmanman authored Dec 16, 2022
1 parent a2885b3 commit 1fd2395
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Ethernet112 24,25,26,27 Ethernet15/1 15 Ext 100000 Eth1
Ethernet120 16,17,18,19 Ethernet16/1 16 Ext 100000 Eth120-ASIC0 0 16 8
Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth128-ASIC0 0 17 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 18 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# name lanes alias index role speed asic_port_name coreId corePortId numVoq
Ethernet144 72,73,74,75 Ethernet19/1 21 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 22 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 23 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 24 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 25 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 26 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 27 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 28 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 29 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 30 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 31 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 32 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 33 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 34 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 35 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 36 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 37 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 38 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 21 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 22 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 23 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 24 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 25 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 26 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 27 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 28 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 29 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 30 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 31 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 32 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 33 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 34 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet-Rec1 221 Recirc0/0 39 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ Ethernet112 24,25,26,27 Ethernet15/1 15 Ext 100000 Eth1
Ethernet120 16,17,18,19 Ethernet16/1 16 Ext 100000 Eth120-ASIC0 0 16 8
Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth128-ASIC0 0 17 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 18 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet144 72,73,74,75 Ethernet19/1 21 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 22 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 23 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 24 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 25 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 26 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 27 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 28 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 29 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 30 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 31 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 32 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 33 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 34 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 35 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 36 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 37 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 38 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 21 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 22 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 23 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 24 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 25 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 26 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 27 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 28 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 29 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 30 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 31 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 32 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 33 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 34 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec1 221 Recirc0/0 39 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth1
Ethernet132 12,13,14,15 Ethernet17/5 17 Ext 100000 Eth132-ASIC0 0 34 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 35 8
Ethernet140 4,5,6,7 Ethernet18/5 18 Ext 100000 Eth140-ASIC0 0 36 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth2
Ethernet276 12,13,14,15 Ethernet35/5 35 Ext 100000 Eth276-ASIC1 0 34 8
Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth280-ASIC1 0 35 8
Ethernet284 4,5,6,7 Ethernet36/5 36 Ext 100000 Eth284-ASIC1 0 36 8
Ethernet-Rec1 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC1 1 222 8
Ethernet-Rec1 221 Recirc0/0 39 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth1
Ethernet132 12,13,14,15 Ethernet17/5 17 Ext 100000 Eth132-ASIC0 0 34 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 35 8
Ethernet140 4,5,6,7 Ethernet18/5 18 Ext 100000 Eth140-ASIC0 0 36 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth144-ASIC1 1 1 8
Ethernet148 76,77,78,79 Ethernet19/5 19 Ext 100000 Eth148-ASIC1 1 2 8
Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth152-ASIC1 1 3 8
Expand Down Expand Up @@ -73,5 +71,7 @@ Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth2
Ethernet276 12,13,14,15 Ethernet35/5 35 Ext 100000 Eth276-ASIC1 0 34 8
Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth280-ASIC1 0 35 8
Ethernet284 4,5,6,7 Ethernet36/5 36 Ext 100000 Eth284-ASIC1 0 36 8
Ethernet-Rec1 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC1 1 222 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec1 221 Recirc0/0 39 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Ethernet112 24,25,26,27,28,29,30,31 Ethernet15/1 15 Ext
Ethernet120 16,17,18,19,20,21,22,23 Ethernet16/1 16 Ext 400000 Eth120-ASIC0 0 16 8
Ethernet128 8,9,10,11,12,13,14,15 Ethernet17/1 17 Ext 400000 Eth128-ASIC0 0 17 8
Ethernet136 0,1,2,3,4,5,6,7 Ethernet18/1 18 Ext 400000 Eth136-ASIC0 0 18 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Loading

0 comments on commit 1fd2395

Please sign in to comment.