netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Martin Ottens <martin.ottens@fau.de>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/sched: netem: account for backlog updates from child qdisc
Date: Mon, 2 Dec 2024 19:13:12 -0800	[thread overview]
Message-ID: <20241202191312.3d3c8097@kernel.org> (raw)
In-Reply-To: <20241125231825.2586179-1-martin.ottens@fau.de>

On Tue, 26 Nov 2024 00:18:25 +0100 Martin Ottens wrote:
> @@ -702,8 +706,8 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
>  tfifo_dequeue:
>  	skb = __qdisc_dequeue_head(&sch->q);
>  	if (skb) {
> -		qdisc_qstats_backlog_dec(sch, skb);
>  deliver:
> +		qdisc_qstats_backlog_dec(sch, skb);
>  		qdisc_bstats_update(sch, skb);
>  		return skb;
>  	}

Isn't this sort of a change all we need?
I don't understand why we need to perform packet accounting 
in a separate new member (t_len). You seem to fix qlen accounting,
anyway, and I think sch->limit should apply to the qdisc and all
its children. Not just qdisc directly (since most classful qdiscs
don't hold packets).

I'm not a qdisc expert, so if you feel confident about this code you
need to explain the thinking in the commit message..
-- 
pw-bot: cr

  parent reply	other threads:[~2024-12-03  3:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 23:18 [PATCH] net/sched: netem: account for backlog updates from child qdisc Martin Ottens
2024-11-26  0:12 ` Stephen Hemminger
2024-11-26 11:13   ` Martin Ottens
2024-12-03  3:13 ` Jakub Kicinski [this message]
2024-12-04 11:47   ` Martin Ottens
2024-12-04 12:29   ` [PATCH v2] " Martin Ottens
2024-12-05 12:40     ` Jamal Hadi Salim
2024-12-07 16:37       ` Martin Ottens
2024-12-09 21:13         ` Jamal Hadi Salim
2024-12-09 22:44           ` Jamal Hadi Salim

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=20241202191312.3d3c8097@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.ottens@fau.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.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).