From patchwork Thu Mar 6 13:08:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 327427 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 91D282C0324 for ; Fri, 7 Mar 2014 00:10:10 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751197AbaCFNKE (ORCPT ); Thu, 6 Mar 2014 08:10:04 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:62587 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbaCFNKC (ORCPT ); Thu, 6 Mar 2014 08:10:02 -0500 Received: from 172.24.2.119 (EHLO szxeml213-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BQS33740; Thu, 06 Mar 2014 21:09:58 +0800 (CST) Received: from SZXEML416-HUB.china.huawei.com (10.82.67.155) by szxeml213-edg.china.huawei.com (172.24.2.30) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 6 Mar 2014 21:08:47 +0800 Received: from localhost (10.177.18.231) by szxeml416-hub.china.huawei.com (10.82.67.155) with Microsoft SMTP Server id 14.3.158.1; Thu, 6 Mar 2014 21:08:44 +0800 From: Yang Yingliang To: , CC: , Subject: [PATCH net-next 3/5] sch_tbf: change name "tbf_change" to "tbf_replace" Date: Thu, 6 Mar 2014 21:08:39 +0800 Message-ID: <1394111321-11192-4-git-send-email-yangyingliang@huawei.com> X-Mailer: git-send-email 1.8.1.msysgit.1 In-Reply-To: <1394111321-11192-1-git-send-email-yangyingliang@huawei.com> References: <1394111321-11192-1-git-send-email-yangyingliang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.18.231] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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, };