From: arikachen Date: Tue, 28 Sep 2021 10:43:44 +0000 (+0800) Subject: af_xdp: fix free mem in tx while no free slot X-Git-Tag: v22.06-rc0~495 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=ca92091f95b34c75c5f810b6f967ca115671d907;p=vpp.git af_xdp: fix free mem in tx while no free slot Type: fix Signed-off-by: arikachen Change-Id: Id305b9d311b2d0d11583db1a14a45d9187a1e628 --- diff --git a/src/plugins/af_xdp/output.c b/src/plugins/af_xdp/output.c index 51a56ed866d..aac5df0325b 100644 --- a/src/plugins/af_xdp/output.c +++ b/src/plugins/af_xdp/output.c @@ -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);