Commit 926ba19b authored by Steve Wise's avatar Steve Wise Committed by Jason Gunthorpe

RDMA/iwcm: add tos_set bool to iw_cm struct

This allows drivers to know the tos was actively set by the application.
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 9491128f
...@@ -2414,6 +2414,7 @@ static int cma_iw_listen(struct rdma_id_private *id_priv, int backlog) ...@@ -2414,6 +2414,7 @@ static int cma_iw_listen(struct rdma_id_private *id_priv, int backlog)
return PTR_ERR(id); return PTR_ERR(id);
id->tos = id_priv->tos; id->tos = id_priv->tos;
id->tos_set = id_priv->tos_set;
id_priv->cm_id.iw = id; id_priv->cm_id.iw = id;
memcpy(&id_priv->cm_id.iw->local_addr, cma_src_addr(id_priv), memcpy(&id_priv->cm_id.iw->local_addr, cma_src_addr(id_priv),
...@@ -3843,6 +3844,7 @@ static int cma_connect_iw(struct rdma_id_private *id_priv, ...@@ -3843,6 +3844,7 @@ static int cma_connect_iw(struct rdma_id_private *id_priv,
return PTR_ERR(cm_id); return PTR_ERR(cm_id);
cm_id->tos = id_priv->tos; cm_id->tos = id_priv->tos;
cm_id->tos_set = id_priv->tos_set;
id_priv->cm_id.iw = cm_id; id_priv->cm_id.iw = cm_id;
memcpy(&cm_id->local_addr, cma_src_addr(id_priv), memcpy(&cm_id->local_addr, cma_src_addr(id_priv),
......
...@@ -94,7 +94,8 @@ struct iw_cm_id { ...@@ -94,7 +94,8 @@ struct iw_cm_id {
void (*add_ref)(struct iw_cm_id *); void (*add_ref)(struct iw_cm_id *);
void (*rem_ref)(struct iw_cm_id *); void (*rem_ref)(struct iw_cm_id *);
u8 tos; u8 tos;
bool mapped; bool tos_set:1;
bool mapped:1;
}; };
struct iw_cm_conn_param { struct iw_cm_conn_param {
......
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