File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,11 +68,12 @@ WRED_CONFIG_FIELDS = {
6868 "rdrop" : "red_drop_probability"
6969}
7070
71- PORT_TABLE_NAME = "PORT"
72- QUEUE_TABLE_NAME = "QUEUE"
73- FIELD = "wred_profile"
74- ON = "[WRED_PROFILE|AZURE_LOSSLESS]"
75- OFF = "[]"
71+ PORT_TABLE_NAME = "PORT"
72+ QUEUE_TABLE_NAME = "QUEUE"
73+ DEVICE_NEIGHBOR_TABLE_NAME = "DEVICE_NEIGHBOR"
74+ FIELD = "wred_profile"
75+ ON = "[WRED_PROFILE|AZURE_LOSSLESS]"
76+ OFF = "[]"
7677
7778lossless_queues = ['3' , '4' ]
7879
@@ -153,10 +154,9 @@ class EcnQ(object):
153154 if q not in lossless_queues :
154155 sys .exit ('Invalid queue index: %s' % q )
155156
156- # TODO: Change to use active ports only
157157 def gen_ports_key (self ):
158158 if self .ports_key is not None :
159- port_table = self .config_db .get_table (PORT_TABLE_NAME )
159+ port_table = self .config_db .get_table (DEVICE_NEIGHBOR_TABLE_NAME )
160160 self .ports_key = port_table .keys ()
161161
162162 self .ports_key .sort (key = lambda k : int (k [8 :]))
You can’t perform that action at this time.
0 commit comments