netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net_sched: Adjust qdisc_change() for command "#tc qdisc change/replace ..."
@ 2014-03-06 13:08 Yang Yingliang
  2014-03-06 13:08 ` [PATCH net-next 1/5] net_sched: add flag parameter in qdisc_change Yang Yingliang
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Yang Yingliang @ 2014-03-06 13:08 UTC (permalink / raw)
  To: davem, netdev; +Cc: stephen, eric.dumazet

Current commands "#tc qdisc replace..." and "#tc qdisc change..."
are not doing what they're supposed to do.

E.g.

With "#tc qdisc replace ...", it won't clear old option if not specified in
qdisc of netem.

   # tc qdisc add dev eth4 handle 1: root netem rate 10mbit
   # tc qdisc show
     qdisc netem 1: dev eth4 root refcnt 2 limit 1000 rate 10Mbit

   # tc qdisc replace dev eth4 handle 1: root netem latency 10ms
   # tc qdisc show
     qdisc netem 1: dev eth4 root refcnt 2 limit 1000 delay 10.0ms rate 10Mbit
The old option "rate" is still there.

With "#tc qdisc change ... ", it will clear old options if not specified in
qdisc of tbf.

  # tc qdisc add dev eth4 handle 1: root tbf rate 10mbit burst 10kb latency 50ms mtu 64kb peakrate 20mbit
  # tc qdisc show
    qdisc tbf 1: dev eth4 root refcnt 2 rate 10Mbit burst 10Kb peakrate 20Mbit minburst 64Kb lat 50.0ms
  # tc qdisc change dev eth4 handle 1: root tbf rate 20mbit burst 10kb latency 50ms
  # tc qdisc show
    qdisc tbf 1: dev eth4 root refcnt 2 rate 20Mbit burst 10Kb lat 50.0ms
The old peakrate and minburst are cleared.

This patchset adds a flag parameter in qdisc_change and a replace func in struct Qdisc_ops.
If the flag has NLM_F_REPLACE, we call the replace function, or call the change function in
qdisc_change(). And, add tbf_replace() and netem_replace() needed by tbf and netem.

Yang Yingliang (5):
  net_sched: add flag parameter in qdisc_change
  net_sched: add replace func in struct Qdisc_ops
  sch_tbf: change name "tbf_change" to "tbf_replace"
  sch_tbf: add tbf_change for #tc qdisc change ...
  sch_netem: add netem_replace for #tc qdisc replace ...

 include/net/sch_generic.h |   1 +
 net/sched/sch_api.c       |  16 ++++--
 net/sched/sch_netem.c     | 127 ++++++++++++++++++++++++++++++++++++++++++++++
 net/sched/sch_tbf.c       | 120 ++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 258 insertions(+), 6 deletions(-)

-- 
1.8.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-03-07  2:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 13:08 [PATCH net-next 0/5] net_sched: Adjust qdisc_change() for command "#tc qdisc change/replace ..." Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 1/5] net_sched: add flag parameter in qdisc_change Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 2/5] net_sched: add replace func in struct Qdisc_ops Yang Yingliang
2014-03-06 14:55   ` Eric Dumazet
2014-03-07  2:13     ` Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 3/5] sch_tbf: change name "tbf_change" to "tbf_replace" Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 4/5] sch_tbf: add tbf_change for #tc qdisc change Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 5/5] sch_netem: add netem_replace for #tc qdisc replace Yang Yingliang
2014-03-06 13:16 ` [PATCH net-next 0/5] net_sched: Adjust qdisc_change() for command "#tc qdisc change/replace ..." Hagen Paul Pfeifer
2014-03-07  2:16   ` Yang Yingliang
2014-03-06 21:08 ` Hiroaki SHIMODA
2014-03-07  2:29   ` Yang Yingliang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).