From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"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>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>
Cc: "Jonas Köppeler" <j.koeppeler@tu-berlin.de>,
cake@lists.bufferbloat.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v6 2/6] net/sched: sch_cake: Factor out config variables into separate struct
Date: Wed, 07 Jan 2026 09:42:28 -0500 [thread overview]
Message-ID: <willemdebruijn.kernel.c89a9fd4ffe8@gmail.com> (raw)
In-Reply-To: <87jyxt4w9k.fsf@toke.dk>
Toke Høiland-Jørgensen wrote:
> Willem de Bruijn <willemdebruijn.kernel@gmail.com> writes:
>
> >> static int cake_init(struct Qdisc *sch, struct nlattr *opt,
> >> struct netlink_ext_ack *extack)
> >> {
> >> - struct cake_sched_data *q = qdisc_priv(sch);
> >> + struct cake_sched_data *qd = qdisc_priv(sch);
> >> + struct cake_sched_config *q;
> >> int i, j, err;
> >>
> >> + q = kvcalloc(1, sizeof(struct cake_sched_config), GFP_KERNEL);
> >> + if (!q)
> >> + return -ENOMEM;
> >> +
> >
> > Can this just be a regular kzalloc?
>
> Yeah, I guess so. I'll change this if there's a need to respin for other
> reasons, but probably not worth respinning for this on its own? Seeing
> as it'll all end up in the same kmalloc call anyway :)
Sounds good.
>
> > More importantly, where is q assigned to qd->config after init?
>
> Just below:
>
> >> sch->limit = 10240;
> >> sch->flags |= TCQ_F_DEQUEUE_DROPS;
> >>
> >> @@ -2742,33 +2755,36 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt,
> >> * for 5 to 10% of interval
> >> */
> >> q->rate_flags |= CAKE_FLAG_SPLIT_GSO;
> >> - q->cur_tin = 0;
> >> - q->cur_flow = 0;
> >> + qd->cur_tin = 0;
> >> + qd->cur_flow = 0;
> >> + qd->config = q;
>
> Here: ^^^^^^^
I'm blind. Thanks!
Reviewed-by: Willem de Bruijn <willemb@google.com>
next prev parent reply other threads:[~2026-01-07 14:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 11:40 [PATCH net-next v6 0/6] Multi-queue aware sch_cake Toke Høiland-Jørgensen
2026-01-06 11:40 ` [PATCH net-next v6 1/6] net/sched: Export mq functions for reuse Toke Høiland-Jørgensen
2026-01-06 21:53 ` Willem de Bruijn
2026-01-06 11:40 ` [PATCH net-next v6 2/6] net/sched: sch_cake: Factor out config variables into separate struct Toke Høiland-Jørgensen
2026-01-06 21:57 ` Willem de Bruijn
2026-01-07 9:17 ` Toke Høiland-Jørgensen
2026-01-07 14:42 ` Willem de Bruijn [this message]
2026-01-06 11:40 ` [PATCH net-next v6 3/6] net/sched: sch_cake: Add cake_mq qdisc for using cake on mq devices Toke Høiland-Jørgensen
2026-01-06 21:57 ` Willem de Bruijn
2026-01-06 11:40 ` [PATCH net-next v6 4/6] net/sched: sch_cake: Share config across cake_mq sub-qdiscs Toke Høiland-Jørgensen
2026-01-06 11:40 ` [PATCH net-next v6 5/6] net/sched: sch_cake: share shaper state across sub-instances of cake_mq Toke Høiland-Jørgensen
2026-01-06 11:40 ` [PATCH net-next v6 6/6] selftests/tc-testing: add selftests for cake_mq qdisc Toke Høiland-Jørgensen
2026-01-06 18:19 ` Victor Nogueira
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=willemdebruijn.kernel.c89a9fd4ffe8@gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=cake@lists.bufferbloat.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=j.koeppeler@tu-berlin.de \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@toke.dk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.