Commit 394df591 authored by Zhu Yanjun's avatar Zhu Yanjun Committed by Greg Kroah-Hartman

IB/rxe: Drop QP0 silently

[ Upstream commit 536ca245 ]

According to "Annex A16: RDMA over Converged Ethernet (RoCE)":


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: default avatarZhu Yanjun <>
Acked-by: default avatarMoni Shoua <>
Reviewed-by: default avatarYuval Shaia <>
Signed-off-by: default avatarJason Gunthorpe <>
Signed-off-by: default avatarSasha Levin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 5b253f74
......@@ -225,9 +225,14 @@ static int hdr_check(struct rxe_pkt_info *pkt)
goto err1;
if (unlikely(qpn == 0)) {
pr_warn_once("QP 0 not supported");
goto err1;
if (qpn != IB_MULTICAST_QPN) {
index = (qpn == 0) ? port->qp_smi_index :
((qpn == 1) ? port->qp_gsi_index : qpn);
index = (qpn == 1) ? port->qp_gsi_index : qpn;
qp = rxe_pool_get_index(&rxe->qp_pool, index);
if (unlikely(!qp)) {
pr_warn_ratelimited("no qp matches qpn 0x%x\n", qpn);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment