From patchwork Mon Dec 20 01:11:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Salvaterra X-Patchwork-Id: 1570787 X-Patchwork-Delegate: rsalvaterra@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=NEKWRnIU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=AA/FiFCu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHMB508T3z9sR4 for ; Mon, 20 Dec 2021 12:16:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZahFGqtQGKIqjmCPvDqXlwDXy6kVeTOjFUuaoEnffcQ=; b=NEKWRnIU5ri+46 k5ofF8zwxvFvJwrsV4TqVIsJrmmb7QxXHofaKHQT+il53WhT8E+r3S+PgF79T7F1EkFuMxpYKPvcg hV+uRc6VgUYEMwk2O+0kowtnHi9svyVt6QrAFNQXL8N2GMKNc18dkuddgvLEArpRHCN/JKXo/E2jE i/67+yyR2qherhhZ6xj5xS7kdwmeYZqRdiDxdkzoShLDeatCDXnOlnXRNvAX3ScEcct6lSYjdwI3c 3lwsFFoCIYzVLsbkfOPrb1X5ZtngBg6Awuj1WdqNqHmejvukVXJJ22eXqRl8s97MAYhdPSISmBY5D 0do/Q+x38NBvCMBDQclA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mz7D8-00HaV7-54; Mon, 20 Dec 2021 01:11:30 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mz7D4-00HaTl-19 for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 01:11:27 +0000 Received: by mail-lj1-x234.google.com with SMTP id k23so13352950lje.1 for ; Sun, 19 Dec 2021 17:11:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9n7bcrBPgiP9cDthvSp0rYPh61fKek9++P7muVUfj4o=; b=AA/FiFCusT9uow01QRGmEPNddshO4lMYC1UJ1UmrxJPkkU6V4Uvo7a/QtEwc8Q68FR q3E7BBf3/6G2YDf5M29+X26+MnSUmErvchmcSj5fZHQRb+vxOz92MTsuIO+CR+g10dTi cl0p9knXJ6PlQV7H1tmbzX85vDRRkD08apJQnWh+jGwxoG7mtWGeJDoGPDuVnIXkT6py SYgCTfhJnBj2XFT/PHax+UtGVr8FCUouTpd3y9LO5cq6Bmj+ZlR2Ftra45zOzfME808i IPBEuH12Hf8TcSFEag92cdgIXS2xlJiVf9RhAhpFCIduDpJaXZwTaMZ1yU+82GhFjC/c qCiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9n7bcrBPgiP9cDthvSp0rYPh61fKek9++P7muVUfj4o=; b=IO0ZZCVSQkc3KIlmDa5USX264JuNfEC4vMmRaBenE7y4fF+wzxt4XPPvrMOJjM+CtA xwkckg2ma4C51mVnougAN7vsJKpBB78ikzk3uDRNBmwc16nDnXwLilWz4x8wfuouaTaa r6MGh3aI0tMWUQdRbyd+KCBuJA6yPrTW05s2XVkhBMZtOrtAIDr77pHKo+Gaf2MFJXKE jSoezy5+Ip7znEvM7592mMfC9L0zKUMnijGqG9yaMKrzusrauM6pz3AtJrj3F86WKZwv ajmu2XesKJIt2VLVdIfByqO5nvEfU/Ujljx8X7im4IMiatgYalK8XtDqWRPSns74Onn5 TpWg== X-Gm-Message-State: AOAM530wU8rPRr6tRJ/S7fyEcDnkj5vvuiQ+PFpCJyaIDyg0ibiSlJoE cby5F3ZTqY9pXqe2mT0nAgJ9LMfvRg== X-Google-Smtp-Source: ABdhPJz+j/fvcZxyQWR53UJljgtsU+rP/evjV76dDWMpb3yVcEb18maTF3gBaT1Ibv3c9PFnG0AhAg== X-Received: by 2002:a2e:80cf:: with SMTP id r15mr12874535ljg.34.1639962683663; Sun, 19 Dec 2021 17:11:23 -0800 (PST) Received: from crystalwell.adg.lan (a109-49-8-180.cpe.netcabo.pt. [109.49.8.180]) by smtp.gmail.com with ESMTPSA id l13sm2284260ljb.63.2021.12.19.17.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Dec 2021 17:11:23 -0800 (PST) From: Rui Salvaterra To: openwrt-devel@lists.openwrt.org Cc: nbd@nbd.name, Rui Salvaterra Subject: [PATCH] kernel/generic: select the fq_codel qdisc by default Date: Mon, 20 Dec 2021 01:11:18 +0000 Message-Id: <20211220011118.1640-1-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211219_171126_136196_08B6CABF X-CRM114-Status: GOOD ( 16.46 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The kernel configuration allows us to select a default qdisc. Let's do this and get rid of the hacky patch we've been carrying. Signed-off-by: Rui Salvaterra --- target/linux/generic/config-5.10 | 5 +- .../661-use_fq_codel_by_default.patch | 100 2 files changed, 4 insertions(+), 101 deletions(-) delete mod [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rsalvaterra[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The kernel configuration allows us to select a default qdisc. Let's do this and get rid of the hacky patch we've been carrying. Signed-off-by: Rui Salvaterra --- target/linux/generic/config-5.10 | 5 +- .../661-use_fq_codel_by_default.patch | 100 ------------------ 2 files changed, 4 insertions(+), 101 deletions(-) delete mode 100644 target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 27e3e90488..4c31c21bcd 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -1329,11 +1329,14 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DECNET is not set CONFIG_DEFAULT_CUBIC=y CONFIG_DEFAULT_DEADLINE=y +CONFIG_DEFAULT_FQ_CODEL=y CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_DEFAULT_NET_SCH="fq_codel" # CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_PFIFO_FAST is not set # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_SECURITY="" CONFIG_DEFAULT_SECURITY_DAC=y @@ -3907,7 +3910,7 @@ CONFIG_NET_SCHED=y # CONFIG_NET_SCH_CBS is not set # CONFIG_NET_SCH_CHOKE is not set # CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_DEFAULT is not set +CONFIG_NET_SCH_DEFAULT=y # CONFIG_NET_SCH_DRR is not set # CONFIG_NET_SCH_DSMARK is not set # CONFIG_NET_SCH_ETF is not set diff --git a/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch deleted file mode 100644 index 70200f3eb3..0000000000 --- a/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 1d418f7e88035ed7a94073f6354246c66e9193e9 Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Fri, 7 Jul 2017 17:22:58 +0200 -Subject: fq_codel: switch default qdisc from pfifo_fast to fq_codel and remove pfifo_fast - -Signed-off-by: Felix Fietkau ---- - include/net/sch_generic.h | 3 ++- - net/sched/Kconfig | 3 ++- - net/sched/sch_api.c | 2 +- - net/sched/sch_fq_codel.c | 3 ++- - net/sched/sch_generic.c | 4 ++-- - 5 files changed, 9 insertions(+), 6 deletions(-) - ---- a/include/net/sch_generic.h -+++ b/include/net/sch_generic.h -@@ -625,12 +625,13 @@ extern struct Qdisc_ops noop_qdisc_ops; - extern struct Qdisc_ops pfifo_fast_ops; - extern struct Qdisc_ops mq_qdisc_ops; - extern struct Qdisc_ops noqueue_qdisc_ops; -+extern struct Qdisc_ops fq_codel_qdisc_ops; - extern const struct Qdisc_ops *default_qdisc_ops; - static inline const struct Qdisc_ops * - get_default_qdisc_ops(const struct net_device *dev, int ntx) - { - return ntx < dev->real_num_tx_queues ? -- default_qdisc_ops : &pfifo_fast_ops; -+ default_qdisc_ops : &fq_codel_qdisc_ops; - } - - struct Qdisc_class_common { ---- a/net/sched/Kconfig -+++ b/net/sched/Kconfig -@@ -4,8 +4,9 @@ - # - - menuconfig NET_SCHED -- bool "QoS and/or fair queueing" -+ def_bool y - select NET_SCH_FIFO -+ select NET_SCH_FQ_CODEL - help - When the kernel has several packets to send out over a network - device, it has to decide which ones to send first, which ones to ---- a/net/sched/sch_api.c -+++ b/net/sched/sch_api.c -@@ -2288,7 +2288,7 @@ static int __init pktsched_init(void) - return err; - } - -- register_qdisc(&pfifo_fast_ops); -+ register_qdisc(&fq_codel_qdisc_ops); - register_qdisc(&pfifo_qdisc_ops); - register_qdisc(&bfifo_qdisc_ops); - register_qdisc(&pfifo_head_drop_qdisc_ops); ---- a/net/sched/sch_fq_codel.c -+++ b/net/sched/sch_fq_codel.c -@@ -709,7 +709,7 @@ static const struct Qdisc_class_ops fq_c - .walk = fq_codel_walk, - }; - --static struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = { -+struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = { - .cl_ops = &fq_codel_class_ops, - .id = "fq_codel", - .priv_size = sizeof(struct fq_codel_sched_data), -@@ -724,6 +724,7 @@ static struct Qdisc_ops fq_codel_qdisc_o - .dump_stats = fq_codel_dump_stats, - .owner = THIS_MODULE, - }; -+EXPORT_SYMBOL(fq_codel_qdisc_ops); - - static int __init fq_codel_module_init(void) - { ---- a/net/sched/sch_generic.c -+++ b/net/sched/sch_generic.c -@@ -32,7 +32,7 @@ - #include - - /* Qdisc to use by default */ --const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops; -+const struct Qdisc_ops *default_qdisc_ops = &fq_codel_qdisc_ops; - EXPORT_SYMBOL(default_qdisc_ops); - - static void qdisc_maybe_clear_missed(struct Qdisc *q, -@@ -1062,12 +1062,12 @@ static void attach_one_default_qdisc(str - void *_unused) - { - struct Qdisc *qdisc; -- const struct Qdisc_ops *ops = default_qdisc_ops; -+ const struct Qdisc_ops *ops = &fq_codel_qdisc_ops; - - if (dev->priv_flags & IFF_NO_QUEUE) - ops = &noqueue_qdisc_ops; - else if(dev->type == ARPHRD_CAN) -- ops = &pfifo_fast_ops; -+ ops = &fq_codel_qdisc_ops; - - qdisc = qdisc_create_dflt(dev_queue, ops, TC_H_ROOT, NULL); - if (!qdisc)