Message ID | 3385d1f267e7cfb7911727fdc1fa1ced9c411ae6.1549054042.git.swise@opengridcomputing.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | RDMA cm_id type of service fixes | expand |
> -----Original Message----- > From: linux-rdma-owner@vger.kernel.org <linux-rdma- > owner@vger.kernel.org> On Behalf Of Steve Wise > Sent: Friday, February 1, 2019 2:44 PM > To: dledford@redhat.com; Jason Gunthorpe <jgg@mellanox.com> > Cc: linux-rdma@vger.kernel.org > Subject: [PATCH rdma-next 1/5] RDMA/cma: listening device cm_ids should > inherit tos > > If a user binds to INADDR_ANY and sets the service id, then the device- > specific cm_ids should also use this tos. This allows an app to do: > > rdma_bind_addr(INADDR_ANY) > set_service_type() > rdma_listen() > > And connections setup via this listening endpoint will use the correct tos. > > Signed-off-by: Steve Wise <swise@opengridcomputing.com> > --- > drivers/infiniband/core/cma.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c > index 8cd113b0ddfb..8d2fd41c94a2 100644 > --- a/drivers/infiniband/core/cma.c > +++ b/drivers/infiniband/core/cma.c > @@ -2459,6 +2459,8 @@ static void cma_listen_on_dev(struct > rdma_id_private *id_priv, > atomic_inc(&id_priv->refcount); > dev_id_priv->internal_id = 1; > dev_id_priv->afonly = id_priv->afonly; > + dev_id_priv->tos_set = id_priv->tos_set; > + dev_id_priv->tos = id_priv->tos; > > ret = rdma_listen(id, id_priv->backlog); > if (ret) > -- > 1.8.3.1 Reviewed-by: Parav Pandit <parav@mellanox.com>
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 8cd113b0ddfb..8d2fd41c94a2 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -2459,6 +2459,8 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv, atomic_inc(&id_priv->refcount); dev_id_priv->internal_id = 1; dev_id_priv->afonly = id_priv->afonly; + dev_id_priv->tos_set = id_priv->tos_set; + dev_id_priv->tos = id_priv->tos; ret = rdma_listen(id, id_priv->backlog); if (ret)
If a user binds to INADDR_ANY and sets the service id, then the device-specific cm_ids should also use this tos. This allows an app to do: rdma_bind_addr(INADDR_ANY) set_service_type() rdma_listen() And connections setup via this listening endpoint will use the correct tos. Signed-off-by: Steve Wise <swise@opengridcomputing.com> --- drivers/infiniband/core/cma.c | 2 ++ 1 file changed, 2 insertions(+)