Skip to content

Commit 536ca24

Browse files
Zhu Yanjunjgunthorpe
authored andcommitted
IB/rxe: Drop QP0 silently
According to "Annex A16: RDMA over Converged Ethernet (RoCE)": A16.4.3 MANAGEMENT INTERFACES As defined in the base specification, a special Queue Pair, QP0 is defined solely for communication between subnet manager(s) and subnet management agents. Since such an IB-defined subnet management architecture is outside the scope of this annex, it follows that there is also no requirement that a port which conforms to this annex be associated with a QP0. Thus, for end nodes designed to conform to this annex, the concept of QP0 is undefined and unused for any port connected to an Ethernet network. CA16-8: A packet arriving at a RoCE port containing a BTH with the destination QP field set to QP0 shall be silently dropped. Signed-off-by: Zhu Yanjun <[email protected]> Acked-by: Moni Shoua <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 99a7e2b commit 536ca24

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/infiniband/sw/rxe/rxe_recv.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,14 @@ static int hdr_check(struct rxe_pkt_info *pkt)
225225
goto err1;
226226
}
227227

228+
if (unlikely(qpn == 0)) {
229+
pr_warn_once("QP 0 not supported");
230+
goto err1;
231+
}
232+
228233
if (qpn != IB_MULTICAST_QPN) {
229-
index = (qpn == 0) ? port->qp_smi_index :
230-
((qpn == 1) ? port->qp_gsi_index : qpn);
234+
index = (qpn == 1) ? port->qp_gsi_index : qpn;
235+
231236
qp = rxe_pool_get_index(&rxe->qp_pool, index);
232237
if (unlikely(!qp)) {
233238
pr_warn_ratelimited("no qp matches qpn 0x%x\n", qpn);

0 commit comments

Comments
 (0)