IB/Verbs: Use management helper rdma_cap_ib_mcast()

Introduce helper rdma_cap_ib_mcast() to help us check if the port of an
IB device support Infiniband Multicast.

Signed-off-by: Michael Wang <[email protected]>
Reviewed-by: Ira Weiny <[email protected]>
Tested-by: Ira Weiny <[email protected]>
Reviewed-by: Sean Hefty <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Tested-by: Doug Ledford <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
Michael Wang 2015-05-05 14:50:37 +02:00 • committed by Doug Ledford
commit a31ad3b0e3
3 changed files with 21 additions and 6 deletions

View file

@ -1849,6 +1849,21 @@ static inline bool rdma_cap_ib_sa(struct ib_device *device, u8 port_num)
return rdma_protocol_ib(device, port_num);
}
/**
* rdma_cap_ib_mcast - Check if the port of device has the capability Infiniband
* Multicast.
*
* @device: Device to be checked
* @port_num: Port number of the device
*
* Return false when port of the device don't support Infiniband
* Multicast.
*/
static inline bool rdma_cap_ib_mcast(struct ib_device *device, u8 port_num)
{
return rdma_cap_ib_sa(device, port_num);
}
int ib_query_gid(struct ib_device *device,
u8 port_num, int index, union ib_gid *gid);