[07/10] net/cnxk: fix issue with outbound security higher pkt burst
Checks
Commit Message
Fix issue with outbound security path while handling mixed traffic i.e
both plain and inline outbound pkts being present as part of burst
and burst size is > 32. The loop needs to be broken when
we don't have space for 4 pkts in LMT lines for CPT considering
both the full lmt lines and partial lmt lines used.
Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/net/cnxk/cn10k_tx.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -2272,7 +2272,8 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,
}
for (i = 0; i < burst; i += NIX_DESCS_PER_LOOP) {
- if (flags & NIX_TX_OFFLOAD_SECURITY_F && c_lnum + 2 > 16) {
+ if (flags & NIX_TX_OFFLOAD_SECURITY_F &&
+ (((int)((16 - c_lnum) << 1) - c_loff) < 4)) {
burst = i;
break;
}