Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6341716iob; Tue, 10 May 2022 16:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6wBSqaH4b4VRckqAWXdQhnq250SdKEW5/HkQdQHtpsHMqVZnp/TjDcrhohmlUr5ud70mY X-Received: by 2002:a17:903:2495:b0:15a:a0f7:d779 with SMTP id p21-20020a170903249500b0015aa0f7d779mr22615542plw.163.1652225440267; Tue, 10 May 2022 16:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652225440; cv=none; d=google.com; s=arc-20160816; b=M91q9FTfZmG3Q7awJkodlBsyjshjkv5KUivChIyGSeUJWuGXm4QDLt7VPEaYKjEEm0 NIVFghHUuFSw3Kra7i9+tjAblUFqnkLWs5R+4BSKIFE3wVDDJtpvBD4gSF/0AGovhFQO VP5szhPp2rA9U9T8A5zcvXckMG7e4uc7MEVDJmnCC58KDPHfdG3CfeN0stF2CnO8OVnK Pde95iPVOucNp78Ed38V+QF7vd5FLYS1ajM681q5r0x5pFH+0KPnyWVt4M7PhqPTh4r+ aAIfwze5CqdHqS8TiRfEYhgjIcre7ncldAj1a+AvvLy01PNm0IpsJE+KR1Gw073UMDtX LLTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=BhPDuCZhU013enU/ezL39tFkaksHmV+NLwg0WAYz1Ww=; b=hLzEd/rk7iuHDtnlYf7JfSrlfYeuc5QwZcyRgLvdNXQ89KBoCxkAElvX/MXUxiOyi3 ru+DQPRBNiJGKMPxvhtsEWK6k+sT4X48uEpPrA1RPaYyBJqyivvYhWXanlsRVx/LeJzO 8Ue2lJS4uQGTmhIeshqsBTbs1Izrl87mVevd2pTd4ET38CGaZwmAsIQL/Ueam6LnjW/r mEEoBtNEWb1RN6V42BCxb5C7R/fj4jknM/OkGUvTvcRVzsbP4zK6L9WP2Wr548e7cdLC yZMDhQfjhklnKXNNJCcT6XRQZAQX6JqJmhzaRGtflNi26Ni2TWpctjpngqrDhmp5JClw MgVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=KOt0bgXF; 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 l12-20020a170903120c00b0015ce750db24si550933plh.486.2022.05.10.16.30.26; Tue, 10 May 2022 16:30:40 -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=fail header.i=@nbd.name header.s=20160729 header.b=KOt0bgXF; 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 S232538AbiEJWGp (ORCPT + 99 others); Tue, 10 May 2022 18:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbiEJWGo (ORCPT ); Tue, 10 May 2022 18:06:44 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 870451E7; Tue, 10 May 2022 15:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Subject: From:References:Cc:To:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=BhPDuCZhU013enU/ezL39tFkaksHmV+NLwg0WAYz1Ww=; b=KOt0bgXFpEGiFG29hcGikLWsBW kCtuR/Jf4HUtRukiWGZZ1fBe+6W/yhShGpA69RR/Y72BX/9p/jbPkkuYkMJpxrcEXQ3SA/KurEZnb vuhmwEz1Tmy5Qm5pElBsb3TqqpBXYHmILip3WOveBFZhHS7IAQSoX8W7oAiPasydoDkQ=; Received: from p200300daa70ef200adfdb724d8b39c56.dip0.t-ipconnect.de ([2003:da:a70e:f200:adfd:b724:d8b3:9c56] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1noXzv-0001pa-2S; Wed, 11 May 2022 00:06:27 +0200 Message-ID: Date: Wed, 11 May 2022 00:06:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: Vladimir Oltean 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 References: <20220510094014.68440-1-nbd@nbd.name> <20220510123724.i2xqepc56z4eouh2@skbuf> <5959946d-1d34-49b9-1abe-9f9299cc194e@nbd.name> <20220510165233.yahsznxxb5yq6rai@skbuf> From: Felix Fietkau Subject: Re: [PATCH v2] net: dsa: tag_mtk: add padding for tx packets In-Reply-To: <20220510165233.yahsznxxb5yq6rai@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE,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 On 10.05.22 18:52, Vladimir Oltean wrote: > 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). I don't know where exactly these packets are discarded. After digging through the devices I used during the tests, I just found some leftover pcap files that show the differences in the received packets. Since the packets are bigger after my patch, I can't rule out that packet size instead of the padding may have made a difference here in getting the ARP requests accepted by the receiver. I've extracted the ARP requests and you can find them here: http://nbd.name/arp-broken.pcap http://nbd.name/arp-working.pcap - Felix