Message ID | 1531465820-19465-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On Fri, Jul 13, 2018 at 10:11 AM Zhu Yanjun <yanjun.zhu@oracle.com> wrote: > > 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. > > CC: Srinivas Eeda <srinivas.eeda@oracle.com> > CC: Junxiao Bi <junxiao.bi@oracle.com> > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > --- > V2->V3: Add pr_warn_once warning > V1->V2: Remove the warning > --- > drivers/infiniband/sw/rxe/rxe_recv.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Acked-by: Moni Shoua <monis@mellanox.com> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jul 13, 2018 at 03:10:20AM -0400, Yanjun Zhu wrote: > 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. > > CC: Srinivas Eeda <srinivas.eeda@oracle.com> > CC: Junxiao Bi <junxiao.bi@oracle.com> > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > --- > V2->V3: Add pr_warn_once warning > V1->V2: Remove the warning > --- > drivers/infiniband/sw/rxe/rxe_recv.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c > index dfba44a..fe45d6c 100644 > --- a/drivers/infiniband/sw/rxe/rxe_recv.c > +++ b/drivers/infiniband/sw/rxe/rxe_recv.c > @@ -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; > + Consider using IB_QPT_SMI and IB_QPT_GSI instead of 0 and 1. Besides that lgtm. Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > qp = rxe_pool_get_index(&rxe->qp_pool, index); > if (unlikely(!qp)) { > pr_warn_ratelimited("no qp matches qpn 0x%x\n", qpn); > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jul 13, 2018 at 03:10:20AM -0400, Zhu Yanjun wrote: > 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. > > CC: Srinivas Eeda <srinivas.eeda@oracle.com> > CC: Junxiao Bi <junxiao.bi@oracle.com> > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > Acked-by: Moni Shoua <monis@mellanox.com> > Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > --- > V2->V3: Add pr_warn_once warning > V1->V2: Remove the warning > --- > drivers/infiniband/sw/rxe/rxe_recv.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Applied to for-next, thanks Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c index dfba44a..fe45d6c 100644 --- a/drivers/infiniband/sw/rxe/rxe_recv.c +++ b/drivers/infiniband/sw/rxe/rxe_recv.c @@ -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);
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. CC: Srinivas Eeda <srinivas.eeda@oracle.com> CC: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> --- V2->V3: Add pr_warn_once warning V1->V2: Remove the warning --- drivers/infiniband/sw/rxe/rxe_recv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)