From: Paolo Abeni <pabeni@redhat.com>
To: chia-yu.chang@nokia-bell-labs.com, xandfury@gmail.com,
netdev@vger.kernel.org, dave.taht@gmail.com, jhs@mojatatu.com,
kuba@kernel.org, stephen@networkplumber.org,
xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
edumazet@google.com, horms@kernel.org, andrew+netdev@lunn.ch,
donald.hunter@gmail.com, ast@fiberby.net, liuhangbin@gmail.com,
shuah@kernel.org, linux-kselftest@vger.kernel.org, ij@kernel.org,
ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com,
g.white@cablelabs.com, ingemar.s.johansson@ericsson.com,
mirja.kuehlewind@ericsson.com, cheshire@apple.com,
rs.ietf@gmx.at, Jason_Livingood@comcast.com,
vidhi_goel@apple.com
Cc: Olga Albisser <olga@albisser.org>,
Olivier Tilmans <olivier.tilmans@nokia.com>,
Henrik Steen <henrist@henrist.net>,
Bob Briscoe <research@bobbriscoe.net>
Subject: Re: [PATCH v11 net-next 5/5] sched: Add enqueue/dequeue of dualpi2 qdisc
Date: Tue, 22 Apr 2025 12:21:17 +0200 [thread overview]
Message-ID: <e2921eea-1430-4626-9419-eb04dc2ec23d@redhat.com> (raw)
In-Reply-To: <20250415124317.11561-6-chia-yu.chang@nokia-bell-labs.com>
On 4/15/25 2:43 PM, chia-yu.chang@nokia-bell-labs.com wrote:
> +static struct sk_buff *dualpi2_qdisc_dequeue(struct Qdisc *sch)
> +{
> + struct dualpi2_sched_data *q = qdisc_priv(sch);
> + struct sk_buff *skb;
> + int credit_change;
> + u64 now;
> +
> + now = ktime_get_ns();
> +
> + while ((skb = dequeue_packet(sch, q, &credit_change, now))) {
> + if (!q->drop_early && must_drop(sch, q, skb)) {
> + drop_and_retry(q, skb, sch,
> + SKB_DROP_REASON_QDISC_CONGESTED);
> + continue;
> + }
> +
> + if (skb_in_l_queue(skb) && do_step_aqm(q, skb, now)) {
> + qdisc_qstats_drop(q->l_queue);
> + drop_and_retry(q, skb, sch,
> + SKB_DROP_REASON_DUALPI2_STEP_DROP);
> + continue;
> + }
> +
> + q->c_protection.credit += credit_change;
> + qdisc_bstats_update(sch, skb);
> + break;
> + }
> +
> + /* We cannot call qdisc_tree_reduce_backlog() if our qlen is 0,
> + * or HTB crashes.
> + */
> + if (q->deferred_drops.cnt && qdisc_qlen(sch)) {
Since commit cd23e77e6568abfac6354dd3f69d5b154e60e342 the qdisc_qlen()
check is not needed anymore.
/P
next prev parent reply other threads:[~2025-04-22 10:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 12:43 [PATCH v11 net-next 0/5] DUALPI2 patch chia-yu.chang
2025-04-15 12:43 ` [PATCH v11 net-next 1/5] Documentation: netlink: specs: tc: Add DualPI2 specification chia-yu.chang
2025-04-22 9:53 ` Paolo Abeni
2025-04-22 15:30 ` Chia-Yu Chang (Nokia)
2025-04-15 12:43 ` [PATCH v11 net-next 2/5] selftests/tc-testing: Add selftests for qdisc DualPI2 chia-yu.chang
2025-04-16 13:52 ` Jakub Kicinski
2025-04-16 14:00 ` Victor Nogueira
2025-04-16 22:19 ` Jakub Kicinski
2025-04-17 0:18 ` Victor Nogueira
2025-04-15 12:43 ` [PATCH v11 net-next 3/5] sched: Struct definition and parsing of dualpi2 qdisc chia-yu.chang
2025-04-22 10:07 ` Paolo Abeni
2025-04-22 15:28 ` Chia-Yu Chang (Nokia)
2025-04-15 12:43 ` [PATCH v11 net-next 4/5] sched: Dump configuration and statistics " chia-yu.chang
2025-04-15 12:43 ` [PATCH v11 net-next 5/5] sched: Add enqueue/dequeue " chia-yu.chang
2025-04-22 10:21 ` Paolo Abeni [this message]
2025-04-15 14:58 ` [PATCH v11 net-next 0/5] DUALPI2 patch Jakub Kicinski
2025-04-15 15:05 ` Chia-Yu Chang (Nokia)
2025-04-15 15:35 ` Jakub Kicinski
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=e2921eea-1430-4626-9419-eb04dc2ec23d@redhat.com \
--to=pabeni@redhat.com \
--cc=Jason_Livingood@comcast.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@fiberby.net \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=dave.taht@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=henrist@henrist.net \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mirja.kuehlewind@ericsson.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=olga@albisser.org \
--cc=olivier.tilmans@nokia.com \
--cc=research@bobbriscoe.net \
--cc=rs.ietf@gmx.at \
--cc=shuah@kernel.org \
--cc=stephen@networkplumber.org \
--cc=vidhi_goel@apple.com \
--cc=xandfury@gmail.com \
--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