Skip to content

Commit f01765a

Browse files
aloktiwarleon
authored andcommitted
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: 1ac5a40 ("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>
1 parent fa3c411 commit f01765a

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,14 +2919,9 @@ int bnxt_re_post_send(struct ib_qp *ib_qp, const struct ib_send_wr *wr,
29192919
wqe.rawqp1.lflags |=
29202920
SQ_SEND_RAWETH_QP1_LFLAGS_ROCE_CRC;
29212921
}
2922-
switch (wr->send_flags) {
2923-
case IB_SEND_IP_CSUM:
2922+
if (wr->send_flags & IB_SEND_IP_CSUM)
29242923
wqe.rawqp1.lflags |=
29252924
SQ_SEND_RAWETH_QP1_LFLAGS_IP_CHKSUM;
2926-
break;
2927-
default:
2928-
break;
2929-
}
29302925
fallthrough;
29312926
case IB_WR_SEND_WITH_INV:
29322927
rc = bnxt_re_build_send_wqe(qp, wr, &wqe);

0 commit comments

Comments
 (0)