net/tap: fix reported number of Tx packets
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: 02f96a0a82
("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>
This commit is contained in:
parent
ea2c9969b5
commit
9396ad3346
@ -685,7 +685,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 *
|
||||
|
Loading…
Reference in New Issue
Block a user