mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 04:42:12 +00:00
RDMA/netlink: Export LID mask control (LMC)
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:
parent
80a06dd36f
commit
34840fea11
@ -47,6 +47,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
|
||||
[RDMA_NLDEV_ATTR_SUBNET_PREFIX] = { .type = NLA_U64 },
|
||||
[RDMA_NLDEV_ATTR_LID] = { .type = NLA_U32 },
|
||||
[RDMA_NLDEV_ATTR_SM_LID] = { .type = NLA_U32 },
|
||||
[RDMA_NLDEV_ATTR_LMC] = { .type = NLA_U8 },
|
||||
};
|
||||
|
||||
static int fill_dev_info(struct sk_buff *msg, struct ib_device *device)
|
||||
@ -109,6 +110,8 @@ static int fill_port_info(struct sk_buff *msg,
|
||||
return -EMSGSIZE;
|
||||
if (nla_put_u32(msg, RDMA_NLDEV_ATTR_SM_LID, attr.sm_lid))
|
||||
return -EMSGSIZE;
|
||||
if (nla_put_u8(msg, RDMA_NLDEV_ATTR_LMC, attr.lmc))
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -292,6 +292,11 @@ enum rdma_nldev_attr {
|
||||
RDMA_NLDEV_ATTR_LID, /* u32 */
|
||||
RDMA_NLDEV_ATTR_SM_LID, /* u32 */
|
||||
|
||||
/*
|
||||
* LID mask control (LMC)
|
||||
*/
|
||||
RDMA_NLDEV_ATTR_LMC, /* u8 */
|
||||
|
||||
RDMA_NLDEV_ATTR_MAX
|
||||
};
|
||||
#endif /* _UAPI_RDMA_NETLINK_H */
|
||||
|
Loading…
Reference in New Issue
Block a user