dpdk:fix tx count 14/12514/2
authorEyal Bari <ebari@cisco.com>
Thu, 10 May 2018 06:12:42 +0000 (09:12 +0300)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 10 May 2018 07:37:42 +0000 (07:37 +0000)
Change-Id: I921465ea64b59d42674cc8f19069ed04e3b25026
Signed-off-by: Eyal Bari <ebari@cisco.com>
src/plugins/dpdk/device/device.c

index 61cd970..3a9c781 100644 (file)
@@ -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 ();