netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <stephen@networkplumber.org>, <eric.dumazet@gmail.com>
Subject: [PATCH net-next 3/5] sch_tbf: change name "tbf_change" to "tbf_replace"
Date: Thu, 6 Mar 2014 21:08:39 +0800	[thread overview]
Message-ID: <1394111321-11192-4-git-send-email-yangyingliang@huawei.com> (raw)
In-Reply-To: <1394111321-11192-1-git-send-email-yangyingliang@huawei.com>

tbf_change will clear all options when we change the parameters
that specified in the command line. So it should be "tbf_replace",
then add a new "tbf_change" in next patch for just changing the
parameters.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/sched/sch_tbf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 87a02bfa707b..e9f373effd5f 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -308,7 +308,7 @@ static const struct nla_policy tbf_policy[TCA_TBF_MAX + 1] = {
 	[TCA_TBF_PBURST] = { .type = NLA_U32 },
 };
 
-static int tbf_change(struct Qdisc *sch, struct nlattr *opt)
+static int tbf_replace(struct Qdisc *sch, struct nlattr *opt)
 {
 	int err;
 	struct tbf_sched_data *q = qdisc_priv(sch);
@@ -435,7 +435,7 @@ static int tbf_init(struct Qdisc *sch, struct nlattr *opt)
 	qdisc_watchdog_init(&q->watchdog, sch);
 	q->qdisc = &noop_qdisc;
 
-	return tbf_change(sch, opt);
+	return tbf_replace(sch, opt);
 }
 
 static void tbf_destroy(struct Qdisc *sch)
@@ -560,7 +560,7 @@ static struct Qdisc_ops tbf_qdisc_ops __read_mostly = {
 	.init		=	tbf_init,
 	.reset		=	tbf_reset,
 	.destroy	=	tbf_destroy,
-	.change		=	tbf_change,
+	.replace	=	tbf_replace,
 	.dump		=	tbf_dump,
 	.owner		=	THIS_MODULE,
 };
-- 
1.8.0

  parent reply	other threads:[~2014-03-06 13:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Yang Yingliang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394111321-11192-4-git-send-email-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).