Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2780135rdh; Mon, 30 Oct 2023 07:32:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmnj66kE4YyjupvYYH5prwVcfwKBoF1k6Sfh9e9YZyY+aHjt7g8RygFa/Z9Tb6f+k4Zon/ X-Received: by 2002:a05:6a21:498a:b0:180:572:4da1 with SMTP id ax10-20020a056a21498a00b0018005724da1mr4049697pzc.43.1698676363278; Mon, 30 Oct 2023 07:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698676362; cv=none; d=google.com; s=arc-20160816; b=mk7jKvHQiQY9epS3MfLfItiw+3mVYm5IAPZ7mw8PTJ2zBYYdoBZpw2k5lWKyopHfbj RkC81u/LfBRvW0xWuEBhx3O8BSNE1KmkMSt0DG6nl49MEt/9praOr6ShMy35E8XNEpgX fukvJWVvyhwoJNPOuxBPieQmfS8zc7gPhb7UAFQ9bw0p+5+AI0bDVoIAZgLxvIE0iH2R LjAZ0cd4DfRrGLZw/CXFbEzq3zdVq/6SbNU1eo2q+3zy6NXZPg7ssEiB9ajCMUSu/6If A3NXEOLUgFFf7yaAG9rQcSPdaOorfTD3u9CXHtSKW6V2aAcnxzxLe4HEUVa1QzlnwwK9 rmNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0Q3e+9Dye+AbU45RL0bBxhWInqMv+UlfyAdFx9gSTY4=; fh=nRtvRcjavZ5qBts/EwhPnPlzb1jLi+jR0x5miF/EaN8=; b=qiMhZR4B2MkOSLAO1XrGYEY4+ahvaHmr3So6HPQsTaetVPx9O41BqbvOQLxVHaF7FZ WAmDaP9/GrvGuWQ9mn3ATi3yrpqbZLdzQkb5UqIZ0PEx79BNbaV9KhW/OWc1O3kA9TAW zxv6s+HS5/GWL4H7rCyqTsG664gnpUAa3+ogVfLdJt+tX3R1ofy9Tu844KzGtpYPzp8f 255VL6DFVB2hA/QFimUoBHMgOoLDPFrfBABEY6YmnbbxJjVl3PTs7K6Bo0s6ZBsH+CmO WO5DREJgQzPmNMMLWS1a69r6r1v1fl20lxj7/jFx6NFCr1aG2PgD/2ofYNSKfIOoyd5+ GsFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wq/n0IPK"; 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 j11-20020a056a00174b00b006be264b2734si5141339pfc.29.2023.10.30.07.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 07:32:42 -0700 (PDT) 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="wq/n0IPK"; 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 AD9FB805EAE9; Mon, 30 Oct 2023 07:32:39 -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 S233362AbjJ3OcZ (ORCPT + 99 others); Mon, 30 Oct 2023 10:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231845AbjJ3OcZ (ORCPT ); Mon, 30 Oct 2023 10:32:25 -0400 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6778C1 for ; Mon, 30 Oct 2023 07:32:22 -0700 (PDT) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5a7ac4c3666so41206717b3.3 for ; Mon, 30 Oct 2023 07:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698676342; x=1699281142; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0Q3e+9Dye+AbU45RL0bBxhWInqMv+UlfyAdFx9gSTY4=; b=wq/n0IPKN1XEu8WUz0E95SxTT/HjjRfSP13HJeL5dm9Tmj/1kSfIvfd4ObgBkaRYgD dxXCaNL05ZszXRxTup4OL+ZC7EITkb+k7Bvif07LKQIH4lANBCFRt7gWB26KlimwLoPd 5wCU42syIAU7IKoXHfrRDGMbR8+HgYICHf4oSC0ZFKeLKIpN3lzvRahpfttfCIkbFwJG 8+uzdwtZkGjoskZGR37wYTeVXyUTSH83DZz30udwYvDlsGPSgaY6VWzB66UBqxm6uWa+ YPP4wslu9qr9Roy+TJltDjfdf+VIy6T3X2dGYgSY7yfaHdYNlnOEqVtenmPy1EHVTdMT AiKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698676342; x=1699281142; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Q3e+9Dye+AbU45RL0bBxhWInqMv+UlfyAdFx9gSTY4=; b=c5xErIuwX15l7D/6d0oBN/6iQun648hp7U2kQl45N4YR07PeUD3aMRl7fWGeSMA9P8 QVYf5ou51yzEAu7FTyKQCZ/lRs7ojn8YuAQkxpKvcvpzmwv9Ylc5FTFrakQdqsClkTST bMWx/e4hQU9HwCBRPxfKZnq9qp669hq33uwftpo2Xevgp/UcQILkPsoEREViWjuz5ntY 5WZwGcmhzS6hTVJ3q7DfEvPyVnfwNtSprPjo6pFOC57Ik/JmO3TVSbe3iFI0zSG32kYJ BSecX8JJCA32UplINPzmOJ1oJe1JvciJnZGF+MSsWIGQC7LnjHoJo7RApPcHy5TiMlUL ykCQ== X-Gm-Message-State: AOJu0YyQiQXBs246EyoJZng1DeNRsrKnPOc0z0sknyxVqCTvyBSAUs+z 0J9cB79iI6z56SV07pLBGJc1Xq0XfYmHkwZ7Xt3ojw== X-Received: by 2002:a81:ac46:0:b0:5a7:c8a9:79e8 with SMTP id z6-20020a81ac46000000b005a7c8a979e8mr9600015ywj.4.1698676341819; Mon, 30 Oct 2023 07:32:21 -0700 (PDT) MIME-Version: 1.0 References: <20231027-fix-rtl8366rb-v1-1-d565d905535a@linaro.org> <95f324af-88de-4692-966f-588287305e09@gmail.com> <20231030125127.xccqwct3jgg6o2rl@skbuf> In-Reply-To: <20231030125127.xccqwct3jgg6o2rl@skbuf> From: Linus Walleij Date: Mon, 30 Oct 2023 15:32:10 +0100 Message-ID: Subject: Re: [PATCH] dsa: tag_rtl4_a: Bump min packet size To: Vladimir Oltean , DENG Qingfang Cc: Florian Fainelli , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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]); Mon, 30 Oct 2023 07:32:39 -0700 (PDT) Hi Deng, do you have some comments on the below, pertaining to commit 9eb8bc593a5eed167dac2029abef343854c5ba75 "net: dsa: tag_rtl4_a: fix egress tags"? I plan to test without the ZLEN padding and see what happens. IIRC it wasn't working without that, but I may just misremember the whole thing so let's rehash this. On Mon, Oct 30, 2023 at 1:51=E2=80=AFPM Vladimir Oltean = wrote: > What you are missing is that the existing padding done by rtl4a_tag_xmit(= ) > shouldn't be normally needed except for exceptional cases. > > Socket buffers smaller than ETH_ZLEN can be passed to any network > device, and it is expected that either the driver or the hardware pads > up to ETH_ZLEN automatically. Thus, the conduit driver should already > know that it needs to pad packets to ETH_ZLEN. > > The exceptional cases are: > - This is a tail tag (not the case here), which by definition needs to > be located at the end of the skb. If you first put the tag then let > the conduit interface pad, then the tail tag is no longer at the tail. > So in that case, DSA pads first in generic code - dsa_user_xmit(). > - The switch must handle the case where, after stripping the DSA tag > from a ETH_ZLEN sized packet coming from the CPU port, it re-pads the > packet on user port egress. Some switches don't handle that properly, > and thus, we have isolated __skb_put_padto() calls within certain > tagging protocols which address just that case. > > So, what Florian was asking is whether the conduit interface is not > doing its expected job properly. You clarified that the problem is big > rather than small packets, but we still need an explanation for the > existing __skb_put_padto() call, given that it seems that it was placed > there due to a misunderstanding rather than due to an explicit need for > an exceptional case. Yours, Linus Walleij