Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
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
iproute2
Commits
68cab0ba
Commit
68cab0ba
authored
Apr 15, 2016
by
Jiri Pirko
Committed by
Stephen Hemminger
Apr 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devlink: introduce pr_out_port_handle helper
Signed-off-by:
Jiri Pirko
<
jiri@mellanox.com
>
parent
ebaf76b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
devlink/devlink.c
devlink/devlink.c
+8
-2
No files found.
devlink/devlink.c
View file @
68cab0ba
...
...
@@ -523,6 +523,12 @@ static void pr_out_handle(struct nlattr **tb)
mnl_attr_get_str
(
tb
[
DEVLINK_ATTR_DEV_NAME
]));
}
static
void
pr_out_port_handle
(
struct
nlattr
**
tb
)
{
pr_out_handle
(
tb
);
pr_out
(
"/%d"
,
mnl_attr_get_u32
(
tb
[
DEVLINK_ATTR_PORT_INDEX
]));
}
static
void
pr_out_dev
(
struct
nlattr
**
tb
)
{
pr_out_handle
(
tb
);
...
...
@@ -599,8 +605,8 @@ static void pr_out_port(struct nlattr **tb)
struct
nlattr
*
pt_attr
=
tb
[
DEVLINK_ATTR_PORT_TYPE
];
struct
nlattr
*
dpt_attr
=
tb
[
DEVLINK_ATTR_PORT_DESIRED_TYPE
];
pr_out_handle
(
tb
);
pr_out
(
"
/%d:"
,
mnl_attr_get_u32
(
tb
[
DEVLINK_ATTR_PORT_INDEX
])
);
pr_out_
port_
handle
(
tb
);
pr_out
(
"
:"
);
if
(
pt_attr
)
{
uint16_t
port_type
=
mnl_attr_get_u16
(
pt_attr
);
...
...
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