diff options
author | Steve Wise <swise@opengridcomputing.com> | 2019-02-01 15:44:32 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-08 18:18:06 -0500 |
commit | 926ba19b3574f6a80823a42484877ed65e91da9c (patch) | |
tree | 62798bac4b4a26598664887b88efc5336ff4eb80 | |
parent | 9491128f780e5be382a5b22990439d017f6dfc59 (diff) |
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>
-rw-r--r-- | drivers/infiniband/core/cma.c | 2 | ||||
-rw-r--r-- | include/rdma/iw_cm.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index e761ddd09aed..c43512752b8a 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -2414,6 +2414,7 @@ static int cma_iw_listen(struct rdma_id_private *id_priv, int backlog) | |||
2414 | return PTR_ERR(id); | 2414 | return PTR_ERR(id); |
2415 | 2415 | ||
2416 | id->tos = id_priv->tos; | 2416 | id->tos = id_priv->tos; |
2417 | id->tos_set = id_priv->tos_set; | ||
2417 | id_priv->cm_id.iw = id; | 2418 | id_priv->cm_id.iw = id; |
2418 | 2419 | ||
2419 | memcpy(&id_priv->cm_id.iw->local_addr, cma_src_addr(id_priv), | 2420 | 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 | return PTR_ERR(cm_id); | 3844 | return PTR_ERR(cm_id); |
3844 | 3845 | ||
3845 | cm_id->tos = id_priv->tos; | 3846 | cm_id->tos = id_priv->tos; |
3847 | cm_id->tos_set = id_priv->tos_set; | ||
3846 | id_priv->cm_id.iw = cm_id; | 3848 | id_priv->cm_id.iw = cm_id; |
3847 | 3849 | ||
3848 | memcpy(&cm_id->local_addr, cma_src_addr(id_priv), | 3850 | memcpy(&cm_id->local_addr, cma_src_addr(id_priv), |
diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h index 48512abd3162..0e1f02815643 100644 --- a/include/rdma/iw_cm.h +++ b/include/rdma/iw_cm.h | |||
@@ -94,7 +94,8 @@ struct iw_cm_id { | |||
94 | void (*add_ref)(struct iw_cm_id *); | 94 | void (*add_ref)(struct iw_cm_id *); |
95 | void (*rem_ref)(struct iw_cm_id *); | 95 | void (*rem_ref)(struct iw_cm_id *); |
96 | u8 tos; | 96 | u8 tos; |
97 | bool mapped; | 97 | bool tos_set:1; |
98 | bool mapped:1; | ||
98 | }; | 99 | }; |
99 | 100 | ||
100 | struct iw_cm_conn_param { | 101 | struct iw_cm_conn_param { |