Skip to content

Commit 2866ccd

Browse files
authored
enable pfcwd for backplane ports (sonic-net#3759)
Currently, in Cisco 8800 chassis, PFCWD is only enabled for front end ports, not on backplane. As we have PFC enabled for backplane ports, need to enable pfcwd there too. What I did. Enable PFCWD for backplane ports. How I did it Include backplane ports into the port list to be enabled for pfcwd How to verify it manually copied the file to device, and run pfcwd start_default.
1 parent 3abd19e commit 2866ccd

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

pfcwd/main.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,17 @@ def get_server_facing_ports(db):
105105
return server_facing_ports
106106

107107

108+
def get_bp_ports(db):
109+
""" Get all the backplane ports. """
110+
candidates = db.get_table('PORT')
111+
bp_ports = []
112+
for port in candidates:
113+
if candidates[port].get('admin_status') == 'up' \
114+
and candidates[port].get('role') == 'Int':
115+
bp_ports.append(port)
116+
return bp_ports
117+
118+
108119
class PfcwdCli(object):
109120
def __init__(
110121
self, db=None, namespace=None, display=constants.DISPLAY_ALL
@@ -365,9 +376,10 @@ def start_default(self):
365376
)
366377

367378
# Get active ports from Config DB
368-
active_ports = natsorted(
369-
list(self.config_db.get_table('DEVICE_NEIGHBOR').keys())
370-
)
379+
external_ports = list(self.config_db.get_table('DEVICE_NEIGHBOR').keys())
380+
bp_ports = get_bp_ports(self.config_db)
381+
382+
active_ports = natsorted(list(set(external_ports + bp_ports)))
371383

372384
if not enable or enable.lower() != "enable":
373385
return

0 commit comments

Comments
 (0)