Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadalihussnain committed Jan 10, 2025
1 parent 225ecd0 commit e9432c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
{
"files.associations": {
"vector": "cpp"
}
}
13 changes: 12 additions & 1 deletion cfgmgr/stpmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -222,6 +230,7 @@ class StpMgr : public Orch
Table m_stateStpTable;
Table m_cfgStpMstGlobalTable;
Table m_cfgStpMstInstTable;
Table m_cfgStpMstInstPortTable;

std::bitset<L2_INSTANCE_MAX> l2InstPool;
int stpd_fd;
Expand All @@ -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);
Expand All @@ -260,6 +270,7 @@ class StpMgr : public Orch
void processStpVlanPortAttr(const std::string op, uint32_t vlan_id, const std::string intfName,
std::vector<FieldValueTuple>&tupEntry);
vector<int> parseVlanList(const string &vlanList);
void processStpMstInstPortAttr()
};

}
Expand Down

0 comments on commit e9432c8

Please sign in to comment.