From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass smtp.mailfrom=; dkim=pass header.d=google.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=google.com policy.dmarc=reject Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by mail.toke.dk (Postfix) with ESMTPS id 99D82BAF6A7 for ; Wed, 14 Jan 2026 08:58:35 +0100 (CET) Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-4ee158187aaso90838551cf.0 for ; Tue, 13 Jan 2026 23:58:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768377513; x=1768982313; darn=lists.bufferbloat.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KS0RgjKS4kK/13ZceFw0e8/jjccYR83h4CV62hyXWGQ=; b=WAtt/WYm7Olbm5Vp2JXR1XymTZ5N2zy3KWClAoVjJ265uhEVdCRtkbuZ3xqTC0tPVD WK7eQqtJ5ACloHz2qCelS5/264s/SQXCJnyjvcMuWYKEol1YPwGX9hNeFrgZ/BNgg7z/ NhtW85OEln9cVIhLFKKWc06gQ51pXPh0eWjQAoYawPH8ygKYcJHNn2CliyXGmlycvyTf CzDStqQoSguJzamlD2wXbFhAOW5DrVZEPhUFIXoj5yMmjW9llybM0cKbKZSZtMAPz35A cNvfFLeEppVPqzZeaPl7h2TxjVxNuj2jnlWTFG6LjbzvB0elJsDUEQtBIHjQ/vIqaU5o m0bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768377513; x=1768982313; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KS0RgjKS4kK/13ZceFw0e8/jjccYR83h4CV62hyXWGQ=; b=Jnv/me6MPMC+acj8B4qsOpDS9B0g0NLLvGrZJWvXKmRH1/OybE3VSiOLZSb6FK9Nug pDzLImIn576OD87ylCFsqe6dgSu1espbhm2pzEdN3XMEh8rvs84iSf1hqVbbPN0e3n7k yO/+fjLSaInTwZD6LDjqtqYad6PhypLIEwr8iqGEYCPa3mMVRxwq7SVtaIsfZx1VAhw5 mvcVhfcaInYYRd+IF9un37Tc1sYgO0x3keCR45ovxfA4wY6XBjdzWdkJgBSewUxmrmAN hY2EPEDKmKVejhsZqezdUdMbFF9iLgwz99oNNSmMiyghZhsVC62s2rnC8P/emJGfa4S+ 3iqw== X-Forwarded-Encrypted: i=1; AJvYcCW5RfdcJDT9jRdqHRR+8hmoGAaRQFvLIzz2lGl5VpxbMMXX6p+JP6+j97F7rSFhP28h8lJ6@lists.bufferbloat.net X-Gm-Message-State: AOJu0YzvpfRJTp14BIszXA7rYLrzEoe//dxUYyNW1UacUJFZmxg9/jII 3tDlpFEW5SxFKxfqG0ESbYF4Wj9Gc5ni8fNG61XhAnPvKOn1EsztouXjtl2+Hr0jtsIsgF3SlRP nOUwL9wLFt2+c9Q5EUD2rVZqRekkrbMSTcXOmrF5a X-Gm-Gg: AY/fxX6pS2xaV8Zr/YoFNwLMzj1jLhQtWyjb1rQ8ViiSHDJdhQs5EdXQS/1aYj+16Ri 9oCIVGCv9rkhim9MRfYRxQ16KKNtBhNHxaZtmWQUXXsKDD7GoyCgkMGygwMZuKiBr7o7Jj2sRS3 UHv1PD+uGzQpu/64YALejfFFt7GuQ12zT0thBbhLb8D8yj3Srn+g3jaH7qjAW/tJuOWe5JUVrv+ DH11ME1+l+Bb/BqC1FqjM8H9Tov6jOvPFC66Q00lONqowHxuRSpqh8+ke5Cb20oMvfZZUZS X-Received: by 2002:a05:622a:4203:b0:4ed:df82:ca30 with SMTP id d75a77b69052e-501481e9360mr22469121cf.13.1768377513015; Tue, 13 Jan 2026 23:58:33 -0800 (PST) MIME-Version: 1.0 References: <20260113143157.2581680-1-toke@redhat.com> In-Reply-To: <20260113143157.2581680-1-toke@redhat.com> From: Eric Dumazet Date: Wed, 14 Jan 2026 08:58:22 +0100 X-Gm-Features: AZwV_QgnLNgfxSc_QYvpFJdNGcLOfkKl5TVYTVho5qgGdKMeOVvQUnotTW6I4yw Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Paolo Abeni , "David S. Miller" , Jakub Kicinski , Simon Horman , cake@lists.bufferbloat.net, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VGJY4NNGLP2CSQG5RT5WZ4O26G4C3MJF X-Message-ID-Hash: VGJY4NNGLP2CSQG5RT5WZ4O26G4C3MJF X-MailFrom: edumazet@google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Subject: [Cake] Re: [PATCH net-next] net/sched: cake: avoid separate allocation of struct cake_sched_config List-Id: Cake - FQ_codel the next generation Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, Jan 13, 2026 at 3:32=E2=80=AFPM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Paolo pointed out that we can avoid separately allocating struct > cake_sched_config even in the non-mq case, by embedding it into struct > cake_sched_data. This reduces the complexity of the logic that swaps the > pointers and frees the old value, at the cost of adding 56 bytes to the > latter. Since cake_sched_data is already almost 17k bytes, this seems > like a reasonable tradeoff. > > Suggested-by: Paolo Abeni > Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen > --- This is also fixing a panic, so : Fixes: bc0ce2bad36c ("net/sched: sch_cake: Factor out config variables into separate struct") For the record, a fix for the panic would be : diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index e30ef7f8ee6862a916acc06e568e37f35fd675b1..742fb850e2afb159f215b263bc3= 6c372552911bc 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -2825,6 +2825,8 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt, struct cake_sched_config *q; int i, j, err; + qdisc_watchdog_init(&qd->watchdog, sch); + q =3D kzalloc(sizeof(*q), GFP_KERNEL); if (!q) return -ENOMEM; @@ -2838,7 +2840,6 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt, qd->cur_flow =3D 0; qd->config =3D q; - qdisc_watchdog_init(&qd->watchdog, sch); if (opt) { err =3D cake_change(sch, opt, extack);