From patchwork Sun Oct 1 20:39:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1841821 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=eRqC4mvD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VYrGaYab; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RzGHw13Dtz1yng for ; Mon, 2 Oct 2023 07:43:05 +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=GnrCct7iph+6lCKXlUKb6JZiYmYkhhFyC2KEL7inSkI=; b=eRqC4mvDHw6+cD KgOdDJejiO1mOAtbOuw0BC8ePMj4vrE7ZcQeNR5ffPv5BIYNMs006pFQ1iN0k1MxQj17ML5mbBg1A dPZeWNO9jyxdh+hUUNOs8M+5WGRXPD1iEDo8YF3x/F2XDsyNviaqNGWP7Qt1tHDTQfWjm3gtxGeQH ajupoHcez4obfiKj0HSLDiE3RABClLUMuEXgZJilotsh2MFRA5zBKM8c9Z+hTZDSQB03hjq8S5xbF IwkRWHm9MDKLi9IKqeg4XhMj6cQDBeSdE/2T4zMZOIop7ofxJiKOYWqHmy5MdkBHgeh+qhHv2UIqb ZqQ+so2nKa+lmpzb42HQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qn3EX-00BcYS-0q; Sun, 01 Oct 2023 20:40:09 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qn3EU-00BcXx-1z for openwrt-devel@lists.openwrt.org; Sun, 01 Oct 2023 20:40:07 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-5048156976cso8387551e87.2 for ; Sun, 01 Oct 2023 13:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696192803; x=1696797603; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mX3VlDTWv1zb4pSUcFU4+R5IFYDn1m3302W/jBlFpeU=; b=VYrGaYabiJZkBaB4m2raticH9BqyXpgwJOkQasb9npDp0BanQwZTLsMCv6Wjv/VCoV /ejj5tTVxNlHBNV8sBFTuNwaIm9rZolv8ycLchP7ijTgyTy+O6XO80AjucLhfKFyPCzl wiKJ3QiIxk4kWHDg4QWDZ4Uoh+jpCrNNq+Ew0urRxj6hKHTux+XI+DmVE/P+Hlu5ALgN yIChtdaohbbzmKJ9/lQQAsJ1q8qdq1OP1mrxsgnZ6o1Q4u5aEdIAdR2vLQ0TwCTg8ncL XPzMbpViI3VhAFYtTtVB3SVy9A8WVUPRwOtcAFBTKC80Eg351ijjkxjF9fWBE+pou1TT hDSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696192803; x=1696797603; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mX3VlDTWv1zb4pSUcFU4+R5IFYDn1m3302W/jBlFpeU=; b=Lo/X0k3QbwYW5QVC0ljYyPcCgbhCCewXXD1S328W4bH2lhzNxP2mA42pTYQhZ9BPsp 1RYBkBTx7CutgmvoV8iHWipFOTxfienydBvyo90CzQiTKAaFXzZj/Amn4HwY8dJEqDPR bPBaoSYgvFjpXVZKUKNpYUhA6/nkAS0QgRy/jZH7829cmu7TrQuxM43V+DTBW4hekvpH jkX4aM3X5rBa9jZ64ps+DbOsSK+fuImtCH1JD5dk1MAdUC7i/5uH1CHwhpddkzDaFyqf eEUSsA6chfG6vZYM0lE+kows1OvxXLvp8MGt6JtJc1VD+hgXKFHiRCjfozKGHEXi9yIO /vag== X-Gm-Message-State: AOJu0YzbVRv4FDsJEbqEMaYdWR0Hwm9nPL5eKkx3FZNgUloLTFY7Vu8/ erw2dSOVZGBrZHEk2AK/ajmseUpdBZuBbrBKxq0= X-Google-Smtp-Source: AGHT+IHY9MoJoxs86y3fLBowA8VccTEeDK7vxW73p0YraGtugK1vTGdct/t+RqzYoSCNLYOIPbxRaQ== X-Received: by 2002:a05:6512:314a:b0:503:ca:7b4c with SMTP id s10-20020a056512314a00b0050300ca7b4cmr6924268lfi.8.1696192802784; Sun, 01 Oct 2023 13:40:02 -0700 (PDT) Received: from Fecusia.lan (c-21d3225c.014-348-6c756e10.bbcust.telenor.se. [92.34.211.33]) by smtp.gmail.com with ESMTPSA id p15-20020a05651238cf00b005032ebff220sm4436751lft.103.2023.10.01.13.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 13:40:01 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Linus Walleij , =?utf-8?q?=C3=81lvaro_Fern?= =?utf-8?q?=C3=A1ndez_Rojas?= , Jonas Gorski Subject: [PATCH] bmips: bcm6368-enetsw: Bump max MTU to 1536 Date: Sun, 1 Oct 2023 22:39:58 +0200 Message-ID: <20231001203958.2995526-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231001_134006_689426_39C83DB1 X-CRM114-Status: GOOD ( 12.81 ) 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 max MTU for this ethernet switch is 1536 bytes, not 1510 as it is right now. The available overhead is needed when using the DSA switch with a cascaded DSA switch, which is something that exist in [...] 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:12d 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.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 max MTU for this ethernet switch is 1536 bytes, not 1510 as it is right now. The available overhead is needed when using the DSA switch with a cascaded DSA switch, which is something that exist in real products, in this case the Inteno XG6846. Before this patch (on the lan1 DSA port in this case): dsa_slave_change_mtu: master->max_mtu = 9724, dev->max_mtu = 10218, DSA overhead = 8 dsa_slave_change_mtu: master = extsw, dev = lan1 dsa_slave_change_mtu: master->max_mtu = 1510, dev->max_mtu = 9724, DSA overhead = 6 dsa_slave_change_mtu: master = eth0, dev = extsw dsa_slave_change_mtu new_master_mtu 1514 > mtu_limit 1510 mdio_mux-0.1:00: nonfatal error -34 setting MTU to 1500 on port 0 After this patch the error is gone. Cc: Álvaro Fernández Rojas Cc: Jonas Gorski Signed-off-by: Linus Walleij --- .../bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 321e95dbbb3d..96f4c303a433 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -24,6 +24,7 @@ /* MTU */ #define ENETSW_TAG_SIZE (6 + VLAN_HLEN) +#define ENETSW_MAX_MTU 1536 #define ENETSW_MTU_OVERHEAD (VLAN_ETH_HLEN + VLAN_HLEN + \ ENETSW_TAG_SIZE) #define ENETSW_FRAG_SIZE(x) (SKB_DATA_ALIGN(NET_SKB_PAD + x + \ @@ -1067,7 +1068,7 @@ static int bcm6368_enetsw_probe(struct platform_device *pdev) ndev->netdev_ops = &bcm6368_enetsw_ops; ndev->min_mtu = ETH_ZLEN; ndev->mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE; - ndev->max_mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE; + ndev->max_mtu = ENETSW_MAX_MTU; #if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) netif_napi_add(ndev, &priv->napi, bcm6368_enetsw_poll); #else