netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<jhs@mojatatu.com>, <xiyou.wangcong@gmail.com>,
	<jiri@resnulli.us>, <weiyongjun1@huawei.com>,
	<yuehaibing@huawei.com>
Subject: Re: [PATCH -next] net: sched: sch_skbprio: add support for qlen statistics of each priority in sch_skbprio
Date: Fri, 26 Aug 2022 19:46:16 -0700	[thread overview]
Message-ID: <20220826194616.37abfe9e@kernel.org> (raw)
In-Reply-To: <20220825102745.70728-1-shaozhengchao@huawei.com>

On Thu, 25 Aug 2022 18:27:45 +0800 Zhengchao Shao wrote:
> diff --git a/net/sched/sch_skbprio.c b/net/sched/sch_skbprio.c
> index 7a5e4c454715..fe2bb7bf9d2a 100644
> --- a/net/sched/sch_skbprio.c
> +++ b/net/sched/sch_skbprio.c
> @@ -83,6 +83,7 @@ static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,
>  		__skb_queue_tail(qdisc, skb);

The skb queue called "qdisc" here (confusingly) already maintains 
a length (also called qlen). Can we just access that variable instead
of maintaining the same value manually?

>  		qdisc_qstats_backlog_inc(sch, skb);
>  		q->qstats[prio].backlog += qdisc_pkt_len(skb);
> +		q->qstats[prio].qlen++;


  reply	other threads:[~2022-08-27  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 10:27 [PATCH -next] net: sched: sch_skbprio: add support for qlen statistics of each priority in sch_skbprio Zhengchao Shao
2022-08-27  2:46 ` Jakub Kicinski [this message]
2022-08-27  4:20   ` shaozhengchao

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=20220826194616.37abfe9e@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=weiyongjun1@huawei.com \
    --cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).