* [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving
@ 2016-03-31 13:38 Tomasz Kulasek
2016-03-31 13:52 ` Ananyev, Konstantin
0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Kulasek @ 2016-03-31 13:38 UTC (permalink / raw)
To: dev
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>
---
examples/l3fwd/main.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index e10dab9..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++) {
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving
2016-03-31 13:38 [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving Tomasz Kulasek
@ 2016-03-31 13:52 ` Ananyev, Konstantin
2016-03-31 20:42 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Ananyev, Konstantin @ 2016-03-31 13:52 UTC (permalink / raw)
To: Kulasek, TomaszX, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek
> Sent: Thursday, March 31, 2016 2:38 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving
>
> 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>
> ---
> examples/l3fwd/main.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
> index e10dab9..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++) {
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving
2016-03-31 13:52 ` Ananyev, Konstantin
@ 2016-03-31 20:42 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-03-31 20:42 UTC (permalink / raw)
To: Kulasek, TomaszX; +Cc: dev, Ananyev, Konstantin
> > 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>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-31 20:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 13:38 [dpdk-dev] [PATCH] examples/l3fwd: fix some packets lost when stops receiving Tomasz Kulasek
2016-03-31 13:52 ` Ananyev, Konstantin
2016-03-31 20:42 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).