Skip to content

Commit e328197

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Remove useless code in rxe_recv.c
In check_keys() in rxe_recv.c if ((...) && pkt->mask) { ... } always has pkt->mask non zero since in rxe_udp_encap_recv() pkt->mask is always set to RXE_GRH_MASK (!= 0). There is no obvious reason for this additional test and the original intent is lost. This patch simplifies the expression. Fixes: 8b7b59d ("IB/rxe: remove redudant qpn check") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bob Pearson <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 7d9ae80 commit e328197

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/infiniband/sw/rxe/rxe_recv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ static int check_keys(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
9090
goto err1;
9191
}
9292

93-
if ((qp_type(qp) == IB_QPT_UD || qp_type(qp) == IB_QPT_GSI) &&
94-
pkt->mask) {
93+
if (qp_type(qp) == IB_QPT_UD || qp_type(qp) == IB_QPT_GSI) {
9594
u32 qkey = (qpn == 1) ? GSI_QKEY : qp->attr.qkey;
9695

9796
if (unlikely(deth_qkey(pkt) != qkey)) {

0 commit comments

Comments
 (0)