We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37695c8 commit f4edba1Copy full SHA for f4edba1
scripts/ecnconfig
@@ -198,7 +198,11 @@ class EcnQ(object):
198
port_table = self.config_db.get_table(DEVICE_NEIGHBOR_TABLE_NAME)
199
self.ports_key = port_table.keys()
200
201
- self.ports_key = sorted(self.ports_key, key = lambda k: int(k[8:]))
+ # In multi-ASIC platforms backend ethernet ports are identified as
202
+ # 'Ethernet-BPxy'. Add 1024 to sort backend ports to the end.
203
+ self.ports_key.sort(
204
+ key = lambda k: int(k[8:]) if "BP" not in k else int(k[11:]) + 1024
205
+ )
206
207
def set(self, enable):
208
if os.geteuid() != 0:
0 commit comments