IB/sa: Add GuidInfoRecord query support
This query is needed for SRIOV alias GUID support. The query is implemented per the IB Spec definition in section 15.2.5.18 (GuidInfoRecord). Signed-off-by: Erez Shitrit <erezsh@mellanox.co.il> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:

committed by
Roland Dreier

parent
b1d8eb5a21
commit
aeab97ed15
@@ -251,6 +251,28 @@ struct ib_sa_service_rec {
|
||||
u64 data64[2];
|
||||
};
|
||||
|
||||
#define IB_SA_GUIDINFO_REC_LID IB_SA_COMP_MASK(0)
|
||||
#define IB_SA_GUIDINFO_REC_BLOCK_NUM IB_SA_COMP_MASK(1)
|
||||
#define IB_SA_GUIDINFO_REC_RES1 IB_SA_COMP_MASK(2)
|
||||
#define IB_SA_GUIDINFO_REC_RES2 IB_SA_COMP_MASK(3)
|
||||
#define IB_SA_GUIDINFO_REC_GID0 IB_SA_COMP_MASK(4)
|
||||
#define IB_SA_GUIDINFO_REC_GID1 IB_SA_COMP_MASK(5)
|
||||
#define IB_SA_GUIDINFO_REC_GID2 IB_SA_COMP_MASK(6)
|
||||
#define IB_SA_GUIDINFO_REC_GID3 IB_SA_COMP_MASK(7)
|
||||
#define IB_SA_GUIDINFO_REC_GID4 IB_SA_COMP_MASK(8)
|
||||
#define IB_SA_GUIDINFO_REC_GID5 IB_SA_COMP_MASK(9)
|
||||
#define IB_SA_GUIDINFO_REC_GID6 IB_SA_COMP_MASK(10)
|
||||
#define IB_SA_GUIDINFO_REC_GID7 IB_SA_COMP_MASK(11)
|
||||
|
||||
struct ib_sa_guidinfo_rec {
|
||||
__be16 lid;
|
||||
u8 block_num;
|
||||
/* reserved */
|
||||
u8 res1;
|
||||
__be32 res2;
|
||||
u8 guid_info_list[64];
|
||||
};
|
||||
|
||||
struct ib_sa_client {
|
||||
atomic_t users;
|
||||
struct completion comp;
|
||||
@@ -385,4 +407,15 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
|
||||
*/
|
||||
void ib_sa_unpack_path(void *attribute, struct ib_sa_path_rec *rec);
|
||||
|
||||
/* Support GuidInfoRecord */
|
||||
int ib_sa_guid_info_rec_query(struct ib_sa_client *client,
|
||||
struct ib_device *device, u8 port_num,
|
||||
struct ib_sa_guidinfo_rec *rec,
|
||||
ib_sa_comp_mask comp_mask, u8 method,
|
||||
int timeout_ms, gfp_t gfp_mask,
|
||||
void (*callback)(int status,
|
||||
struct ib_sa_guidinfo_rec *resp,
|
||||
void *context),
|
||||
void *context,
|
||||
struct ib_sa_query **sa_query);
|
||||
#endif /* IB_SA_H */
|
||||
|
Reference in New Issue
Block a user