Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	toke@toke.dk, jhs@mojatatu.com, jiri@resnulli.us,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, stephen@networkplumber.org,
	cake@lists.bufferbloat.net, weiyongjun1@huawei.com,
	yuehaibing@huawei.com
Subject: Re: [Cake] [PATCH net-next] net: sched: remove redundant NULL check in change hook function
Date: Sun, 28 Aug 2022 22:36:00 -0700	[thread overview]
Message-ID: <YwxQQOzw/dGKJKyB@pop-os.localdomain> (raw)
In-Reply-To: <20220827014910.215062-1-shaozhengchao@huawei.com>

On Sat, Aug 27, 2022 at 09:49:10AM +0800, Zhengchao Shao wrote:
> Currently, the change function can be called by two ways. The one way is
> that qdisc_change() will call it. Before calling change function,
> qdisc_change() ensures tca[TCA_OPTIONS] is not empty. The other way is
> that .init() will call it. The opt parameter is also checked before
> calling change function in .init(). Therefore, it's no need to check the
> input parameter opt in change function.
> 

Right.. but the one below:

> diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
> index c50a0853dcb9..e23d3dbb7272 100644
> --- a/net/sched/sch_gred.c
> +++ b/net/sched/sch_gred.c
> @@ -413,9 +413,6 @@ static int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps,
>  	bool red_flags_changed;
>  	int i;
>  
> -	if (!dps)
> -		return -EINVAL;
> -

I don't think anyone checks tb[TCA_GRED_DPS]. What you intended to patch
is gred_change(), right?

Thanks.

           reply	other threads:[~2022-08-29  5:36 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220827014910.215062-1-shaozhengchao@huawei.com>]

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

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

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

  git send-email \
    --in-reply-to=YwxQQOzw/dGKJKyB@pop-os.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=toke@toke.dk \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.com \
    /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