Skip to content

Commit 3629d70

Browse files
[sonic-swss] Add port auto negotiation support to swss (mudsut4ke#1714)
1. Added port auto negotiation attributes handle 2. Get supported speeds for each port and save them to CONFIG_DB 3. Added new test cases in VS test to verify the change
1 parent 7c6ebb1 commit 3629d70

File tree

7 files changed

+638
-173
lines changed

7 files changed

+638
-173
lines changed

orchagent/orchdaemon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bool OrchDaemon::init()
105105
};
106106

107107
gCrmOrch = new CrmOrch(m_configDb, CFG_CRM_TABLE_NAME);
108-
gPortsOrch = new PortsOrch(m_applDb, ports_tables, m_chassisAppDb);
108+
gPortsOrch = new PortsOrch(m_applDb, m_stateDb, ports_tables, m_chassisAppDb);
109109
TableConnector stateDbFdb(m_stateDb, STATE_FDB_TABLE_NAME);
110110
gFdbOrch = new FdbOrch(m_applDb, app_fdb_tables, stateDbFdb, gPortsOrch);
111111

orchagent/port.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Port
100100
uint32_t m_mtu = DEFAULT_MTU;
101101
uint32_t m_speed = 0; // Mbps
102102
std::string m_learn_mode = "hardware";
103-
bool m_autoneg = false;
103+
int m_autoneg = -1; // -1 means not set, 0 = disabled, 1 = enabled
104104
bool m_admin_state_up = false;
105105
bool m_init = false;
106106
bool m_l3_vni = false;
@@ -133,6 +133,9 @@ class Port
133133
uint32_t m_fdb_count = 0;
134134
uint32_t m_up_member_count = 0;
135135
uint32_t m_maximum_headroom = 0;
136+
std::vector<uint32_t> m_adv_speeds;
137+
sai_port_interface_type_t m_interface_type;
138+
std::vector<uint32_t> m_adv_interface_types;
136139

137140
/*
138141
* Following two bit vectors are used to lock

0 commit comments

Comments
 (0)