History

RDMA/netlink: Export LID mask control (LMC)

Leon Romanovsky committed 9 years ago

Commit 34840fe1 parent 80a06dd2 files · +8 −0Browse files

Unified · Split

2 files
  1. drivers/infiniband/core/nldev.c +3 −0
  2. include/uapi/rdma/rdma_netlink.h +5 −0
drivers/infiniband/core/nldev.c+3−0
@@ -47,6 +47,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = { · 46 unmodified lines
47 [RDMA_NLDEV_ATTR_SUBNET_PREFIX] = { .type = NLA_U64 },47 [RDMA_NLDEV_ATTR_SUBNET_PREFIX] = { .type = NLA_U64 },
48 [RDMA_NLDEV_ATTR_LID] = { .type = NLA_U32 },48 [RDMA_NLDEV_ATTR_LID] = { .type = NLA_U32 },
49 [RDMA_NLDEV_ATTR_SM_LID] = { .type = NLA_U32 },49 [RDMA_NLDEV_ATTR_SM_LID] = { .type = NLA_U32 },
50 [RDMA_NLDEV_ATTR_LMC] = { .type = NLA_U8 },
50};51};
51 52
52static int fill_dev_info(struct sk_buff *msg, struct ib_device *device)53static 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, · 56 unmodified lines
109 return -EMSGSIZE;110 return -EMSGSIZE;
110 if (nla_put_u32(msg, RDMA_NLDEV_ATTR_SM_LID, attr.sm_lid))111 if (nla_put_u32(msg, RDMA_NLDEV_ATTR_SM_LID, attr.sm_lid))
111 return -EMSGSIZE;112 return -EMSGSIZE;
113 if (nla_put_u8(msg, RDMA_NLDEV_ATTR_LMC, attr.lmc))
114 return -EMSGSIZE;
112 }115 }
113 return 0;116 return 0;
114}117}
include/uapi/rdma/rdma_netlink.h+5−0
@@ -292,6 +292,11 @@ enum rdma_nldev_attr { · 291 unmodified lines
292 RDMA_NLDEV_ATTR_LID, /* u32 */292 RDMA_NLDEV_ATTR_LID, /* u32 */
293 RDMA_NLDEV_ATTR_SM_LID, /* u32 */293 RDMA_NLDEV_ATTR_SM_LID, /* u32 */
294 294
295 /*
296 * LID mask control (LMC)
297 */
298 RDMA_NLDEV_ATTR_LMC, /* u8 */
299
295 RDMA_NLDEV_ATTR_MAX300 RDMA_NLDEV_ATTR_MAX
296};301};
297#endif /* _UAPI_RDMA_NETLINK_H */302#endif /* _UAPI_RDMA_NETLINK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t