Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp24965347rwd; Sun, 2 Jul 2023 07:55:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9ED+XAJdSuARYvYyneyqE9+rEmFskZxPr6ZW32z1xZjivZqndU8kPGq1tQUqjpFEDrBJ9 X-Received: by 2002:a17:902:c94d:b0:1b8:64a9:ea60 with SMTP id i13-20020a170902c94d00b001b864a9ea60mr6748128pla.53.1688309748816; Sun, 02 Jul 2023 07:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688309748; cv=none; d=google.com; s=arc-20160816; b=Fg7zPSymbr81Aau4nAYq4NK2fFjzlFW8HGT+mrphMxdZ87GU3qfxVMaqdN1WME2gyC 53ZxFh7EhWay4T//g9QHUo2yjReQXdvBXt17ruF1hpBrglai/pSza4EdnW0Tk6wEk0dg sBjKsVEOEMp8jYZeo9WXxWbuzZoywE9bUiNq+sDevdLEBg3T1FgWbFU+reDLGl2uxXGK 2bVMPHh2RB5GIyQMjReRztzGPVfHXn0BcWTkoT/Nlzc4Dz/thDam4wPf0dxz/bRCbucq Qq6sd1urQVaM7J73Y6T7UvwY5gkoonDXAI8u9MOydPiQH4yf2DqzkCGLN3dhCvBeddb7 +gFQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=UmWE/+OVbbOkp5arD2QWZvot2DrqmmBuebMCluZRLlU=; fh=nGoKxUbOaXo3ZiKvmWV7kyL/lpy559fgR6pmKUQ49yo=; b=i0492Rajy2cr4VuofYuyRt8bTjA/xXc2XYbiLUrpjPvvkhjCXPWAUInwEWwjKxYRyA D8dlrwD/RBBhG196M2GvruxbiedD9JifnaARxXWweTRCfD/1KT24DlTguiWBKd84TzSE Z8tsr//8WgrOIyDsvUqc4BfEBgxivfijkgydKBiSnO4Uf7LQrsWABZdM0DFgPwN8GBK8 NeSsdUjR3Kr33ue3GCjhFBvMmxMTIjZk0GmEx1S0hefYEJpWqXReIB8QdHwZO9Rfv/MA kCJnBNmDrRGtpXZArxrqr5zGgp0c8b3AK9dc3ZjKxa2W6c5Jtl7zQAyQ/7FcxAshMqak J5lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lNRv7Y75; 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 t14-20020a17090aae0e00b002632c1fc68dsi9348206pjq.72.2023.07.02.07.55.32; Sun, 02 Jul 2023 07:55:48 -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=20221208 header.b=lNRv7Y75; 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 S229701AbjGBOj0 (ORCPT + 99 others); Sun, 2 Jul 2023 10:39:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjGBOjZ (ORCPT ); Sun, 2 Jul 2023 10:39:25 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A996E5E; Sun, 2 Jul 2023 07:39:24 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fbc0609cd6so32806135e9.1; Sun, 02 Jul 2023 07:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688308763; x=1690900763; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UmWE/+OVbbOkp5arD2QWZvot2DrqmmBuebMCluZRLlU=; b=lNRv7Y75jNaGFaUzZiem2M/SVeM3fbfAZ2EusS/EMwnVwHUh0Cv1PfUnIFhv4H8lE6 lKwxA087yawS86B9xez2UO6UautuAP+licyJ6B0t7jfXDPHacrB39pAFwDn8QtnQ7Pop aQg5u+IdBtfy0ELpbytYq4xfZUy4qGRr0rUNxHBdQLUSgNrawDc9gOc6/yzKu0F8/kHc wgssOsenVfMe8LcpkB928c/QXt9LlOP2ovMBlqaEM7ZVbTrYp+IvBmvU1JBnvrxbyP4V wGTpuQlxehoeGq4n5GczTrRoghdODGH95Ti9V2H1cZxU/5MxO/Lh1aMhPyeNWo0/Sxqn xQUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688308763; x=1690900763; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UmWE/+OVbbOkp5arD2QWZvot2DrqmmBuebMCluZRLlU=; b=a3/iD7s11XiDWXf8NhRKXh1T+5uhqDLK1+95inoTe5U9kWiOtiu2aCv/QenRG/R8rL wBbrAE9GvecnsYTJkXO5zaGnyHEupj0+cDe7PY1uBpgvhKDDXlBFhb080N+Aub/iKPp4 4EB2UcTgffMU0JVhWKr6/GmK5aXCPQjyoz3l8YnNqwvAejTSYxO5ZrmCf7Ps9PgxG5MU rntWO9d1koH7256wFqC34pkN3/uDNtCW0+zkz9mo3+qc7pj/j9B2EldhczNBQvlubK4B D+2W7uIfxsNp7BTH2+kRsL3HVm7ohA5JezSrYPHlJcYc4hEbdEh1xmHQiFVHp6cQAesd 2BtA== X-Gm-Message-State: AC+VfDwhK8qoPBYYwV6ZPN0ZDbmy1x9i9P4R5CCP6+PHDppzIDHEcbHd WvI5QKymw5idwul1h4haxGo= X-Received: by 2002:a7b:ce0a:0:b0:3fb:b1fd:4172 with SMTP id m10-20020a7bce0a000000b003fbb1fd4172mr5612865wmc.22.1688308762593; Sun, 02 Jul 2023 07:39:22 -0700 (PDT) Received: from ?IPV6:2a01:cb05:86f5:6700:2cba:4a71:c713:649b? (2a01cb0586f567002cba4a71c713649b.ipv6.abo.wanadoo.fr. [2a01:cb05:86f5:6700:2cba:4a71:c713:649b]) by smtp.gmail.com with ESMTPSA id c23-20020a05600c0ad700b003fbc9371193sm6305550wmr.13.2023.07.02.07.39.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Jul 2023 07:39:21 -0700 (PDT) Message-ID: Date: Sun, 2 Jul 2023 16:39:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH net 2/2] net: dsa: sja1105: always enable the send_meta options Content-Language: en-US To: Vladimir Oltean , netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org References: <20230629141453.1112919-1-vladimir.oltean@nxp.com> <20230629141453.1112919-3-vladimir.oltean@nxp.com> From: Florian Fainelli In-Reply-To: <20230629141453.1112919-3-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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 6/29/2023 4:14 PM, Vladimir Oltean wrote: > incl_srcpt has the limitation, mentioned in commit b4638af8885a ("net: > dsa: sja1105: always enable the INCL_SRCPT option"), that frames with a > MAC DA of 01:80:c2:xx:yy:zz will be received as 01:80:c2:00:00:zz unless > PTP RX timestamping is enabled. > > The incl_srcpt option was initially unconditionally enabled, then that > changed with commit 42824463d38d ("net: dsa: sja1105: Limit use of > incl_srcpt to bridge+vlan mode"), then again with b4638af8885a ("net: > dsa: sja1105: always enable the INCL_SRCPT option"). Bottom line is that > it now needs to be always enabled, otherwise the driver does not have a > reliable source of information regarding source_port and switch_id for > link-local traffic (tag_8021q VLANs may be imprecise since now they > identify an entire bridging domain when ports are not standalone). > > If we accept that PTP RX timestamping (and therefore, meta frame > generation) is always enabled in hardware, then that limitation could be > avoided and packets with any MAC DA can be properly received, because > meta frames do contain the original bytes from the MAC DA of their > associated link-local packet. > > This change enables meta frame generation unconditionally, which also > has the nice side effects of simplifying the switch control path > (a switch reset is no longer required on hwtstamping settings change) > and the tagger data path (it no longer needs to be informed whether to > expect meta frames or not - it always does). > > Fixes: 227d07a07ef1 ("net: dsa: sja1105: Add support for traffic through standalone ports") > Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli -- Florian