RE: [PATCH 04/11] IB/cm: Expose DGID in SIDR request events

Hefty, Sean
2015-06-15T21:32:53Z

> drivers/infiniband/core/cm.c | 7 +++++++
> include/rdma/ib_cm.h | 2 ++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index c5f5f89e274a..46f99ec4080a 100644
> --- a/drivers/infiniband/core/cm.c
> +++ b/drivers/infiniband/core/cm.c
> @@ -2983,6 +2983,13 @@ static void cm_format_sidr_req_event(struct cm_work
> *work,
> param->pkey = __be16_to_cpu(sidr_req_msg->pkey);
> param->listen_id = listen_id;
> param->service_id = sidr_req_msg->service_id;
> + if (work->mad_recv_wc->wc->wc_flags & IB_WC_GRH) {
> + param->grh = 1;
> + memcpy(&param->dgid, &work->mad_recv_wc->recv_buf.grh->dgid,
> + sizeof(param->dgid));
> + } else {
> + param->grh = 0;

What is the use case here? Are you trying to sort by device? How does the GID of the GMP relate to the listen?