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
c5e3ee2c
Commit
c5e3ee2c
authored
Sep 03, 2013
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into net-next-3.11
parents
b1d0525f
d3c77c46
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
106 additions
and
45 deletions
+106
-45
bridge/fdb.c
bridge/fdb.c
+3
-1
doc/ip-cref.tex
doc/ip-cref.tex
+9
-7
include/SNAPSHOT.h
include/SNAPSHOT.h
+1
-1
include/linux/pkt_sched.h
include/linux/pkt_sched.h
+9
-1
ip/iplink_macvlan.c
ip/iplink_macvlan.c
+1
-1
ip/ipmonitor.c
ip/ipmonitor.c
+10
-2
ip/ipnetns.c
ip/ipnetns.c
+10
-6
ip/ipntable.c
ip/ipntable.c
+1
-1
ip/iproute.c
ip/iproute.c
+2
-2
ip/iptunnel.c
ip/iptunnel.c
+1
-1
ip/ipxfrm.c
ip/ipxfrm.c
+1
-1
ip/link_iptnl.c
ip/link_iptnl.c
+1
-1
ip/link_veth.c
ip/link_veth.c
+2
-3
man/man8/ip-route.8.in
man/man8/ip-route.8.in
+3
-1
tc/m_ipt.c
tc/m_ipt.c
+1
-1
tc/m_mirred.c
tc/m_mirred.c
+4
-4
tc/m_police.c
tc/m_police.c
+5
-0
tc/m_xt.c
tc/m_xt.c
+1
-1
tc/m_xt_old.c
tc/m_xt_old.c
+1
-1
tc/q_cbq.c
tc/q_cbq.c
+5
-0
tc/q_htb.c
tc/q_htb.c
+5
-0
tc/q_tbf.c
tc/q_tbf.c
+5
-0
tc/tc_core.c
tc/tc_core.c
+16
-0
tc/tc_qdisc.c
tc/tc_qdisc.c
+9
-9
No files found.
bridge/fdb.c
View file @
c5e3ee2c
...
...
@@ -30,7 +30,7 @@ int filter_index;
static
void
usage
(
void
)
{
fprintf
(
stderr
,
"Usage: bridge fdb { add | append | del } ADDR dev DEV {self|master} [ temp ]
\n
"
fprintf
(
stderr
,
"Usage: bridge fdb { add | append | del
| replace
} ADDR dev DEV {self|master} [ temp ]
\n
"
" [router] [ dst IPADDR] [ vlan VID ]
\n
"
" [ port PORT] [ vni VNI ] [via DEV]
\n
"
);
fprintf
(
stderr
,
" bridge fdb {show} [ dev DEV ]
\n
"
);
...
...
@@ -334,6 +334,8 @@ int do_fdb(int argc, char **argv)
return
fdb_modify
(
RTM_NEWNEIGH
,
NLM_F_CREATE
|
NLM_F_EXCL
,
argc
-
1
,
argv
+
1
);
if
(
matches
(
*
argv
,
"append"
)
==
0
)
return
fdb_modify
(
RTM_NEWNEIGH
,
NLM_F_CREATE
|
NLM_F_APPEND
,
argc
-
1
,
argv
+
1
);
if
(
matches
(
*
argv
,
"replace"
)
==
0
)
return
fdb_modify
(
RTM_NEWNEIGH
,
NLM_F_CREATE
|
NLM_F_REPLACE
,
argc
-
1
,
argv
+
1
);
if
(
matches
(
*
argv
,
"delete"
)
==
0
)
return
fdb_modify
(
RTM_DELNEIGH
,
0
,
argc
-
1
,
argv
+
1
);
if
(
matches
(
*
argv
,
"show"
)
==
0
||
...
...
doc/ip-cref.tex
View file @
c5e3ee2c
...
...
@@ -2542,13 +2542,15 @@ Namely,
the
\verb
|monitor| command is the first in the command line and then
the object list follows:
\begin
{
verbatim
}
ip monitor
[
file FILE
]
[
all | OBJECT
-
LIST
]
\end
{
verbatim
}
\verb
|OBJECT
-
LIST| is the list of object types that we want to monitor.
It may contain
\verb
|link|,
\verb
|address| and
\verb
|route|.
If no
\verb
|file| argument is given,
\verb
|ip| opens RTNETLINK,
listens on it and dumps state changes in the format described
in previous sections.
ip monitor
[
file FILE
]
[
all | OBJECT
-
LIST
]
[
label
]
\end
{
verbatim
}
\verb
|OBJECT
-
LIST| is the list of object types that we want to
monitor. It may contain
\verb
|link|,
\verb
|address| and
\verb
|route|.
Specifying
\verb
|label| indicates that output lines should be labelled
with the type of object being printed
---
this happens by default if
\verb
|all| is specified. If no
\verb
|file| argument is given,
\verb
|ip| opens RTNETLINK, listens on it and dumps state changes in
the format described in previous sections.
If a file name is given, it does not listen on RTNETLINK,
but opens the file containing RTNETLINK messages saved in binary format
...
...
include/SNAPSHOT.h
View file @
c5e3ee2c
static
const
char
SNAPSHOT
[]
=
"130
716
"
;
static
const
char
SNAPSHOT
[]
=
"130
903
"
;
include/linux/pkt_sched.h
View file @
c5e3ee2c
...
...
@@ -73,9 +73,17 @@ struct tc_estimator {
#define TC_H_ROOT (0xFFFFFFFFU)
#define TC_H_INGRESS (0xFFFFFFF1U)
/* Need to corrospond to iproute2 tc/tc_core.h "enum link_layer" */
enum
tc_link_layer
{
TC_LINKLAYER_UNAWARE
,
/* Indicate unaware old iproute2 util */
TC_LINKLAYER_ETHERNET
,
TC_LINKLAYER_ATM
,
};
#define TC_LINKLAYER_MASK 0x0F
/* limit use to lower 4 bits */
struct
tc_ratespec
{
unsigned
char
cell_log
;
unsigned
char
__reserved
;
__u8
linklayer
;
/* lower 4 bits */
unsigned
short
overhead
;
short
cell_align
;
unsigned
short
mpu
;
...
...
ip/iplink_macvlan.c
View file @
c5e3ee2c
...
...
@@ -79,7 +79,7 @@ static void macvlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]
RTA_PAYLOAD
(
tb
[
IFLA_MACVLAN_MODE
])
<
sizeof
(
__u32
))
return
;
mode
=
rta_getattr_u32
(
tb
[
IFLA_
VLAN_ID
]);
mode
=
rta_getattr_u32
(
tb
[
IFLA_
MACVLAN_MODE
]);
fprintf
(
f
,
" mode %s "
,
mode
==
MACVLAN_MODE_PRIVATE
?
"private"
:
mode
==
MACVLAN_MODE_VEPA
?
"vepa"
...
...
ip/ipmonitor.c
View file @
c5e3ee2c
...
...
@@ -29,14 +29,13 @@ int prefix_banner;
static
void
usage
(
void
)
{
fprintf
(
stderr
,
"Usage: ip monitor [ all | LISTofOBJECTS ] [ FILE ]
\n
"
);
fprintf
(
stderr
,
"Usage: ip monitor [ all | LISTofOBJECTS ] [ FILE ]
[ label ]
\n
"
);
fprintf
(
stderr
,
"LISTofOBJECTS := link | address | route | mroute | prefix |
\n
"
);
fprintf
(
stderr
,
" neigh | netconf
\n
"
);
fprintf
(
stderr
,
"FILE := file FILENAME
\n
"
);
exit
(
-
1
);
}
static
int
accept_msg
(
const
struct
sockaddr_nl
*
who
,
struct
nlmsghdr
*
n
,
void
*
arg
)
{
...
...
@@ -88,6 +87,13 @@ static int accept_msg(const struct sockaddr_nl *who,
}
if
(
n
->
nlmsg_type
==
RTM_NEWNEIGH
||
n
->
nlmsg_type
==
RTM_DELNEIGH
||
n
->
nlmsg_type
==
RTM_GETNEIGH
)
{
if
(
preferred_family
)
{
struct
ndmsg
*
r
=
NLMSG_DATA
(
n
);
if
(
r
->
ndm_family
!=
preferred_family
)
return
0
;
}
if
(
prefix_banner
)
fprintf
(
fp
,
"[NEIGH]"
);
print_neigh
(
who
,
n
,
arg
);
...
...
@@ -157,6 +163,8 @@ int do_ipmonitor(int argc, char **argv)
if
(
matches
(
*
argv
,
"file"
)
==
0
)
{
NEXT_ARG
();
file
=
*
argv
;
}
else
if
(
matches
(
*
argv
,
"label"
)
==
0
)
{
prefix_banner
=
1
;
}
else
if
(
matches
(
*
argv
,
"link"
)
==
0
)
{
llink
=
1
;
groups
=
0
;
...
...
ip/ipnetns.c
View file @
c5e3ee2c
...
...
@@ -167,7 +167,7 @@ static int netns_exec(int argc, char **argv)
fprintf
(
stderr
,
"unshare failed: %s
\n
"
,
strerror
(
errno
));
return
-
1
;
}
/* Don't let any mounts prop
o
gate back to the parent */
/* Don't let any mounts prop
a
gate back to the parent */
if
(
mount
(
""
,
"/"
,
"none"
,
MS_SLAVE
|
MS_REC
,
NULL
))
{
fprintf
(
stderr
,
"
\"
mount --make-rslave /
\"
failed: %s
\n
"
,
strerror
(
errno
));
...
...
@@ -205,11 +205,15 @@ static int netns_exec(int argc, char **argv)
exit
(
1
);
}
/* If child failed, propogate status */
if
(
WIFEXITED
(
status
))
exit
(
WEXITSTATUS
(
status
));
if
(
WIFEXITED
(
status
))
{
/* ip must return the status of the child,
* but do_cmd() will add a minus to this,
* so let's add another one here to cancel it.
*/
return
-
WEXITSTATUS
(
status
);
}
return
0
;
exit
(
1
)
;
}
}
...
...
@@ -405,7 +409,7 @@ static int netns_add(int argc, char **argv)
/* Create the base netns directory if it doesn't exist */
mkdir
(
NETNS_RUN_DIR
,
S_IRWXU
|
S_IRGRP
|
S_IXGRP
|
S_IROTH
|
S_IXOTH
);
/* Make it possible for network namespace mounts to prop
o
gate between
/* Make it possible for network namespace mounts to prop
a
gate between
* mount namespaces. This makes it likely that a unmounting a network
* namespace file in one namespace will unmount the network namespace
* file in all namespaces allowing the network namespace to be freed
...
...
ip/ipntable.c
View file @
c5e3ee2c
...
...
@@ -305,7 +305,7 @@ static int ipntable_modify(int cmd, int flags, int argc, char **argv)
if
(
!
namep
)
missarg
(
"NAME"
);
if
(
!
threshsp
&&
!
gc_intp
&&
!
parms_change
)
{
fprintf
(
stderr
,
"Not enough information: changable attributes required.
\n
"
);
fprintf
(
stderr
,
"Not enough information: chang
e
able attributes required.
\n
"
);
exit
(
-
1
);
}
...
...
ip/iproute.c
View file @
c5e3ee2c
...
...
@@ -76,7 +76,7 @@ static void usage(void)
fprintf
(
stderr
,
"INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]...
\n
"
);
fprintf
(
stderr
,
"NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS
\n
"
);
fprintf
(
stderr
,
"OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]
\n
"
);
fprintf
(
stderr
,
" [ rtt TIME ] [ rttvar TIME ] [reordering NUMBER ]
\n
"
);
fprintf
(
stderr
,
" [ rtt TIME ] [ rttvar TIME ] [
reordering NUMBER ]
\n
"
);
fprintf
(
stderr
,
" [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]
\n
"
);
fprintf
(
stderr
,
" [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]
\n
"
);
fprintf
(
stderr
,
" [ rto_min TIME ] [ hoplimit NUMBER ] [ initrwnd NUMBER ]
\n
"
);
...
...
ip/iptunnel.c
View file @
c5e3ee2c
...
...
@@ -280,7 +280,7 @@ static int do_add(int cmd, int argc, char **argv)
return
-
1
;
if
(
p
.
iph
.
ttl
&&
p
.
iph
.
frag_off
==
0
)
{
fprintf
(
stderr
,
"ttl != 0 and nop
tm
udisc are incompatible
\n
"
);
fprintf
(
stderr
,
"ttl != 0 and nop
mt
udisc are incompatible
\n
"
);
return
-
1
;
}
...
...
ip/ipxfrm.c
View file @
c5e3ee2c
...
...
@@ -856,7 +856,7 @@ void xfrm_state_info_print(struct xfrm_usersa_info *xsinfo,
if
(
flags
)
fprintf
(
fp
,
"%x"
,
flags
);
}
if
(
show_stats
>
0
||
tb
[
XFRMA_SA_EXTRA_FLAGS
])
{
if
(
show_stats
>
0
&&
tb
[
XFRMA_SA_EXTRA_FLAGS
])
{
__u32
extra_flags
=
*
(
__u32
*
)
RTA_DATA
(
tb
[
XFRMA_SA_EXTRA_FLAGS
]);
fprintf
(
fp
,
"extra_flag "
);
...
...
ip/link_iptnl.c
View file @
c5e3ee2c
...
...
@@ -233,7 +233,7 @@ get_failed:
}
if
(
ttl
&&
pmtudisc
==
0
)
{
fprintf
(
stderr
,
"ttl != 0 and nop
tm
udisc are incompatible
\n
"
);
fprintf
(
stderr
,
"ttl != 0 and nop
mt
udisc are incompatible
\n
"
);
exit
(
-
1
);
}
...
...
ip/link_veth.c
View file @
c5e3ee2c
...
...
@@ -19,9 +19,8 @@
static
void
usage
(
void
)
{
printf
(
"Usage: ip link <options> type veth "
"[peer <options>]
\n
To get <options> type "
"'ip link add help'
\n
"
);
printf
(
"Usage: ip link <options> type veth [peer <options>]
\n
"
"To get <options> type 'ip link add help'
\n
"
);
}
static
int
veth_parse_opt
(
struct
link_util
*
lu
,
int
argc
,
char
**
argv
,
...
...
man/man8/ip-route.8.in
View file @
c5e3ee2c
...
...
@@ -97,6 +97,8 @@ replace " } "
.IR TIME " ] [ "
.B rttvar
.IR TIME " ] [ "
.B reordering
.IR NUMBER " ] [ "
.B window
.IR NUMBER " ] [ "
.B cwnd
...
...
@@ -110,7 +112,7 @@ replace " } "
.B initcwnd
.IR NUMBER " ] [ "
.B initrwnd
.IR NUMBER " ]"
.IR NUMBER " ]
[
"
.B quickack
.IR BOOL " ]"
...
...
tc/m_ipt.c
View file @
c5e3ee2c
...
...
@@ -415,7 +415,7 @@ static int parse_ipt(struct action_util *a,int *argc_p,
}
if
(
argc
<=
2
)
{
fprintf
(
stderr
,
"bad argu
e
ments to ipt %d vs %d
\n
"
,
argc
,
rargc
);
fprintf
(
stderr
,
"bad arguments to ipt %d vs %d
\n
"
,
argc
,
rargc
);
return
-
1
;
}
...
...
tc/m_mirred.c
View file @
c5e3ee2c
...
...
@@ -105,7 +105,7 @@ parse_egress(struct action_util *a, int *argc_p, char ***argv_p,
}
else
if
(
!
mirror
&&
matches
(
*
argv
,
"mirror"
)
==
0
)
{
mirror
=
1
;
if
(
redir
)
{
fprintf
(
stderr
,
"Cant have both mirror and redir
\n
"
);
fprintf
(
stderr
,
"Can
'
t have both mirror and redir
\n
"
);
return
-
1
;
}
p
.
eaction
=
TCA_EGRESS_MIRROR
;
...
...
@@ -114,7 +114,7 @@ parse_egress(struct action_util *a, int *argc_p, char ***argv_p,
}
else
if
(
!
redir
&&
matches
(
*
argv
,
"redirect"
)
==
0
)
{
redir
=
1
;
if
(
mirror
)
{
fprintf
(
stderr
,
"Cant have both mirror and redir
\n
"
);
fprintf
(
stderr
,
"Can
'
t have both mirror and redir
\n
"
);
return
-
1
;
}
p
.
eaction
=
TCA_EGRESS_REDIR
;
...
...
@@ -215,14 +215,14 @@ parse_mirred(struct action_util *a, int *argc_p, char ***argv_p,
char
**
argv
=
*
argv_p
;
if
(
argc
<
0
)
{
fprintf
(
stderr
,
"mirred bad argu
e
ment count %d
\n
"
,
argc
);
fprintf
(
stderr
,
"mirred bad argument count %d
\n
"
,
argc
);
return
-
1
;
}
if
(
matches
(
*
argv
,
"mirred"
)
==
0
)
{
NEXT_ARG
();
}
else
{
fprintf
(
stderr
,
"mirred bad argu
e
ment %s
\n
"
,
*
argv
);
fprintf
(
stderr
,
"mirred bad argument %s
\n
"
,
*
argv
);
return
-
1
;
}
...
...
tc/m_police.c
View file @
c5e3ee2c
...
...
@@ -322,9 +322,11 @@ int
print_police
(
struct
action_util
*
a
,
FILE
*
f
,
struct
rtattr
*
arg
)
{
SPRINT_BUF
(
b1
);
SPRINT_BUF
(
b2
);
struct
tc_police
*
p
;
struct
rtattr
*
tb
[
TCA_POLICE_MAX
+
1
];
unsigned
buffer
;
unsigned
int
linklayer
;
if
(
arg
==
NULL
)
return
0
;
...
...
@@ -360,6 +362,9 @@ print_police(struct action_util *a, FILE *f, struct rtattr *arg)
}
else
fprintf
(
f
,
" "
);
fprintf
(
f
,
"overhead %ub "
,
p
->
rate
.
overhead
);
linklayer
=
(
p
->
rate
.
linklayer
&
TC_LINKLAYER_MASK
);
if
(
linklayer
>
TC_LINKLAYER_ETHERNET
||
show_details
)
fprintf
(
f
,
"linklayer %s "
,
sprint_linklayer
(
linklayer
,
b2
));
fprintf
(
f
,
"
\n
ref %d bind %d
\n
"
,
p
->
refcnt
,
p
->
bindcnt
);
return
0
;
...
...
tc/m_xt.c
View file @
c5e3ee2c
...
...
@@ -147,7 +147,7 @@ static int parse_ipt(struct action_util *a,int *argc_p,
}
if
(
argc
<=
2
)
{
fprintf
(
stderr
,
"bad argu
e
ments to ipt %d vs %d
\n
"
,
argc
,
rargc
);
fprintf
(
stderr
,
"bad arguments to ipt %d vs %d
\n
"
,
argc
,
rargc
);
return
-
1
;
}
...
...
tc/m_xt_old.c
View file @
c5e3ee2c
...
...
@@ -232,7 +232,7 @@ static int parse_ipt(struct action_util *a,int *argc_p,
}
if
(
argc
<=
2
)
{
fprintf
(
stderr
,
"bad argu
e
ments to ipt %d vs %d
\n
"
,
argc
,
rargc
);
fprintf
(
stderr
,
"bad arguments to ipt %d vs %d
\n
"
,
argc
,
rargc
);
return
-
1
;
}
...
...
tc/q_cbq.c
View file @
c5e3ee2c
...
...
@@ -442,7 +442,9 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
struct
tc_cbq_wrropt
*
wrr
=
NULL
;
struct
tc_cbq_fopt
*
fopt
=
NULL
;
struct
tc_cbq_ovl
*
ovl
=
NULL
;
unsigned
int
linklayer
;
SPRINT_BUF
(
b1
);
SPRINT_BUF
(
b2
);
if
(
opt
==
NULL
)
return
0
;
...
...
@@ -486,6 +488,9 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
char
buf
[
64
];
print_rate
(
buf
,
sizeof
(
buf
),
r
->
rate
);
fprintf
(
f
,
"rate %s "
,
buf
);
linklayer
=
(
r
->
linklayer
&
TC_LINKLAYER_MASK
);
if
(
linklayer
>
TC_LINKLAYER_ETHERNET
||
show_details
)
fprintf
(
f
,
"linklayer %s "
,
sprint_linklayer
(
linklayer
,
b2
));
if
(
show_details
)
{
fprintf
(
f
,
"cell %ub "
,
1
<<
r
->
cell_log
);
if
(
r
->
mpu
)
...
...
tc/q_htb.c
View file @
c5e3ee2c
...
...
@@ -244,9 +244,11 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
struct
tc_htb_opt
*
hopt
;
struct
tc_htb_glob
*
gopt
;
double
buffer
,
cbuffer
;
unsigned
int
linklayer
;
SPRINT_BUF
(
b1
);
SPRINT_BUF
(
b2
);
SPRINT_BUF
(
b3
);
SPRINT_BUF
(
b4
);
if
(
opt
==
NULL
)
return
0
;
...
...
@@ -268,6 +270,9 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
buffer
=
tc_calc_xmitsize
(
hopt
->
rate
.
rate
,
hopt
->
buffer
);
fprintf
(
f
,
"ceil %s "
,
sprint_rate
(
hopt
->
ceil
.
rate
,
b1
));
cbuffer
=
tc_calc_xmitsize
(
hopt
->
ceil
.
rate
,
hopt
->
cbuffer
);
linklayer
=
(
hopt
->
rate
.
linklayer
&
TC_LINKLAYER_MASK
);
if
(
linklayer
>
TC_LINKLAYER_ETHERNET
||
show_details
)
fprintf
(
f
,
"linklayer %s "
,
sprint_linklayer
(
linklayer
,
b4
));
if
(
show_details
)
{
fprintf
(
f
,
"burst %s/%u mpu %s overhead %s "
,
sprint_size
(
buffer
,
b1
),
...
...
tc/q_tbf.c
View file @
c5e3ee2c
...
...
@@ -239,10 +239,12 @@ static int tbf_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
{
struct
rtattr
*
tb
[
TCA_TBF_PTAB
+
1
];
struct
tc_tbf_qopt
*
qopt
;
unsigned
int
linklayer
;
double
buffer
,
mtu
;
double
latency
;
SPRINT_BUF
(
b1
);
SPRINT_BUF
(
b2
);
SPRINT_BUF
(
b3
);
if
(
opt
==
NULL
)
return
0
;
...
...
@@ -294,6 +296,9 @@ static int tbf_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if
(
qopt
->
rate
.
overhead
)
{
fprintf
(
f
,
"overhead %d"
,
qopt
->
rate
.
overhead
);
}
linklayer
=
(
qopt
->
rate
.
linklayer
&
TC_LINKLAYER_MASK
);
if
(
linklayer
>
TC_LINKLAYER_ETHERNET
||
show_details
)
fprintf
(
f
,
"linklayer %s "
,
sprint_linklayer
(
linklayer
,
b3
));
return
0
;
}
...
...
tc/tc_core.c
View file @
c5e3ee2c
...
...
@@ -102,6 +102,21 @@ static unsigned tc_adjust_size(unsigned sz, unsigned mpu, enum link_layer linkla
}
}
/* Notice, the rate table calculated here, have gotten replaced in the
* kernel and is no-longer used for lookups.
*
* This happened in kernel release v3.8 caused by kernel
* - commit 56b765b79 ("htb: improved accuracy at high rates").
* This change unfortunately caused breakage of tc overhead and
* linklayer parameters.
*
* Kernel overhead handling got fixed in kernel v3.10 by
* - commit 01cb71d2d47 (net_sched: restore "overhead xxx" handling)
*
* Kernel linklayer handling got fixed in kernel v3.11 by
* - commit 8a8e3d84b17 (net_sched: restore "linklayer atm" handling)
*/
/*
rtab[pkt_len>>cell_log] = pkt_xmit_time
*/
...
...
@@ -131,6 +146,7 @@ int tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab,
r
->
cell_align
=-
1
;
// Due to the sz calc
r
->
cell_log
=
cell_log
;
r
->
linklayer
=
(
linklayer
&
TC_LINKLAYER_MASK
);
return
cell_log
;
}
...
...
tc/tc_qdisc.c
View file @
c5e3ee2c
...
...
@@ -137,6 +137,7 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
if
(
est
.
ewma_log
)
addattr_l
(
&
req
.
n
,
sizeof
(
req
),
TCA_RATE
,
&
est
,
sizeof
(
est
));
if
(
argc
)
{
if
(
q
)
{
if
(
!
q
->
parse_qopt
)
{
fprintf
(
stderr
,
"qdisc '%s' does not support option parsing
\n
"
,
k
);
...
...
@@ -145,7 +146,6 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
if
(
q
->
parse_qopt
(
q
,
argc
,
argv
,
&
req
.
n
))
return
1
;
}
else
{
if
(
argc
)
{
if
(
matches
(
*
argv
,
"help"
)
==
0
)
usage
();
...
...
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