summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/run.c
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2019-03-04 05:31:42 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-03-04 05:31:42 +0000
commit22348a49dd3d0d0fa0b2e4b6fb8260289ca834c4 (patch)
tree20931dfc2537a916192dca9a3e1630fdfff9d9c6 /VNFs/DPPD-PROX/run.c
parent57a771696397b8d322f693197ecbf5e9281b9005 (diff)
parentdeae87b73684b3a7a96c64c918c0342a52262744 (diff)
Merge "Use link speed from device capability instead of negotiated speeda"
Diffstat (limited to 'VNFs/DPPD-PROX/run.c')
-rw-r--r--VNFs/DPPD-PROX/run.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/run.c b/VNFs/DPPD-PROX/run.c
index 6ffd76be..2ad8aca1 100644
--- a/VNFs/DPPD-PROX/run.c
+++ b/VNFs/DPPD-PROX/run.c
@@ -78,9 +78,14 @@ static void update_link_states(void)
port_cfg = &prox_port_cfg[portid];
rte_eth_link_get_nowait(portid, &link);
- port_cfg->link_up = link.link_status;
+#if RTE_VERSION < RTE_VERSION_NUM(16,4,0,0)
+ // On more recent DPDK, we use the speed_capa of the port, and not the negotiated speed
port_cfg->link_speed = link.link_speed;
- plog_info("Link speed now %d Mbps\n", port_cfg->link_speed);
+#endif
+ if (port_cfg->link_up != link.link_status) {
+ port_cfg->link_up = link.link_status;
+ plog_info("port %d: Link speed now %d Mbps\n", portid, link.link_speed);
+ }
}
}