IB/core: add a helper to check for READ WITH INVALIDATE support

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Christoph Hellwig 2016-05-03 18:01:05 +02:00 коммит произвёл Doug Ledford
Родитель ff2ba99365
Коммит 002516edf5
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -2318,6 +2318,18 @@ static inline bool rdma_cap_roce_gid_table(const struct ib_device *device,
device->add_gid && device->del_gid;
}
/*
* Check if the device supports READ W/ INVALIDATE.
*/
static inline bool rdma_cap_read_inv(struct ib_device *dev, u32 port_num)
{
/*
* iWarp drivers must support READ W/ INVALIDATE. No other protocol
* has support for it yet.
*/
return rdma_protocol_iwarp(dev, port_num);
}
int ib_query_gid(struct ib_device *device,
u8 port_num, int index, union ib_gid *gid,
struct ib_gid_attr *attr);