From 44c58487d51a0dc43d96f1dc864f0461ec6a346a Mon Sep 17 00:00:00 2001 From: Dasaratharaman Chandramouli Date: Sat, 29 Apr 2017 14:41:29 -0400 Subject: IB/core: Define 'ib' and 'roce' rdma_ah_attr types rdma_ah_attr can now be either ib or roce allowing core components to use one type or the other and also to define attributes unique to a specific type. struct ib_ah is also initialized with the type when its first created. This ensures that calls such as modify_ah dont modify the type of the address handle attribute. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford --- drivers/infiniband/core/user_mad.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/infiniband/core/user_mad.c') diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index c4c5f4b738dc..200422d24299 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -491,6 +491,8 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, } memset(&ah_attr, 0, sizeof ah_attr); + ah_attr.type = rdma_ah_find_type(file->port->ib_dev, + file->port->port_num); rdma_ah_set_dlid(&ah_attr, be16_to_cpu(packet->mad.hdr.lid)); rdma_ah_set_sl(&ah_attr, packet->mad.hdr.sl); rdma_ah_set_path_bits(&ah_attr, packet->mad.hdr.path_bits); -- cgit v1.2.3