Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1755850rdf; Sun, 5 Nov 2023 12:58:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFetnTpkSRfS2R5/T0cqzEIytQK57wKc92Mu3GNjQ0u7q/70n5Mwuqv939qEiF2smTLfLPx X-Received: by 2002:a05:6a20:7d9e:b0:180:e2b8:3b05 with SMTP id v30-20020a056a207d9e00b00180e2b83b05mr17139409pzj.52.1699217880186; Sun, 05 Nov 2023 12:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699217880; cv=none; d=google.com; s=arc-20160816; b=fhblNWAORn+eIOaRAmd3HxL1y5TreSQxFFDJEfafAtuQYar/H9/uBYez890fmMlaY9 SFNQ5kc5vwOD5LirACriAqXtYEMHPVwi14mIUfepPHublUcFQRwrZgXv9W+bBjlQzuWT LSJ3PmWy+1XfihycMACMURIa0/WB2UJJThX/Jn7C9Gsj3VOW2WPF6/pDUysdl7c+o+Wm jCyvP3WNsbh+dYaM3IU/tYJ9uZ9WPMAYp1V5zs1gbQjiIyG10Y4ksF5qli/Pr/GRvWTB c/TotNHOaLKPIo04ZOEBn+cU0qeuQRuPiludKGJ+71e5P/uvAzZQFk5NzjgrwF4Qptz/ qruw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=WFkRCO5Gr31wYYObvH3M58yivJORulviaRB/LYrXXJQ=; fh=G3jVr66/sTBxblB4VkyKBP17P5NL/3UjRtmVOzWFD40=; b=PjAHFYAEUfxlLmdUiwHFnoNnJi+uhSdREMDwYvsX8bktotb3EVWLxIqdbbc4mXxCpg Es9pyyXcuCFJblyhNrFb1NK0QTd939Y2yhOdHL7eSWLobH89DXNAlbfu+t9DHanzGUrD Js6ibWbdCL2xeMANiNZB6vYtjBGLQ4DVAMAIctolzf/Z0Fde5I3kCfNrszjSrlgplQJX dCs9sajBbQt4bkAGrgn5E0QE2aAQhuRtloEn8bggN0E1B7D7sL5cQyLPOXwBDRoz9OBR MMWEmVA+5NPuwUDC5/7ZokZlqBsDZGEVUyZa8v/Yrx6lwY0TZk6HC4yZfP/rbwj4MMMW pHkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T71nTGc3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id jx16-20020a170903139000b001bbab2e5a27si6235335plb.290.2023.11.05.12.57.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 12:58:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T71nTGc3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id F32B38058455; Sun, 5 Nov 2023 12:57:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbjKEU5d (ORCPT + 99 others); Sun, 5 Nov 2023 15:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjKEU5c (ORCPT ); Sun, 5 Nov 2023 15:57:32 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D1C1DE for ; Sun, 5 Nov 2023 12:57:29 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50970c2115eso445154e87.1 for ; Sun, 05 Nov 2023 12:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699217847; x=1699822647; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=WFkRCO5Gr31wYYObvH3M58yivJORulviaRB/LYrXXJQ=; b=T71nTGc3Okg3dJ2uwL1PBI2yihVsH1WUU6wVIvBV6MsY1JdiYlECtNF4NDGUuM90C/ JaXDu8k4/NHYkMWT3+aa+ejrB1nwZ7pWusxsNO73UpxUc16lEoNfNoOdzeKLJ7q0Sci/ KYFIc/DlCNcNumSnbqPCPW9LuO4xLBXzPQ68uKDkAQ4/f3cUoGK25k+4kuvjlo9roDUj 83/LItQaChogLOazxOFYrTWGpQmhR5tGbfQl0apg2DABFlkMMQoT1lsHvm1xNoZp1R4W 0+Whe8mumr2gdnYVFUmBYp6JhsBlnqoe0NC78Ci6Zu1dbqYuTvmbrVAyLGLMZkLTUS6a fZ5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699217847; x=1699822647; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WFkRCO5Gr31wYYObvH3M58yivJORulviaRB/LYrXXJQ=; b=PDnxaAarkRf2p8+I09mLGnbLBFf2iz4jhpsReaoJ0QD6iWJTHUmK5COYrHggWDUVBC z2OjE/uO6ufAY+es6FpAqY7psHcDzj+bIDgxQPZTdj9+vW0RJh+n+qlhM3LuqO/8R+ph wkHi+QXkhAWf6PoHd6i6aaoZO8/TPYj+H6msvtwaBHFO2C+M3pRd9Ea6od2wNUclcbDC LIu4CJwoOHeoycXHqju1bM1NuH5IAA/lvM4MAA6W2zTOyYlneGFoaTtfZpSZcsestfae +A4o9zVn+cW8B300/ShbNXeevBb/qXQnGk1uK2yRgw4ijI60MJVpemZpw78owRAxiKkQ iyzg== X-Gm-Message-State: AOJu0YzGJSRDN6W6bT7DZOFb57Zlw44X9tg3FIMsbxqD3IoBH5DjH3rH dUh4KZr27mxA6PUJYvpT/jcGXg== X-Received: by 2002:a05:6512:969:b0:509:377a:26d9 with SMTP id v9-20020a056512096900b00509377a26d9mr10364957lft.8.1699217846755; Sun, 05 Nov 2023 12:57:26 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id d12-20020ac24c8c000000b00507c72697d0sm931873lfl.303.2023.11.05.12.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 12:57:26 -0800 (PST) From: Linus Walleij Subject: [PATCH net v2 0/4] Fix large frames in the Gemini ethernet driver Date: Sun, 05 Nov 2023 21:57:22 +0100 Message-Id: <20231105-gemini-largeframe-fix-v2-0-cd3a5aa6c496@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIALIBSGUC/4WNTQqDMBCFryKzboqTKP1Z9R7FRRoncUCTMhFpk dy9wQt0+b7H+94OmYQpw73ZQWjjzCnWoE8NuMnGQIrHmkG32iC2nQq0cGQ1WwnkxS6kPH+Uw86 M2l2u+Oqhbt9CFR/eJ0RaYahw4rwm+R5fGx7VH+2GqlU31/dovNbemMfM0Uo6JwkwlFJ+9/O3g sAAAAA= To: Hans Ulli Kroll , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?q?Micha=C5=82_Miros=C5=82aw?= , Vladimir Oltean , Andrew Lunn Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 05 Nov 2023 12:57:48 -0800 (PST) This is the result of a bug hunt for a problem with the RTL8366RB DSA switch leading me wrong all over the place. I am indebted to Vladimir Oltean who as usual pointed out where the real problem was, many thanks! Tryig to actually use big ("jumbo") frames on this hardware uncovered the real bugs. Then I tested it on the DSA switch and it indeed fixes the issue. Signed-off-by: Linus Walleij --- Changes in v2: - Don't check for oversized MTU request: the framework makes sure it doesn't happen. - Drop unrelated BIT() macro cleanups (I might send these later for net-next) - Use a special error code if the skbuff is too big and fail gracefully is this happens. - Do proper checksum of the frame using a software fallback when the frame is too long for hardware checksumming. - Link to v1: https://lore.kernel.org/r/20231104-gemini-largeframe-fix-v1-0-9c5513f22f33@linaro.org --- Linus Walleij (4): net: ethernet: cortina: Fix MTU max setting net: ethernet: cortina: Fix max RX frame define net: ethernet: cortina: Protect against oversized frames net: ethernet: cortina: Handle large frames drivers/net/ethernet/cortina/gemini.c | 39 ++++++++++++++++++++++++++++------- drivers/net/ethernet/cortina/gemini.h | 4 ++-- 2 files changed, 34 insertions(+), 9 deletions(-) --- base-commit: e85fd73c7d9630d392f451fcf69a457c8e3f21dd change-id: 20231104-gemini-largeframe-fix-c143d2c781b5 Best regards, -- Linus Walleij