summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/run.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-03-04 14:50:04 +0100
committerXavier Simonart <xavier.simonart@intel.com>2019-03-06 17:17:16 +0100
commit22d1e458389ae6c6eb98d9c14c4f1cd8e2009f3d (patch)
treea324bbaaa772d8e45d61476ce92b2d9ebaeb448a /VNFs/DPPD-PROX/run.c
parent40c34eda9e2be84b9dcc98326d0609f1fa89007f (diff)
PROX generator: performance optimization (2/4)
Improve PROX generator performance by pre-calculating bytes_to_tsc. This improvement is only implemented for non-pcap generator, where only few different packet sizes are usually generated. This change might have a negative performance impact in some cases, if many different packet sizes are generated, resulting in higher memory usage. This is the case for instance if random is applied to packet size. In addition, simplified the rx path, receiving now only MAX_PKT_BURST packets per handle loop. Before we were trying to empty the NIC looping on RX packets, ending up with many rx packets per handle loop. This was used to determine an lower bound for the time the packet was received. We now set the lower bound when less than MAX_PKT_BURST has been received. Change-Id: I1ce813d7e4ac1577ea412c590add5d6f94b36ec7 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/run.c')
-rw-r--r--VNFs/DPPD-PROX/run.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/run.c b/VNFs/DPPD-PROX/run.c
index 2ad8aca1..bed0c757 100644
--- a/VNFs/DPPD-PROX/run.c
+++ b/VNFs/DPPD-PROX/run.c
@@ -78,10 +78,7 @@ static void update_link_states(void)
port_cfg = &prox_port_cfg[portid];
rte_eth_link_get_nowait(portid, &link);
-#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;
-#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);