Skip to content

Commit

Permalink
Disabled link status check at init
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrothea committed Feb 23, 2024
1 parent 7e65083 commit 6f2d5a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/EALSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ iface_init(uint16_t iface, uint16_t rx_rings, uint16_t tx_rings,
throw FailedToConfigureInterface(ERS_HERE, iface, "MAC address retrival", retval);
}

if ((retval = rte_eth_link_get(iface, &link)) < 0) {
if ((retval = rte_eth_link_get(iface, &link)) != 0) {
throw FailedToRetrieveLinkStatus(ERS_HERE, iface, retval);
}

TLOG() << "Link: speed=" << link.link_speed << " duplex=" << link.link_duplex << " autoneg=" << link.link_autoneg << " status=" << link.link_status;

if ( check_link_status && link.link_status == 0 ) {
throw LinkOffline(ERS_HERE, iface);
}
Expand Down
2 changes: 1 addition & 1 deletion src/IfaceWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ IfaceWrapper::setup_interface()
{
TLOG() << "Initialize interface " << m_iface_id;
bool with_reset = true, with_mq_mode = true; // go to config
bool check_link_status = true;
bool check_link_status = false;

int retval = ealutils::iface_init(m_iface_id, m_rx_qs.size(), m_tx_qs.size(), m_rx_ring_size, m_tx_ring_size, m_mbuf_pools, with_reset, with_mq_mode, check_link_status);
if (retval != 0 ) {
Expand Down

0 comments on commit 6f2d5a4

Please sign in to comment.