DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/tap: fix reported number of Tx packets
@ 2018-10-10  7:01 Raslan Darawsheh
  2018-10-10 12:39 ` Wiles, Keith
  0 siblings, 1 reply; 3+ messages in thread
From: Raslan Darawsheh @ 2018-10-10  7:01 UTC (permalink / raw)
  To: keith.wiles
  Cc: Thomas Monjalon, dev, Shahaf Shuler, Raslan Darawsheh, Ori Kam, stable

When writev fails to send packets it doesn't update the
number of Tx packets, but it still num_tx is updated.

the value that should be returned is the actual number
of sent packets which is num_packets.

Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD")
CC: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 drivers/net/tap/rte_eth_tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 83c9288..228add2 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -707,7 +707,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	txq->stats.errs += nb_pkts - num_tx;
 	txq->stats.obytes += num_tx_bytes;
 
-	return num_tx;
+	return num_packets;
 }
 
 static const char *
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/tap: fix reported number of Tx packets
  2018-10-10  7:01 [dpdk-dev] [PATCH] net/tap: fix reported number of Tx packets Raslan Darawsheh
@ 2018-10-10 12:39 ` Wiles, Keith
  2018-10-16 15:19   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Wiles, Keith @ 2018-10-10 12:39 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Thomas Monjalon, dev, Shahaf Shuler, Ori Kam, stable



> On Oct 10, 2018, at 2:01 AM, Raslan Darawsheh <rasland@mellanox.com> wrote:
> 
> When writev fails to send packets it doesn't update the
> number of Tx packets, but it still num_tx is updated.
> 
> the value that should be returned is the actual number
> of sent packets which is num_packets.
> 
> Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD")
> CC: stable@dpdk.org
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>

Acked-by: Keith Wiles <keith.wiles@intel.com>
> ---
> drivers/net/tap/rte_eth_tap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 83c9288..228add2 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -707,7 +707,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> 	txq->stats.errs += nb_pkts - num_tx;
> 	txq->stats.obytes += num_tx_bytes;
> 
> -	return num_tx;
> +	return num_packets;
> }
> 
> static const char *
> -- 
> 2.7.4
> 

Regards,
Keith

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/tap: fix reported number of Tx packets
  2018-10-10 12:39 ` Wiles, Keith
@ 2018-10-16 15:19   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-10-16 15:19 UTC (permalink / raw)
  To: Wiles, Keith, Raslan Darawsheh
  Cc: Thomas Monjalon, dev, Shahaf Shuler, Ori Kam, stable

On 10/10/2018 1:39 PM, Wiles, Keith wrote:
> 
> 
>> On Oct 10, 2018, at 2:01 AM, Raslan Darawsheh <rasland@mellanox.com> wrote:
>>
>> When writev fails to send packets it doesn't update the
>> number of Tx packets, but it still num_tx is updated.
>>
>> the value that should be returned is the actual number
>> of sent packets which is num_packets.
>>
>> Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD")
>> CC: stable@dpdk.org
>> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> 
> Acked-by: Keith Wiles <keith.wiles@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-16 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10  7:01 [dpdk-dev] [PATCH] net/tap: fix reported number of Tx packets Raslan Darawsheh
2018-10-10 12:39 ` Wiles, Keith
2018-10-16 15:19   ` Ferruh Yigit

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).