Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9491128f authored by Steve Wise's avatar Steve Wise Committed by Jason Gunthorpe
Browse files

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: default avatarSteve Wise <swise@opengridcomputing.com>
Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 2c1619ed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2466,6 +2466,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)