diff options
author | Eyal Bari <ebari@cisco.com> | 2018-05-10 09:12:42 +0300 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-05-10 07:37:42 +0000 |
commit | f5a7fac2a1cf7ccbdf4f2d9b3efd9ff881a437e6 (patch) | |
tree | 5bcc39c4391b05f4fca84b420ddde4bce380c9ba /src/plugins/dpdk | |
parent | a194e145449fbb16faa962158f4f5af973b8c431 (diff) |
dpdk:fix tx count
Change-Id: I921465ea64b59d42674cc8f19069ed04e3b25026
Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r-- | src/plugins/dpdk/device/device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c index 61cd97009c6..3a9c7813f0c 100644 --- a/src/plugins/dpdk/device/device.c +++ b/src/plugins/dpdk/device/device.c @@ -522,13 +522,14 @@ CLIB_MULTIARCH_FN (dpdk_interface_tx) (vlib_main_t * vm, } /* transmit as many packets as possible */ - n_packets = mb - ptd->mbufs; + tx_pkts = n_packets = mb - ptd->mbufs; n_left = tx_burst_vector_internal (vm, xd, ptd->mbufs, n_packets); { /* If there is no callback then drop any non-transmitted packets */ if (PREDICT_FALSE (n_left)) { + tx_pkts -= n_left; vlib_simple_counter_main_t *cm; vnet_main_t *vnm = vnet_get_main (); |