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 1/5] net_sched: add flag parameter in qdisc_change
Date: Thu, 6 Mar 2014 21:08:37 +0800	[thread overview]
Message-ID: <1394111321-11192-2-git-send-email-yangyingliang@huawei.com> (raw)
In-Reply-To: <1394111321-11192-1-git-send-email-yangyingliang@huawei.com>

Add a new parameter for checking if it's "change" or "replace".

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

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 1313145e3b86..961cb0f1bd0c 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -993,7 +993,7 @@ err_out4:
 	goto err_out3;
 }
 
-static int qdisc_change(struct Qdisc *sch, struct nlattr **tca)
+static int qdisc_change(struct Qdisc *sch, struct nlattr **tca, u16 flags)
 {
 	struct qdisc_size_table *ostab, *stab = NULL;
 	int err = 0;
@@ -1248,7 +1248,7 @@ replay:
 		return -EEXIST;
 	if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], q->ops->id))
 		return -EINVAL;
-	err = qdisc_change(q, tca);
+	err = qdisc_change(q, tca, n->nlmsg_flags);
 	if (err == 0)
 		qdisc_notify(net, skb, n, clid, NULL, q);
 	return err;
-- 
1.8.0

  reply	other threads:[~2014-03-06 13:08 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 ` Yang Yingliang [this message]
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

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-2-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).