From: Paolo Abeni <pabeni@redhat.com>
To: chia-yu.chang@nokia-bell-labs.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 v9 net-next 3/3] sched: Add dualpi2 qdisc
Date: Fri, 21 Mar 2025 22:08:13 +0100 [thread overview]
Message-ID: <26f2f366-aa14-4879-978a-58d46f9d83a4@redhat.com> (raw)
In-Reply-To: <20250316152717.20848-4-chia-yu.chang@nokia-bell-labs.com>
On 3/16/25 4:27 PM, chia-yu.chang@nokia-bell-labs.com wrote:
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 0dbfe069a6e3..987686e91919 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -30,6 +30,7 @@
> #include <asm/byteorder.h>
> #include <asm/local.h>
>
> +#include <linux/netdev_features.h>
> #include <linux/percpu.h>
> #include <linux/rculist.h>
> #include <linux/workqueue.h>
I guess this chunck is a left-over... in any case it should be dropped.
[...]
> +struct dualpi2_sched_data {
> + struct Qdisc *l_queue; /* The L4S Low latency queue (L-queue) */
> + struct Qdisc *sch; /* The Classic queue (C-queue) */
> +
> + /* Registered tc filters */
> + struct {
> + struct tcf_proto __rcu *filters;
> + struct tcf_block *block;
> + } tcf;
This usage of anonimous struct is quite unconventional, the preferred
way of scoping fields is to add apprepriate prefix to the field name.
[...]
> +static bool must_drop(struct Qdisc *sch, struct dualpi2_sched_data *q,
> + struct sk_buff *skb)
> +{
> + u64 local_l_prob;
> + u32 prob;
> + bool overload;
Please respect the reverse christmas tree order in variable declaration
(many other occurrences below).
[...]
> +static void drop_and_retry(struct dualpi2_sched_data *q, struct sk_buff *skb,
> + struct Qdisc *sch)
> +{
> + ++q->deferred_drops.cnt;
> + q->deferred_drops.len += qdisc_pkt_len(skb);
> + consume_skb(skb);
Possibly you want to use kfree_skb_reason() here.
I think this patch is still too huge to get a reasonable review. You
should try to split it further, e.g. struct definition and parsing in
pX, dump in pX+1, enqueue related ops in p+2, ...
Thanks,
Paolo
prev parent reply other threads:[~2025-03-21 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-16 15:27 [PATCH v9 net-next 0/3] DUALPI2 patch chia-yu.chang
2025-03-16 15:27 ` [PATCH v9 net-next 1/3] Documentation: netlink: specs: tc: Add DualPI2 specification chia-yu.chang
2025-03-16 15:27 ` [PATCH v9 net-next 2/3] selftests/tc-testing: Add selftests for qdisc DualPI2 chia-yu.chang
2025-03-16 15:27 ` [PATCH v9 net-next 3/3] sched: Add dualpi2 qdisc chia-yu.chang
2025-03-21 21:08 ` Paolo Abeni [this message]
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=26f2f366-aa14-4879-978a-58d46f9d83a4@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=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