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
4747 [RDMA_NLDEV_ATTR_SUBNET_PREFIX] = { .type = NLA_U64 },
4848 [RDMA_NLDEV_ATTR_LID] = { .type = NLA_U32 },
4949 [RDMA_NLDEV_ATTR_SM_LID] = { .type = NLA_U32 },
50+ [RDMA_NLDEV_ATTR_LMC] = { .type = NLA_U8 },
5051 };
5152
5253 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, · 56 unmodified lines
109110 return -EMSGSIZE;
110111 if (nla_put_u32(msg, RDMA_NLDEV_ATTR_SM_LID, attr.sm_lid))
111112 return -EMSGSIZE;
113+ if (nla_put_u8(msg, RDMA_NLDEV_ATTR_LMC, attr.lmc))
114+ return -EMSGSIZE;
112115 }
113116 return 0;
114117 }
include/uapi/rdma/rdma_netlink.h+5−0
@@ -292,6 +292,11 @@ enum rdma_nldev_attr { · 291 unmodified lines
292292 RDMA_NLDEV_ATTR_LID, /* u32 */
293293 RDMA_NLDEV_ATTR_SM_LID, /* u32 */
294294
295+ /*
296+ * LID mask control (LMC)
297+ */
298+ RDMA_NLDEV_ATTR_LMC, /* u8 */
299+
295300 RDMA_NLDEV_ATTR_MAX
296301 };
297302 #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