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: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Steve Wise 2019-02-01 12:44:32 -08:00 committed by Jason Gunthorpe
parent 9491128f78
commit 926ba19b35
2 changed files with 4 additions and 1 deletions

View File

@ -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,
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),

View File

@ -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 {