Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6221099iob; Tue, 10 May 2022 13:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZCbWhGM+t8KMPE5QXG5LhMUa5wbllXSEbtePd7DHkm/quYCxNQ5r2qbDYn/6ufOf8plJa X-Received: by 2002:a17:902:7597:b0:15e:b5d3:267d with SMTP id j23-20020a170902759700b0015eb5d3267dmr22614700pll.55.1652213471984; Tue, 10 May 2022 13:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652213471; cv=none; d=google.com; s=arc-20160816; b=GXy6X4d1Vhqkb4p7TtghnIeGSYVJFPDWdyR7wpQj2UulfSbWUE3dj1uPRwVOkut5Tt 2E2joAORUYlz9VBej7/uNHbrNWAqkd3MvSTOPqsqZVtQrmGa1TUBJyBFuZN1f1rybMba zgVtMjp8dDrQqOcLWfChc23T4I0Sid/OeiNDpy4Xk0N14KoR2u+oyqqsTLhckXQN8nhd Olb+OIBpN/OUKYxtOAAxIr4KSHaUgfn2z21qcmyb+QiPyb/G+0yMwDwlz6Z2IiPdZZyd 1FTXrRm2OWdNR6dYHBAt29L4WxwmbU5WN1TuoXZb1Vxovl+lFzDhoWZp0IjF/jt3XufM 38aA== 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=9xQwPtQrBfYT0IuemJx5F5so+crXxKK0HLvlBxjKC0s=; b=p/VqqPSOC8iHIUh3ozXag1xfj+43zncPf+B/NhPihyhTE7zL1bSAhTa58jr6Me5V1l bWOIsveN4ytb1DDA9DOivW6mSOt26tC+4jpspUP80j3jGoWk0vaMyrQQVASvr42FInWY pMX6JJ+QvtPYzYS4aYNRSQBDzp1+vAojMzDaSd0pKNa6+0f75M1XorJyItjYi+5ETtZA yt+3Spp824lgghtvIN4YVCMCcQFooFESWXNH9IYPw4JqhqXPSZKE2LrO4ZSeOdFZpuE7 64lYIm3LuWz4bgBln5cfQ73NVSzwR9LABKo+2X+m7nxGIYxkemIn/uCBnFie3CwQu7B7 hsqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Okxteym8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y28-20020a637d1c000000b003c61f2570dcsi266884pgc.586.2022.05.10.13.10.55; Tue, 10 May 2022 13:11:11 -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=@gmail.com header.s=20210112 header.b=Okxteym8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347710AbiEJQ4k (ORCPT + 99 others); Tue, 10 May 2022 12:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347708AbiEJQ4f (ORCPT ); Tue, 10 May 2022 12:56:35 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12EBB27D004; Tue, 10 May 2022 09:52:38 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id gh6so34243176ejb.0; Tue, 10 May 2022 09:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9xQwPtQrBfYT0IuemJx5F5so+crXxKK0HLvlBxjKC0s=; b=Okxteym8CaF/RHkBfO6Cp/WIgRcGbMBTJWIdNmMU19vXsWaAS8Z9L5ircpFp6VDy1S u10DkF0PLDeKl0gv5ijUtxkdcF6bG192cWFecvN8MBUJG7Gf6mTiy5C5HhKL4yKu+y7C fuY6AdEp9N1XEYZGCa4lJVnIb7TNode2Iu5C1xlRmg0nS7mbu3qxTeimBa81215XyjFo QElNUXkGIvL4YkC8lKNY8VCKfeTD0cAqUcjHZxtS/9ZzoiyeCWdvf6MDRaohKXFJocJ4 hgsSm0nftb8Eh1JEkwsZlH1sB4qIgwF0i7eJAzKg0c4C7PNz0ybEYElL1dvCdzxHrOvq D4Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9xQwPtQrBfYT0IuemJx5F5so+crXxKK0HLvlBxjKC0s=; b=rJtN0WqRo/Rj5T1Nka5GFZ4sNedW6en3vj1uqMFa+Lqf23/PelyMjINSkfzhwE589Y FZKgmeL8kFjSHZmgw9tZO5r/fjEaCdvOYuT9hOLv1jaBKqb/FyNB2zfgehxCdsxE1apj MFXbTBBkzRcr2vGz9nWxfTgxwOn/E4gQEoAhg1tPj++X6WQVGp5Rl0/zOFgriRC8AAMD 7sgt6RbhEzRtFY9KTY+e0aS+dlICtbkuHLDDet3uQh3iD+KCxRxCpW2JWCLH6Zl+vYqe vyb6uebQdYFoFHVoCsYhtIdPai7QIGiEHHPm2c6a7v8950Ufavy/EIU95zK7lXAODuDm hI7A== X-Gm-Message-State: AOAM533/8dSDltKmROr4cP52PEOXXsXkKJHrCHSQ20Xq5bu8cJUxPc9i hn3SlTTwimo4ZwYw+AaMIfA= X-Received: by 2002:a17:907:d88:b0:6f5:1321:37ed with SMTP id go8-20020a1709070d8800b006f5132137edmr20817558ejc.67.1652201556379; Tue, 10 May 2022 09:52:36 -0700 (PDT) Received: from skbuf ([188.25.160.86]) by smtp.gmail.com with ESMTPSA id a21-20020a170906685500b006f3ef214dffsm6221861ejs.101.2022.05.10.09.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 09:52:35 -0700 (PDT) Date: Tue, 10 May 2022 19:52:33 +0300 From: Vladimir Oltean To: Felix Fietkau Cc: Sean Wang , Landen Chao , DENG Qingfang , Andrew Lunn , 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: <20220510165233.yahsznxxb5yq6rai@skbuf> References: <20220510094014.68440-1-nbd@nbd.name> <20220510123724.i2xqepc56z4eouh2@skbuf> <5959946d-1d34-49b9-1abe-9f9299cc194e@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5959946d-1d34-49b9-1abe-9f9299cc194e@nbd.name> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Tue, May 10, 2022 at 04:52:16PM +0200, Felix Fietkau wrote: > > On 10.05.22 14:37, Vladimir Oltean wrote: > > On Tue, May 10, 2022 at 11:40:13AM +0200, Felix Fietkau wrote: > > > Padding for transmitted packets needs to account for the special tag. > > > With not enough padding, garbage bytes are inserted by the switch at the > > > end of small packets. > > > > I don't think padding bytes are guaranteed to be zeroes. Aren't they > > discarded? What is the issue? > With the broken padding, ARP requests are silently discarded on the receiver > side in my test. Adding the padding explicitly fixes the issue. > > - Felix Ok, I'm not going to complain too much about the patch, but I'm still curious where are the so-called "broken" packets discarded. I think the receiving MAC should be passing up to software a buffer without the extra padding beyond the L2 payload length (at least that's the behavior I'm familiar with).