af_xdp: fix free mem in tx while no free slot 64/33864/3
authorarikachen <eaglesora@gmail.com>
Tue, 28 Sep 2021 10:43:44 +0000 (18:43 +0800)
committerBeno�t Ganne <bganne@cisco.com>
Tue, 28 Sep 2021 12:59:24 +0000 (12:59 +0000)
Type: fix

Signed-off-by: arikachen <eaglesora@gmail.com>
Change-Id: Id305b9d311b2d0d11583db1a14a45d9187a1e628

src/plugins/af_xdp/output.c

index 51a56ed..aac5df0 100644 (file)
@@ -231,9 +231,9 @@ VNET_DEVICE_CLASS_TX_FN (af_xdp_device_class) (vlib_main_t * vm,
     {
       u32 n_enq;
       af_xdp_device_output_free (vm, node, txq);
-      n_enq = af_xdp_device_output_tx_try (vm, node, ad, txq, n_tx - n, from);
+      n_enq =
+       af_xdp_device_output_tx_try (vm, node, ad, txq, n_tx - n, from + n);
       n += n_enq;
-      from += n_enq;
     }
 
   af_xdp_device_output_tx_db (vm, node, ad, txq, n);