diff options
author | Parav Pandit <parav@mellanox.com> | 2018-06-19 09:59:14 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-25 22:19:56 +0200 |
commit | b7403217656dcf6c51f09d0bca7a12db0de8934a (patch) | |
tree | 7b33cae5ff1d69441813710a23498bbb606e13cf /drivers/infiniband/core/user_mad.c | |
parent | IB/hfi1: Remove INTx support and simplify MSIx usage (diff) | |
download | linux-b7403217656dcf6c51f09d0bca7a12db0de8934a.tar.xz linux-b7403217656dcf6c51f09d0bca7a12db0de8934a.zip |
IB: Make ib_init_ah_attr_from_wc set sgid_attr
The work completion is inspected to determine what dgid table entry was
used to receieve the packet, produces a sgid_attr that matches and sticks
it in the ah_attr.
All callers of this function are now required to release the ah_attr on
success.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/user_mad.c')
-rw-r--r-- | drivers/infiniband/core/user_mad.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index bb98c9e4a7fd..c34a6852d691 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -268,6 +268,7 @@ static void recv_handler(struct ib_mad_agent *agent, packet->mad.hdr.traffic_class = grh->traffic_class; memcpy(packet->mad.hdr.gid, &grh->dgid, 16); packet->mad.hdr.flow_label = cpu_to_be32(grh->flow_label); + rdma_destroy_ah_attr(&ah_attr); } if (queue_packet(file, agent, packet)) |