summaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2024-03-30 14:56:51 +0100
committerMohammed HAWARI <momohawari@gmail.com>2024-04-05 16:00:41 +0000
commita2f53c700a38df649b840eeecf0da38370a5eb0c (patch)
tree56dac5c00f759ccd95fe15f0bf0cdb7c7bd9845d /src/plugins/dev_octeon
parente8fb3cfe892ca1c562d63eb8854386180a297d80 (diff)
octeon: fix buffer free on full tx ring
Type: fix Fixes: 01fe7ab Change-Id: I4419107c4bcb7f85b76addfc62178b6e75e10a52 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dev_octeon')
-rw-r--r--src/plugins/dev_octeon/tx_node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/dev_octeon/tx_node.c b/src/plugins/dev_octeon/tx_node.c
index 5deaa82a0c1..28e8f25adb1 100644
--- a/src/plugins/dev_octeon/tx_node.c
+++ b/src/plugins/dev_octeon/tx_node.c
@@ -392,11 +392,11 @@ VNET_DEV_NODE_FN (oct_tx_node)
if (n < n_pkts)
{
- n = n_pkts - n;
- vlib_buffer_free (vm, from + n, n);
+ u32 n_free = n_pkts - n;
+ vlib_buffer_free (vm, from + n, n_free);
vlib_error_count (vm, node->node_index, OCT_TX_NODE_CTR_NO_FREE_SLOTS,
- n);
- n_pkts -= ctx.n_drop;
+ n_free);
+ n_pkts -= n_free;
}
if (ctx.n_drop)