From e9432c83b74c9511122b7f7920ced8637e5d24ff Mon Sep 17 00:00:00 2001 From: Muhammad Ali Hussnain <91005947+muhammadalihussnain@users.noreply.github.com> Date: Fri, 10 Jan 2025 07:52:17 +0000 Subject: [PATCH] test --- .vscode/settings.json | 5 ----- cfgmgr/stpmgr.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a3b2b51f1d..e69de29bb2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +0,0 @@ -{ - "files.associations": { - "vector": "cpp" - } -} \ No newline at end of file diff --git a/cfgmgr/stpmgr.h b/cfgmgr/stpmgr.h index 862e2e1fab..227806c215 100644 --- a/cfgmgr/stpmgr.h +++ b/cfgmgr/stpmgr.h @@ -61,7 +61,6 @@ typedef enum STP_MSG_TYPE { STP_MAX_MSG, STP_MST_GLOBAL_CONFIG, STP_MST_INST_CONFIG, - STP_MST_VLAN_PORT_LIST_CONFIG, STP_MST_INST_PORT_CONFIG }STP_MSG_TYPE; @@ -193,6 +192,15 @@ typedef struct MST_INST_CONFIG_MSG{ VLAN_MST_ATTR vlan_list[0]; }__attribute__ ((packed))MST_INST_CONFIG_MSG; +typedef struct STP_MST_INST_PORT_CONFIG_MSG { + uint8_t opcode; // Command (enable/disable) + char intf_name[STP_IFALIASZ]; // Interface name + uint16_t mst_id; // MST instance ID + VLAN_LIST vlan_list; // List of VLAN IDs for the instance + int path_cost; // Port path cost + int priority; // Port priority +}__attribute__ ((packed))STP_MST_INST_PORT_CONFIG_MSG; + namespace swss { @@ -222,6 +230,7 @@ class StpMgr : public Orch Table m_stateStpTable; Table m_cfgStpMstGlobalTable; Table m_cfgStpMstInstTable; + Table m_cfgStpMstInstPortTable; std::bitset l2InstPool; int stpd_fd; @@ -245,6 +254,7 @@ class StpMgr : public Orch void doLagMemUpdateTask(Consumer &consumer); void doStpMstGlobalTask(Consumer &consumer); void doStpMstInstTask(Consumer &consumer); + void doStpMstInstPortTask(Consumer &consumer); bool isVlanStateOk(const std::string &alias); bool isLagStateOk(const std::string &alias); @@ -260,6 +270,7 @@ class StpMgr : public Orch void processStpVlanPortAttr(const std::string op, uint32_t vlan_id, const std::string intfName, std::vector&tupEntry); vector parseVlanList(const string &vlanList); + void processStpMstInstPortAttr() }; }