Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp161555iob; Wed, 11 May 2022 11:33:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCTVlXSzDSPTsomrSqEvCVhzvCrbVg2cQxEBuxBXjIkSMiDXvyaxX1frbwOtbQcLyL0qRA X-Received: by 2002:a17:907:3e25:b0:6fd:c29c:fe71 with SMTP id hp37-20020a1709073e2500b006fdc29cfe71mr6765521ejc.329.1652294012670; Wed, 11 May 2022 11:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652294012; cv=none; d=google.com; s=arc-20160816; b=zq44LQovdvyMtS5vAceYSVPRr/hfAOt1r8t/frLa9FWbyj62fE3ToP+ZO0s2B4m9Vz LI9k4tu3ylaKoFXW5p8Iwl8nlwj6gnwEysSFi0ZUbowDO59mxh63zXB6n3LhtCAtWYnK b5a6cyVKr/0E/0btNPYQmLlXOrpEbtjZi082w/CBanvhrotUzHQNkO4uKdhudv3300oN W3sN824ycKSLygEaGaa7SASBAraevfZeoxhhs4QP5hUB9Tv6B4coxmxGBQmGt0HRed8Z oe0eg5c+7G9r0LsisrR1VTxMr0n7HfvlBLziVrV+mimOPlzISUdWMSmTDhAI0PgR2I8p EKZg== 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=bEAJtgnMEKMbBgh9iYBqIdW4JqbXFYk0M7Z0CTygwNQ=; b=DBjsa7gmuJ/YD3V/0sdL/1tgWAwp2jpIdLTCjOJr7iaA2x/bHdLsyQHnn+ABRSvkbD s9O9Pfa4xrb/NJeQtP+xzCn4EvRO9eg9lbg66Wv1hsvWZxELYzr3e+yt2o12p3NxWvq1 gieh9V8bX9yrAbaAoisHiN02hJ4EZ400+1H11CCHbXw1/WGLKlFiemgJpkC8fzyooaM/ 28RdWFO6wpVVYIeBwcl70vixx49XY7SCE0w0ztGKz9t5u/JxZ4sSr78QfxRefvjSBIn8 IelF9lP66zcQ3CYTFhRQbJ8rYzi4/0KjcGNdk8nOM/6TgZwOO8mULDdjpP+kQtOsBPEA xBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EK9OTj7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb21-20020a170907961500b006e8439b41d1si3332213ejc.69.2022.05.11.11.33.06; Wed, 11 May 2022 11:33:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EK9OTj7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233271AbiEKOdV (ORCPT + 99 others); Wed, 11 May 2022 10:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240682AbiEKOdR (ORCPT ); Wed, 11 May 2022 10:33:17 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB77668F80; Wed, 11 May 2022 07:33:15 -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=bEAJtgnMEKMbBgh9iYBqIdW4JqbXFYk0M7Z0CTygwNQ=; b=EK9OTj7tkiqGEEdsbkjzOt8cx+ 9PIAG7mefFSDJPIn5ZVbt62K5LHyorLQQHfuhVglXto87oC3GVbpSJdKrSltBrOQo9vm0W42kpgC1 J7XQo/TiiBKbxVnZD+Xs1NW4V73B38KhiaGIbhVXlliV8iLudKNUzPMu10egYaNWJf64=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nonOY-002Jqv-2H; Wed, 11 May 2022 16:32:54 +0200 Date: Wed, 11 May 2022 16:32:54 +0200 From: Andrew Lunn To: Vladimir Oltean Cc: Felix Fietkau , Sean Wang , Landen Chao , DENG Qingfang , Vivien Didelot , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: dsa: tag_mtk: add padding for tx packets Message-ID: References: <20220510094014.68440-1-nbd@nbd.name> <20220510123724.i2xqepc56z4eouh2@skbuf> <5959946d-1d34-49b9-1abe-9f9299cc194e@nbd.name> <20220510165233.yahsznxxb5yq6rai@skbuf> <20220510222101.od3n7gk3cofwhbks@skbuf> <376b13ac-d90b-24e0-37ed-a96d8e5f80da@nbd.name> <20220511093245.3266lqdze2b4odh5@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220511093245.3266lqdze2b4odh5@skbuf> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Let's see what others have to say. I've been wanting to make the policy > of whether to call __skb_put_padto() standardized for all tagging protocol > drivers (similar to what is done in dsa_realloc_skb() and below it). > We pad for tail taggers, maybe we can always pad and this removes a > conditional, and simplifies taggers. Side note, I already dislike that > the comment in tag_brcm.c is out of sync with the code. It says that > padding up to ETH_ZLEN is necessary, but proceeds to pad up until > ETH_ZLEN + tag len, only to add the tag len once more below via skb_push(). > It would be nice if we could use the simple eth_skb_pad(). There are some master devices which will perform padding on their own, in hardware. So for taggers which insert the header at the head, forcing such padding would be a waste of CPU time. For tail taggers, padding short packets by default does however make sense. The master device is probably going to pad in the wrong way if it does padding. Andrew