octeon: fix buffer free on full tx ring

Type: fix
Fixes: 01fe7ab
Change-Id: I4419107c4bcb7f85b76addfc62178b6e75e10a52
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2024-03-30 14:56:51 +01:00
committed by Mohammed HAWARI
parent e8fb3cfe89
commit a2f53c700a

View File

@ -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)