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
d992f3e6
Commit
d992f3e6
authored
Aug 01, 2012
by
Jiri Pirko
Committed by
Stephen Hemminger
Aug 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iplink: add support for num[tr]xqueues
parent
c6d6c92c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
ip/iplink.c
ip/iplink.c
+20
-0
man/man8/ip-link.8.in
man/man8/ip-link.8.in
+13
-0
No files found.
ip/iplink.c
View file @
d992f3e6
...
...
@@ -48,6 +48,8 @@ void iplink_usage(void)
fprintf
(
stderr
,
" [ address LLADDR ]
\n
"
);
fprintf
(
stderr
,
" [ broadcast LLADDR ]
\n
"
);
fprintf
(
stderr
,
" [ mtu MTU ]
\n
"
);
fprintf
(
stderr
,
" [ numtxqueues QUEUE_COUNT ]
\n
"
);
fprintf
(
stderr
,
" [ numrxqueues QUEUE_COUNT ]
\n
"
);
fprintf
(
stderr
,
" type TYPE [ ARGS ]
\n
"
);
fprintf
(
stderr
,
" ip link delete DEV type TYPE [ ARGS ]
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
...
...
@@ -279,6 +281,8 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
int
mtu
=
-
1
;
int
netns
=
-
1
;
int
vf
=
-
1
;
int
numtxqueues
=
-
1
;
int
numrxqueues
=
-
1
;
*
group
=
-
1
;
ret
=
argc
;
...
...
@@ -445,6 +449,22 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
invarg
(
"Invalid operstate
\n
"
,
*
argv
);
addattr8
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_OPERSTATE
,
state
);
}
else
if
(
matches
(
*
argv
,
"numtxqueues"
)
==
0
)
{
NEXT_ARG
();
if
(
numtxqueues
!=
-
1
)
duparg
(
"numtxqueues"
,
*
argv
);
if
(
get_integer
(
&
numtxqueues
,
*
argv
,
0
))
invarg
(
"Invalid
\"
numtxqueues
\"
value
\n
"
,
*
argv
);
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_NUM_TX_QUEUES
,
&
numtxqueues
,
4
);
}
else
if
(
matches
(
*
argv
,
"numrxqueues"
)
==
0
)
{
NEXT_ARG
();
if
(
numrxqueues
!=
-
1
)
duparg
(
"numrxqueues"
,
*
argv
);
if
(
get_integer
(
&
numrxqueues
,
*
argv
,
0
))
invarg
(
"Invalid
\"
numrxqueues
\"
value
\n
"
,
*
argv
);
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_NUM_RX_QUEUES
,
&
numrxqueues
,
4
);
}
else
{
if
(
strcmp
(
*
argv
,
"dev"
)
==
0
)
{
NEXT_ARG
();
...
...
man/man8/ip-link.8.in
View file @
d992f3e6
...
...
@@ -40,6 +40,11 @@ ip-link \- network device configuration
.RB "[ " mtu
.IR MTU " ]"
.br
.RB "[ " numtxqueues
.IR QUEUE_COUNT " ]"
.RB "[ " numrxqueues
.IR QUEUE_COUNT " ]"
.br
.BR type " TYPE"
.RI "[ " ARGS " ]"
...
...
@@ -156,6 +161,14 @@ Link types:
- Ethernet Bridge device
.in -8
.TP
.BI numtxqueues " QUEUE_COUNT "
specifies the number of transmit queues for new device.
.TP
.BI numrxqueues " QUEUE_COUNT "
specifies the number of receive queues for new device.
.SS ip link delete - delete virtual link
.I DEVICE
specifies the virtual device to act operate on.
...
...
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