Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
34840fea
Commit
34840fea
authored
Jun 28, 2017
by
Leon Romanovsky
Committed by
Leon Romanovsky
Aug 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RDMA/netlink: Export LID mask control (LMC)
Signed-off-by:
Leon Romanovsky
<
leonro@mellanox.com
>
parent
80a06dd3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
drivers/infiniband/core/nldev.c
drivers/infiniband/core/nldev.c
+3
-0
include/uapi/rdma/rdma_netlink.h
include/uapi/rdma/rdma_netlink.h
+5
-0
No files found.
drivers/infiniband/core/nldev.c
View file @
34840fea
...
@@ -47,6 +47,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
...
@@ -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_SUBNET_PREFIX
]
=
{
.
type
=
NLA_U64
},
[
RDMA_NLDEV_ATTR_LID
]
=
{
.
type
=
NLA_U32
},
[
RDMA_NLDEV_ATTR_LID
]
=
{
.
type
=
NLA_U32
},
[
RDMA_NLDEV_ATTR_SM_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
)
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,
...
@@ -109,6 +110,8 @@ static int fill_port_info(struct sk_buff *msg,
return
-
EMSGSIZE
;
return
-
EMSGSIZE
;
if
(
nla_put_u32
(
msg
,
RDMA_NLDEV_ATTR_SM_LID
,
attr
.
sm_lid
))
if
(
nla_put_u32
(
msg
,
RDMA_NLDEV_ATTR_SM_LID
,
attr
.
sm_lid
))
return
-
EMSGSIZE
;
return
-
EMSGSIZE
;
if
(
nla_put_u8
(
msg
,
RDMA_NLDEV_ATTR_LMC
,
attr
.
lmc
))
return
-
EMSGSIZE
;
}
}
return
0
;
return
0
;
}
}
...
...
include/uapi/rdma/rdma_netlink.h
View file @
34840fea
...
@@ -292,6 +292,11 @@ enum rdma_nldev_attr {
...
@@ -292,6 +292,11 @@ enum rdma_nldev_attr {
RDMA_NLDEV_ATTR_LID
,
/* u32 */
RDMA_NLDEV_ATTR_LID
,
/* u32 */
RDMA_NLDEV_ATTR_SM_LID
,
/* u32 */
RDMA_NLDEV_ATTR_SM_LID
,
/* u32 */
/*
* LID mask control (LMC)
*/
RDMA_NLDEV_ATTR_LMC
,
/* u8 */
RDMA_NLDEV_ATTR_MAX
RDMA_NLDEV_ATTR_MAX
};
};
#endif
/* _UAPI_RDMA_NETLINK_H */
#endif
/* _UAPI_RDMA_NETLINK_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment