Skip to content

Commit 8b7b59d

Browse files
Zhu Yanjundledford
authored andcommitted
IB/rxe: remove redudant qpn check
In the commit 536ca24 ("IB/rxe: Drop QP0 silently"), if qpn is zero, the function directly returns. So in the following function, it is not necessary to check qpn. The qpn check in the function check_keys is removed. Fixes: 536ca24 ("IB/rxe: Drop QP0 silently") CC: Srinivas Eeda <[email protected]> CC: Junxiao Bi <[email protected]> Signed-off-by: Zhu Yanjun <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent d3c04a3 commit 8b7b59d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/sw/rxe/rxe_recv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int check_keys(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
122122
set_bad_pkey_cntr(port);
123123
goto err1;
124124
}
125-
} else if (qpn != 0) {
125+
} else {
126126
if (unlikely(!pkey_match(pkey,
127127
port->pkey_tbl[qp->attr.pkey_index]
128128
))) {
@@ -134,7 +134,7 @@ static int check_keys(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
134134
}
135135

136136
if ((qp_type(qp) == IB_QPT_UD || qp_type(qp) == IB_QPT_GSI) &&
137-
qpn != 0 && pkt->mask) {
137+
pkt->mask) {
138138
u32 qkey = (qpn == 1) ? GSI_QKEY : qp->attr.qkey;
139139

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

0 commit comments

Comments
 (0)