Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/bnxt_re: Fix IB_SEND_IP_CSUM handling in post_send

The bnxt_re SEND path checks wr->send_flags to enable features such as
IP checksum offload. However, send_flags is a bitmask and may contain
multiple flags (e.g. IB_SEND_SIGNALED | IB_SEND_IP_CSUM), while the
existing code uses a switch() statement that only matches when
send_flags is exactly IB_SEND_IP_CSUM.

As a result, checksum offload is not enabled when additional SEND
flags are present.

Replace the switch() with a bitmask test:

if (wr->send_flags & IB_SEND_IP_CSUM)

This ensures IP checksum offload is enabled correctly when multiple
SEND flags are used.

Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://patch.msgid.link/20251219093308.2415620-1-alok.a.tiwari@oracle.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Alok Tiwari and committed by
Leon Romanovsky
f01765a2 fa3c411d

+1 -6
+1 -6
drivers/infiniband/hw/bnxt_re/ib_verbs.c
··· 2919 2919 wqe.rawqp1.lflags |= 2920 2920 SQ_SEND_RAWETH_QP1_LFLAGS_ROCE_CRC; 2921 2921 } 2922 - switch (wr->send_flags) { 2923 - case IB_SEND_IP_CSUM: 2922 + if (wr->send_flags & IB_SEND_IP_CSUM) 2924 2923 wqe.rawqp1.lflags |= 2925 2924 SQ_SEND_RAWETH_QP1_LFLAGS_IP_CHKSUM; 2926 - break; 2927 - default: 2928 - break; 2929 - } 2930 2925 fallthrough; 2931 2926 case IB_WR_SEND_WITH_INV: 2932 2927 rc = bnxt_re_build_send_wqe(qp, wr, &wqe);