aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/user_mad.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-06-19 10:59:14 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-06-25 14:19:56 -0600
commitb7403217656dcf6c51f09d0bca7a12db0de8934a (patch)
tree7b33cae5ff1d69441813710a23498bbb606e13cf /drivers/infiniband/core/user_mad.c
parentIB/hfi1: Remove INTx support and simplify MSIx usage (diff)
downloadlinux-dev-b7403217656dcf6c51f09d0bca7a12db0de8934a.tar.xz
linux-dev-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.c1
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))