From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass smtp.mailfrom=; dkim=pass header.d=redhat.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=redhat.com policy.dmarc=quarantine Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail.toke.dk (Postfix) with ESMTPS id E046A9D3E9B for ; Thu, 27 Nov 2025 10:31:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764235863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fYsNtpO1R5U2YmXQRCyrPnN4Zbs126tMuztWKlbGgA0=; b=Yr8lQ/jC6s9AqH8ao+65NCWcIs2HAqyfmQB6O9ee2UcRxW13Rbv9arELCYQ2Bu06m+pZZU uG9+EzkjfEZfVOTAecJapD5HPVqXh/1xOotB4bJSKiQZ5r7jBCw2AwkZ8P9ZENzoJ6L14B 10m+nXRv2eDUEQbchIKxKhBWTBZ13ck= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-508-UNZJub9PM5q3kmcK1RCStA-1; Thu, 27 Nov 2025 04:31:01 -0500 X-MC-Unique: UNZJub9PM5q3kmcK1RCStA-1 X-Mimecast-MFC-AGG-ID: UNZJub9PM5q3kmcK1RCStA_1764235860 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-b73720562ceso52432966b.0 for ; Thu, 27 Nov 2025 01:31:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764235860; x=1764840660; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=fYsNtpO1R5U2YmXQRCyrPnN4Zbs126tMuztWKlbGgA0=; b=wVKUBUQgQWE14ft2kFayoe4v6sPgfb+JpvHgTdS2wU+1L5yHkXX7KvgVAMqm+uV0BJ Jz580F5HXcJkb20m4BpKsXWbfTfvTGxqHsX9VqoGybisUl1QOOysTdiktpl8mvw+acAR p7rU3uNzTtjmp0tKFdy7E48zTebwN2b4EfM3YbIGuPgjNm/IOJmHD1wtSrxqX/eDYCOW G/0SPZHcf8tFAFrBPlFm+dxGGfV+h3+hddExAIk2F/UlwM0Pk5hcyMMLhFW270KxKuuG 4oTzV3f5BVKUKEzIwcctsAIHjKOvF0WKsPV2WICIaPSg1WO8t0cf1ot7PuoVEsNsDnUf 2Puw== X-Forwarded-Encrypted: i=1; AJvYcCUKabtqp7bFJujLFaIXNCyLNAqTg4YNPXMleKDKaz4sXfLY8Bjy7S/525j2T/L9Rt5/fG4K@lists.bufferbloat.net X-Gm-Message-State: AOJu0YzhyIP6pkghw8C55cruYyPBaaWvCtNrK6c6Jex4x8M7MzZyKj+W 5x3nIgeKCZvRRPiIU9E7NXbKT+qdlkTs3Xy3Ajqr49xK3yXkPVwagq6A+etpDeP/gPIQm20Hmi5 6sY0l4O6FMBNcPGss0kdxMthaziIGGGPQtfzPqtZ68yH/hbrKBLnKxALsBsSaUxE= X-Gm-Gg: ASbGnctgMMA9Zgz0y3O1+RXaiDNOsnUO7QD5ug2af+/MYotVigh8DelFIaIAOSX/uei +NYSFk1FfLEL5NdvZbUHk+wuXB0twEkc0CDAG9opRbYtxRIuOEt5e0QicdNCLkJ2oKKHbTFnV+m oN+7ViqOgyaEslNCTQ3w/GkhxFuHQnL/ZTuwu8vkagyYgOIhiRYmTL8HAWcZv3UcfqSWn13u4Vg diw0QSu4mN0AcFw2eAFntcLdha9tUau3G+qSX8fzKh2JVY6bMy+pch7AFSZJarkva9TJK3mGiMK E77UtyvMPs4lcLcTHqo/thwaNIxzdKbvcjtaKzoDQncPoQew1luQcX0USaGlVTpqNoNHYrP7wRQ IFIqlAZuf+2YyDrX+QRSuVr1tYJHF6uYAGfX2 X-Received: by 2002:a17:907:980b:b0:b73:3d1d:2249 with SMTP id a640c23a62f3a-b76c55131b6mr1154846066b.29.1764235859718; Thu, 27 Nov 2025 01:30:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyvcweSYxVr2KMe/lOAlrRf8zwYME8RPIfFY4y4dBwXFsVCZ889TOT8bgy8RWApLHNqkVBPw== X-Received: by 2002:a17:907:980b:b0:b73:3d1d:2249 with SMTP id a640c23a62f3a-b76c55131b6mr1154842966b.29.1764235859198; Thu, 27 Nov 2025 01:30:59 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk (alrua-x1.borgediget.toke.dk. [2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64750a90caasm1062040a12.11.2025.11.27.01.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 01:30:58 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 42EA9395701; Thu, 27 Nov 2025 10:30:57 +0100 (CET) From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= Date: Thu, 27 Nov 2025 10:30:51 +0100 MIME-Version: 1.0 Message-Id: <20251127-mq-cake-sub-qdisc-v2-1-24d9ead047b9@redhat.com> References: <20251127-mq-cake-sub-qdisc-v2-0-24d9ead047b9@redhat.com> In-Reply-To: <20251127-mq-cake-sub-qdisc-v2-0-24d9ead047b9@redhat.com> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman Cc: =?utf-8?q?Jonas_K=C3=B6ppeler?= , cake@lists.bufferbloat.net, netdev@vger.kernel.org, =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Mailer: b4 0.14.3 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Ur6dETTIbw80ce_d9CkDsjvNQcdZgbbjyFhwT8SY77M_1764235860 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: NEHF2TKKY3BRWJD7QGE7AELEXK32N4EC X-Message-ID-Hash: NEHF2TKKY3BRWJD7QGE7AELEXK32N4EC X-MailFrom: toke@redhat.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] [PATCH net-next v2 1/4] net/sched: sch_cake: Factor out config variables into separate struct List-Id: Cake - FQ_codel the next generation Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: RmFjdG9yIG91dCBhbGwgdGhlIHVzZXItY29uZmlndXJhYmxlIHZhcmlhYmxlcyBpbnRvIGEgc2Vw YXJhdGUgc3RydWN0DQphbmQgZW1iZWQgaXQgaW50byBzdHJ1Y3QgY2FrZV9zY2hlZF9kYXRhLiBU aGlzIGlzIGRvbmUgaW4gcHJlcGFyYXRpb24NCmZvciBzaGFyaW5nIHRoZSBjb25maWd1cmF0aW9u IGFjcm9zcyBtdWx0aXBsZSBpbnN0YW5jZXMgb2YgY2FrZSBpbiBhbiBtcQ0Kc2V0dXAuDQoNCk5v IGZ1bmN0aW9uYWwgY2hhbmdlIGlzIGludGVuZGVkIHdpdGggdGhpcyBwYXRjaC4NCg0KUmV2aWV3 ZWQtYnk6IEphbWFsIEhhZGkgU2FsaW0gPGpoc0Btb2phdGF0dS5jb20+DQpTaWduZWQtb2ZmLWJ5 OiBUb2tlIEjDuGlsYW5kLUrDuHJnZW5zZW4gPHRva2VAcmVkaGF0LmNv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