From patchwork Sun Jan 23 00:35:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1583078 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=x/mHau8N; 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=dd0q0EcH; 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 4JhDlY3YLQz9sPC for ; Sun, 23 Jan 2022 11:39:37 +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=XZ2MDaKiPJeb+2q75ZlInWQCwPZ5RzBx3qCNVFu3kIM=; b=x/mHau8NcfdBPI ZiCEprlahgMQdh8EAvWwlwrNAyk3tf2molMQOJ6po2H5utoiRUE38aiGkDvQNF+48obZznxhj3B3s 6r9+Tyz8P+BhB4ssfWRqN6Hcm1eFWWn7i3FWE33kCjFBQ/0T5uEBCF6GCw4TjegJ8WhmckC+tTHFi Xmtrc6vZ0ngPAtrKpfflXkkyDUMgFLQ0ZdWfElI7zBZCPBnXN8Spq29AKAUa+dDuX4X8DZ4Kgw8f0 rFHSTyN9syUcrdXgYPFWlNJ8ImS55rjrev+Dulcl5cpP9CWxlVMJ8fuVzEwaRa+u7G9xE1Ws++Ohk YZ55Zmyau7q3NS+sEMGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBQr3-000BaY-BT; Sun, 23 Jan 2022 00:35:37 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBQqz-000BZE-PP for openwrt-devel@lists.openwrt.org; Sun, 23 Jan 2022 00:35:35 +0000 Received: by mail-ej1-x631.google.com with SMTP id p15so10919781ejc.7 for ; Sat, 22 Jan 2022 16:35:32 -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=1ZV7CjsyFkI9130Eu+2zyaXDgs8NiIHAMvZ1jSlONbE=; b=dd0q0EcHNX4SQjnBbmU9CTtJ6/aur9d0qSW6jIOCRYGztPv3e4gEZDB6K0oYa5DHzi 03PnWqz758bjpOccP+h2qOEwE4kuSTjuSPwdFz8d5qjwSu52KCPJdxVsoaPfEcVpKwWz +DYqeyznKRSXlbItfqcIDjijgkpAJau3xiC0Lec2VSzi9cJxuEC8Jb242aoED+lLojWG y5ix+6TtXUfJzaHrvi6aFJtKsWWB3qsIHbv4grpCD/ySOMZv+Uqol4j1XnhusRHeYjYt dscpojr+FfqurYET8Pp3O4rdktlkbhvFmippuc9fIFp+rsK1hfPBtC3aK27+YRGK0qaw 9MLw== 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=1ZV7CjsyFkI9130Eu+2zyaXDgs8NiIHAMvZ1jSlONbE=; b=zlMC/Qz2Z7L1hIYHanInpFJtvEwPStDAJe1qKKtiQxcNWbwhqyzyEEs591OIjDi8ab cyqgKaSOGxShAbRs+Qmyjhx93TWR35iTylKoXVDUUts9soun1rRdMdp9tcI9UlXm4S9B YV4GCt8fWx/pRcS9yHJxWlHDNBG1NFnIO5frD++0sNVD5PoqNCJI+IHOf/UeMQ/4XxRG 0tNB1LRHMWTpQFsLI3MEx+8aVogkhheGoJqYkHVyJeJTWt8fHpgdKCzZVBqQO2GOUg75 UVzi1ph3OwruEl6gEkuAlx4vG29dY8mf+9Th1kNZoNBGDkdsq3WXl7al/LEWMoV469da LcAw== X-Gm-Message-State: AOAM533K4o/Tv/FQ4hoOLX4+/uLuU+F92o5M/qWwSsy9mTY7OUsv8sPR 6Eg33nOXcs0ccwV9ZNw0UHYHSvCKu2A= X-Google-Smtp-Source: ABdhPJwvHhnFji6KKxSwvIuuvgL5wjXE/5KDQvPK4cn7m7UD0d6RTW3oLZYVgpxjKhYJXQtBdpGfcA== X-Received: by 2002:a17:906:b1c2:: with SMTP id bv2mr8575134ejb.395.1642898131018; Sat, 22 Jan 2022 16:35:31 -0800 (PST) Received: from localhost.localdomain (93-42-71-246.ip85.fastwebnet.it. [93.42.71.246]) by smtp.googlemail.com with ESMTPSA id d2sm4246050edu.72.2022.01.22.16.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 16:35:30 -0800 (PST) From: Ansuel Smith To: OpenWrt Development List Cc: Ansuel Smith Subject: [RFC PATCH v2 0/2] Add DSA MultiCPU port support Date: Sun, 23 Jan 2022 01:35:24 +0100 Message-Id: <20220123003526.22366-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220122_163533_865190_1E18E48C X-CRM114-Status: GOOD ( 12.76 ) 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:631 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. 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 | 151 ++++++++++++++++++ ...add_ndo_for_setting_the_cpu_property.patch | 113 +++++++++++++ ..._set_cpu_for_changing_ports_CPU_port.patch | 89 +++++++++++ ...clude-net-add-dsa_cpu_ports-function.patch | 34 ++++ 5 files changed, 468 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_property.patch create mode 100644 target/linux/generic/hack-5.10/780-3-net-dsa-implement_ndo_set_cpu_for_changing_ports_CPU_port.patch create mode 100644 target/linux/generic/hack-5.10/780-4-include-net-add-dsa_cpu_ports-function.patch