Skip to content

Commit

Permalink
[sonic-swss] Add port auto negotiation support to swss (sonic-net#1714)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junchao-Mellanox committed May 19, 2021
1 parent 7c6ebb1 commit 3629d70
Show file tree
Hide file tree
Showing 7 changed files with 638 additions and 173 deletions.
2 changes: 1 addition & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool OrchDaemon::init()
};

gCrmOrch = new CrmOrch(m_configDb, CFG_CRM_TABLE_NAME);
gPortsOrch = new PortsOrch(m_applDb, ports_tables, m_chassisAppDb);
gPortsOrch = new PortsOrch(m_applDb, m_stateDb, ports_tables, m_chassisAppDb);
TableConnector stateDbFdb(m_stateDb, STATE_FDB_TABLE_NAME);
gFdbOrch = new FdbOrch(m_applDb, app_fdb_tables, stateDbFdb, gPortsOrch);

Expand Down
5 changes: 4 additions & 1 deletion orchagent/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Port
uint32_t m_mtu = DEFAULT_MTU;
uint32_t m_speed = 0; // Mbps
std::string m_learn_mode = "hardware";
bool m_autoneg = false;
int m_autoneg = -1; // -1 means not set, 0 = disabled, 1 = enabled
bool m_admin_state_up = false;
bool m_init = false;
bool m_l3_vni = false;
Expand Down Expand Up @@ -133,6 +133,9 @@ class Port
uint32_t m_fdb_count = 0;
uint32_t m_up_member_count = 0;
uint32_t m_maximum_headroom = 0;
std::vector<uint32_t> m_adv_speeds;
sai_port_interface_type_t m_interface_type;
std::vector<uint32_t> m_adv_interface_types;

/*
* Following two bit vectors are used to lock
Expand Down
Loading

0 comments on commit 3629d70

Please sign in to comment.