From: Mohammad Shuab Siddique <[email protected]>
Commit 2feea0f3b8b0 ("net/bnxt: modify check for short Tx BD") removed
the TCP, UDP and IP checksum flags from bnxt_xmit_need_long_bd().
The checksum flags are written to the second descriptor
(txbd1->lflags), which only exists for a long BD.
With only checksum offload requested, the packet now uses a short BD
that carries no checksum flags, so the hardware does not compute the
checksums and packets with bad checksums are forwarded unchanged.
Request a long BD again when TCP, UDP or IP checksum offload is set.
Fixes: 2feea0f3b8b0 ("net/bnxt: modify check for short Tx BD")
Cc: [email protected]
Signed-off-by: Mohammad Shuab Siddique <[email protected]>
---
drivers/net/bnxt/bnxt_txr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 4c01e8a275a..e765cc3e6f3 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -114,7 +114,8 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq,
unsigned int socket_id)
static bool
bnxt_xmit_need_long_bd(struct rte_mbuf *tx_pkt, struct bnxt_tx_queue *txq)
{
- if (tx_pkt->ol_flags & (RTE_MBUF_F_TX_TCP_SEG |
+ if (tx_pkt->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_TCP_CKSUM
|
+ RTE_MBUF_F_TX_UDP_CKSUM |
RTE_MBUF_F_TX_IP_CKSUM |
RTE_MBUF_F_TX_VLAN |
RTE_MBUF_F_TX_OUTER_IP_CKSUM |
RTE_MBUF_F_TX_TUNNEL_GRE |
RTE_MBUF_F_TX_TUNNEL_VXLAN |
RTE_MBUF_F_TX_TUNNEL_GENEVE |
RTE_MBUF_F_TX_IEEE1588_TMST |
--
2.47.3