summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTomasz Kulasek <tomaszx.kulasek@intel.com>2016-03-31 15:38:08 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-31 22:56:00 +0200
commit9d203b76af2a4b310fdf3068e181ff52194bf7a8 (patch)
tree49b8fa5d2b405e48be90c0beae6dd9ba911654cf /examples
parent55d4c7756c5dd6fedc6327d08fae153a18d0f5a6 (diff)
downloaddpdk-9d203b76af2a4b310fdf3068e181ff52194bf7a8.zip
dpdk-9d203b76af2a4b310fdf3068e181ff52194bf7a8.tar.gz
dpdk-9d203b76af2a4b310fdf3068e181ff52194bf7a8.tar.xz
examples/l3fwd: fix packets lost when stopping
Not all tx ports was included in tx_port_id array, used to periodically drain only available ports. This caused that some packets remain in buffer when application stops to receiving packets. Fixes: 52c97adc1f0f ("examples/l3fwd: fix exact match performance") Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/l3fwd/main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index e10dab96..92fda3b 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -836,7 +836,6 @@ main(int argc, char **argv)
unsigned lcore_id;
uint32_t n_tx_queue, nb_lcores;
uint8_t portid, nb_rx_queue, queue, socketid;
- uint8_t nb_tx_port;
/* init EAL */
ret = rte_eal_init(argc, argv);
@@ -876,7 +875,6 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "check_port_config failed\n");
nb_lcores = rte_lcore_count();
- nb_tx_port = 0;
/* Setup function pointers for lookup method. */
setup_l3fwd_lookup_tables();
@@ -954,12 +952,10 @@ main(int argc, char **argv)
qconf->tx_queue_id[portid] = queueid;
queueid++;
- qconf->n_tx_port = nb_tx_port;
qconf->tx_port_id[qconf->n_tx_port] = portid;
+ qconf->n_tx_port++;
}
printf("\n");
-
- nb_tx_port++;
}
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {