From patchwork Thu Feb 3 00:44:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1587834 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=rM92hsAn; 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=V27YvSY+; 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 4Jq0R96j4rz9sCD for ; Thu, 3 Feb 2022 11:48:53 +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=53sPIc2zaWoyMWvxO8+JFWCbKRttKhTmYIAJISxyhgk=; b=rM92hsAnUyekSa C+WvCr1ZCKgtpsJVXJXA+EpkkuZxe0jRT8y7YCYkynnASMomWwV2sZl0h9TrvcUtzO166GBbuphv1 JXhRHxRh+My8IMGwBovIgdqrEXm6l4LfYbV9HXkjA+yF1zo82oGO9M7pS8yBBb6Qdaz9F3qjH1jri FHuQqEn+39w7RtiUB4kJyQpoAFPtWomR9+ORfCkE415Tx420AF32Oo/h1zI4EFS6ETOudp+nAH7Rp ocXD4bV+hg/vZA/amsjPS5RW1Mcur19pdoMz6D6huikd6LDPOtbasidc0FWbwUmgwFsHstIwHohB/ VOIr3dBSZCBMr4kkry1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFQEY-00HEZu-J8; Thu, 03 Feb 2022 00:44:22 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFQEV-00HEYw-JG for openwrt-devel@lists.openwrt.org; Thu, 03 Feb 2022 00:44:20 +0000 Received: by mail-wm1-x335.google.com with SMTP id m26so678679wms.0 for ; Wed, 02 Feb 2022 16:44:17 -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=dvYOADIlE4lZS23GdjecopUeFAoXTMKZFazIjRTHqQA=; b=V27YvSY+ZXX4UioYckQcSTGNHLk1U787kFf+iaI4v+kthCjv9mbHgS1qH/qrZadVUm Cv9vyK2WIwlvisFB8JOqXEJAmsBbtxjI2vw4L2bFVGVByDJRaFSTEZ1R0kEycWyH4Tpc sef9NfqMCaH65gcpI+rjUsVpqvgCZ8D5VeOLPToN+yi2ql0TvPz12rqnRnKIHNhzUilY Gn/PHB1TVpVYIM/jOQr8CYxC3WdUly0wi7WjEKXHz7AFXG5VjnMdT+IJU81CVwwy9UQd GFx2DHYlK5z3SuVb+ROBPB604Bo29YMqc9Ni0gKiYr23QDVLuVpBzyEgkkBzYF2pAbEw 3zJg== 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=dvYOADIlE4lZS23GdjecopUeFAoXTMKZFazIjRTHqQA=; b=F4XwMSqSesCevzJQ97yFqSR76KDyRjAWReHmZ1YN96oiejLMtpUex4nFFRev+0BOcM 3h3PXEnVEw6pRhfhhsWmxQwn2ZCAIpX92492uEFnLGyzrpom8NAle0Z0LBza2J+/E1vq 6+FE6XtgFL+H3SzthqFrMt5YQig27mwC2JprUwNJobrFQ0RllGJjYs4pLkCbDPpmYKTB yYJPJqShg0fig//L5/ue7M4GhLZ2ZJtAoKtwZ73KFzVbv0rvT7F+8MqcJUIQnOUeSLUz OB5W+sAjhtv+WGHPNiJtgDMqXpYA6vvn7+jroPs8m+KB//42PMcVrsqEDaWDnfGgsUWO DTUQ== X-Gm-Message-State: AOAM531IZhAFonZRIVUDu7BV1wcwZBjG5lc82Wnz3H9C31iF81YDXfoP G/l/6PF9m1d635v6Pzsi22I44w3xnfI= X-Google-Smtp-Source: ABdhPJxuizZOqGE2gqvow6TyI8PBQbZ7ObibjHAmcc1vVkDw/+WoPoKz9aqrpH6PY0kBlGAh/mTyrg== X-Received: by 2002:a05:600c:1e2a:: with SMTP id ay42mr8246697wmb.131.1643849056474; Wed, 02 Feb 2022 16:44:16 -0800 (PST) Received: from Ansuel-xps.localdomain (93-42-71-246.ip85.fastwebnet.it. [93.42.71.246]) by smtp.googlemail.com with ESMTPSA id e10sm21981592wrq.53.2022.02.02.16.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 16:44:16 -0800 (PST) From: Ansuel Smith To: OpenWrt Development List Cc: Ansuel Smith Subject: [PATCH v3 0/2] Add DSA MultiCPU port support Date: Thu, 3 Feb 2022 01:44:10 +0100 Message-Id: <20220203004412.19866-1-ansuelsmth@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-20220202_164419_674425_8BC26A8B X-CRM114-Status: GOOD ( 13.72 ) 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: This adds the hack patches for DSA multicpu support. I still have to clean patch 1, 3, 4 but considering this is still a bit WIP I decided to clean and provide a correct patches for the final version. 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:335 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 [ansuelsmth[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 This adds the hack patches for DSA multicpu support. I still have to clean patch 1, 3, 4 but considering this is still a bit WIP I decided to clean and provide a correct patches for the final version. This version won't change the logic by DSA that assing every port to the first cpu port. A init script is required to change the cpu port at runtime. This change was done for the only reason that a round-robin way can't be trusted and is too random. Some cpu port in some switch (brcm) for example doesn't behave the same way and randomly assigning the cpu port would cause problems/malfunctions. v3: - Move IFLA_CPU at the end of enum for ABI compatibility - Remove junk from patches - Fix commit description v2: - Rework iproute logic to not pollute link - Rework the round-robin cpu port assign logic Ansuel Smith (2): linux: introduce multi-cpu dsa patch iproute2: add support for cpu set ...101-iplink_allow_to_change_cpu_value.patch | 81 +++++++++++++ ...net-dsa-allow-for-multiple-CPU-ports.patch | 97 +++++++++++++++ ...add-ndo-for-setting-the-cpu-proprety.patch | 113 ++++++++++++++++++ ...t-ndo_set_cpu-for-changing-DSA-port-.patch | 100 ++++++++++++++++ ...clude-net-add-dsa_cpu_ports-function.patch | 39 ++++++ 5 files changed, 430 insertions(+) create mode 100644 package/network/utils/iproute2/patches/101-iplink_allow_to_change_cpu_value.patch create mode 100644 target/linux/generic/hack-5.10/780-1-net-dsa-allow-for-multiple-CPU-ports.patch create mode 100644 target/linux/generic/hack-5.10/780-2-net-add-ndo-for-setting-the-cpu-proprety.patch create mode 100644 target/linux/generic/hack-5.10/780-3-net-dsa-implement-ndo_set_cpu-for-changing-DSA-port-.patch create mode 100644 target/linux/generic/hack-5.10/780-4-include-net-add-dsa_cpu_ports-function.patch