Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1139800rdf; Sat, 4 Nov 2023 07:57:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpUv+n92uDD6sLKTfsfw1brApR7/17+YcPe63NxEP/yIDg0KgAeQV469U1YMIbw8JlhFC9 X-Received: by 2002:a05:6a00:15c7:b0:6b3:aded:7e9a with SMTP id o7-20020a056a0015c700b006b3aded7e9amr26175384pfu.27.1699109847547; Sat, 04 Nov 2023 07:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699109847; cv=none; d=google.com; s=arc-20160816; b=UCSkNO/DWLIXl4cG5b1ySGjdRPV5KPKaZg822ySFmOOmJydeqkqPGVKVjSAlFwRdq7 qqtlYJqoNGgyg/XD0Mk5PvcWBS79dQYLXR9yxZ/wd2j0e+hZ88DDS/2kGvI1tcYq7GI9 NUO37Hf0Gjs1ubTIiswKZexschQ3BNqTpkf5dTJTD1kdRpAe7e+6wh2IfvGO2dj/eT7H AGok1DtnzNuY+Buq6xXla56+Us/RoVKaX5HKelphjRN6JjHqt5Jer5EA8wQiNy8YJwW3 iMdNZPmx6LjmJuRfMywWbpRGL7ejEqaXFfmvD/yu84cZFRC+oA/wngQrsm9KMU2B+D82 C2xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ex9cofny33QV6p/OTbMgVfmXHo630/2h/gGAekdBznw=; fh=2YKzA2yVQd7HuQq3hOkoZhBH8PGg5ags6UDKgwNkN4I=; b=LwOtENtUiG3KWxFqyzxCIJCcyoWTb8wTRsTv+BBfVWNGgXVSy++LYX2fZgkdoBBP3w TH2IUXjcuVf1jvMUPBd0StsWxjjZx9ZcP6MyfuLWXwfL9s4S8n4FB9DLXVq8I3WlN2WA fsHArR9gB1t6PPR5Sq4D5/mrniwLjpdlrw+wJaJFloqSVvNMh6IwstyZFBs7LBwQCE20 OT1i1QxVkyvN4nUnYFgAbalZhra191hlPzELdWpfihTNzXep5dfOX//L2ImHujmCLp4+ eQJ5Msy5jaMbGDIgla7s+GB8Qz5KnB7KlM71Rt9y6EgaxWOL2BlKFJASMHOc8vcPtKe/ NiaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=PF8ho379; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d6-20020aa78686000000b006b28fa70b3bsi3651770pfo.86.2023.11.04.07.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 07:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=PF8ho379; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0D8AC8055640; Sat, 4 Nov 2023 07:57:25 -0700 (PDT) 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 S229620AbjKDO5O (ORCPT + 99 others); Sat, 4 Nov 2023 10:57:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232252AbjKDO5M (ORCPT ); Sat, 4 Nov 2023 10:57:12 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DD371BC; Sat, 4 Nov 2023 07:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Ex9cofny33QV6p/OTbMgVfmXHo630/2h/gGAekdBznw=; b=PF8ho379sX1yb4AoefxLHRgiv8 9nAWf4huNuAoVrBmmhwl6I01NiL2OSnND2u7PEKmzIZODKciOSrbWJ81s5ZCC9ssZ5ONayEcU+Zl3 GMFT4QUvI3jkZXQWhSDJOupianQdWzYG4lkOz9FPQrdpkcIlEpfXsuScP7dHy/nDWk7I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qzI55-000sS0-KO; Sat, 04 Nov 2023 15:56:59 +0100 Date: Sat, 4 Nov 2023 15:56:59 +0100 From: Andrew Lunn To: Linus Walleij Cc: Hans Ulli Kroll , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Vladimir Oltean , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 4/4] net: ethernet: cortina: Handle large frames Message-ID: <036b481e-ac5b-4e77-b93a-4badaf19e185@lunn.ch> References: <20231104-gemini-largeframe-fix-v1-0-9c5513f22f33@linaro.org> <20231104-gemini-largeframe-fix-v1-4-9c5513f22f33@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231104-gemini-largeframe-fix-v1-4-9c5513f22f33@linaro.org> 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]); Sat, 04 Nov 2023 07:57:25 -0700 (PDT) > @@ -1170,7 +1171,14 @@ static int gmac_map_tx_bufs(struct net_device *netdev, struct sk_buff *skb, > word3 |= mtu; > } > > - if (skb->ip_summed != CHECKSUM_NONE) { > + if (skb->len >= ETH_FRAME_LEN) { > + /* Hardware offloaded checksumming isn't working on frames > + * bigger than 1514 bytes. Perhaps the buffer is only 1518 > + * bytes fitting mach a normal frame and a checksum? mach ? > + * Just bypass on bigger frames. > + */ > + word1 |= TSS_BYPASS_BIT; > + } else if (skb->ip_summed != CHECKSUM_NONE) { I've never looked at how the network stack does checksums. But looking at this patch, it made me wounder, how do you tell the stack it needs to do a software checksum because the hardware cannot? Or for this driver, is it always calculating a checksum, which is then ignored? Maybe you can improve performance a little but disabling software checksum when it is not needed? Andrew