Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acquire neighboring router MAC dynamically #615

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Retrieve initial link status for PFs
PlagueCZ committed Oct 17, 2024
commit 547e5a30769ce19cf4397cdd37c8e4055d26d63a
13 changes: 12 additions & 1 deletion src/dp_port.c
Original file line number Diff line number Diff line change
@@ -614,6 +614,9 @@ static int dp_init_port(struct dp_port *port)

int dp_start_port(struct dp_port *port)
{
struct rte_eth_link link = {
.link_status = RTE_ETH_LINK_DOWN
};
int ret;

ret = rte_eth_dev_start(port->port_id);
@@ -628,7 +631,15 @@ int dp_start_port(struct dp_port *port)
return ret;
}

port->link_status = RTE_ETH_LINK_UP;
if (port->is_pf) {
// this really only fails on bad arguments (or incompatible driver)
ret = rte_eth_link_get(port->port_id, &link);
if (DP_FAILED(ret))
DPS_LOG_WARNING("Unable to get the initial link status, assuming it down", DP_LOG_PORT(port), DP_LOG_RET(ret));
} else
link.link_status = RTE_ETH_LINK_UP;

port->link_status = link.link_status;
port->allocated = true;
return DP_OK;
}