Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2551547rbb; Wed, 28 Feb 2024 05:37:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXV8tCexllJQM4A1JUwVIgcNfHQSfXq7VRWRFd0dEOqlO5AO6Xcg0+YRuZPspa9Pq6FmDd/NUr4da+bv1Ni5BFq9iuNhwUr2dWReVJWKg== X-Google-Smtp-Source: AGHT+IHW4QnWHSJzs0ttIjoLVWyXpagtNMOcyq8bSgZoorj0rznUwP7RhgRw85t+COH/pqLW2Clk X-Received: by 2002:a17:906:5918:b0:a43:f182:66c4 with SMTP id h24-20020a170906591800b00a43f18266c4mr1400190ejq.17.1709127438351; Wed, 28 Feb 2024 05:37:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709127438; cv=pass; d=google.com; s=arc-20160816; b=V9JMdIuRreKZ3n2LhjFTK4jurkuPdwwFmaFkHBwCTUDSjI/eXoOCwP0J30q/nFiBFE /Fw3YecuH6aN9bVC20VtY1NbBRImlt5noX+dvqtL842iSgLup7IT2c2xQNMNuEiRA1Sx FIoh12rOS/wfqTS8kKMeKxtSgJXiPkyktkob7aRFgvLKJ5Vbb73wYZEdgUATT4I0ytvY nF2Yv2AtpCn0KncaNHVZsNHadWuVH7tFH10zkmaXIRnGcSMzQPt1D4GyYKzK6Qxdc7RX qvQY78VqRGqE23eBNx3IJwdCfV7Ch28W8g4nX2g6ULNSvZfATQBJrXQwahW8Oi0YXwRK G/rQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eL1crjPm6iVPDiUZKWfVlS+WUK+mGo0FrxLXMhoPKK4=; fh=pY4tqU6U8XoikHVYu7g0RaxmItbMMdOMgUEFwUJn/so=; b=xMshyGYOMni5qJnhm2xJCG5jYfKIg+Zx8abyFyc1Vs7Jdd8JRpdieP9hOWeYGrWnWM MGnMTfvXLiSYV734a0J9TF+Cjp1DjozRk6C3FGUZhvDsxgawoBKrFn7I39VE2aJrK4aF yHlXNS7gtVxKr00NYUO5SW2tT0hhN+Cud++HubBmJOo6hCVyMGSlmEUTQm9w6BMfjytc RefCLNrtHQ8k8MO00wdowDRFMcAeRr3/zJNfWOqpwsr1CpPVOHR5LoI/vFbbbGLfTfZ2 1O6NATwqSckOakVK1/D8FxwjvpLf2AEtDU1+URWxS0OJD3Bdp/vX1MviK7+f7NsFequE 9ukg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=cIKQPuKh; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-85103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p2-20020a17090653c200b00a3f15778a0dsi1710856ejo.1037.2024.02.28.05.37.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 05:37:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=cIKQPuKh; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-85103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EC66D1F28502 for ; Wed, 28 Feb 2024 13:37:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4421314A4FB; Wed, 28 Feb 2024 13:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="cIKQPuKh" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A812514AD07; Wed, 28 Feb 2024 13:36:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709127421; cv=none; b=O60+CFl5mDqrcRywgkKvVlTSnE/PW2hrTDj/mkblJbekIdRCaL8HOk0frzgYYEYz4pXtcYTZFZs6N465hHKJKjpNqfpWd5GyWF7k5wR+Z6essi4OjW7SxxdcCR0v5pGMqdy9Fml+ebiYM424Ly5nqbkbjzLSw52zcaLAzX3hr20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709127421; c=relaxed/simple; bh=FRzdGDtaDY/ZsN9Pb8CwRvCedMB6DK1NWK7UMLZPETo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uqJlx8b+ELyMm2R2wEBqKRE2w0DzIztZGeSExnvSvJIry5RCf2YYbJEQpQK3zS/Scthc3aFrvplRhV4gEVbLY8t3zgbQwbDe6NipvmMkUdBCs8fZL63LWjMY51W4uMWvcP5EpnNjz4fpyqY020wCbV7Ca6oUSKR+33WSzlDp7k0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=cIKQPuKh; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=eL1crjPm6iVPDiUZKWfVlS+WUK+mGo0FrxLXMhoPKK4=; b=cIKQPuKhhzqJBAMQRvIpdRG070 IvXQiqXjXBMVpNDs9YN5HY9PYMQpkVZHgmD3L4L5SojetMWTZjbtr8kvIqco69/Bs4t9XwiUejmZL MHPi0Bjp+p+vxedZ5DD0PxlnxmN1lUVPg6tmoKBeCCVO4i20vrGsXOypdMAQVDOy9Kho=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rfK7D-008x1J-G2; Wed, 28 Feb 2024 14:36:55 +0100 Date: Wed, 28 Feb 2024 14:36:55 +0100 From: Andrew Lunn To: Siddharth Vadapalli Cc: Jiri Pirko , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, rogerq@kernel.org, vladimir.oltean@nxp.com, hkallweit1@gmail.com, dan.carpenter@linaro.org, horms@kernel.org, yuehaibing@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srk@ti.com Subject: Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Add priv-flag for Switch VLAN Aware mode Message-ID: <10287788-614a-4eef-9c9c-a0ef4039b78f@lunn.ch> References: <20240227082815.2073826-1-s-vadapalli@ti.com> <7d1496da-100a-4336-b744-33e843eba930@ti.com> <49e531f7-9465-40ea-b604-22a3a7f13d62@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49e531f7-9465-40ea-b604-22a3a7f13d62@ti.com> > What if there is no kernel behavior associated with it? How can it be mimicked > then? Simple. Implement the feature in software in the kernel for everybody. Then offload it to your hardware. Your hardware is an accelerator. You use it to accelerate what linux can already do. If Linux does not have the feature your accelerator has, that accelerator feature goes unused. > Please consider the following: > Untagged packets sent from Software via the corresponding VLAN interfaces will > be tagged which is the expected behavior. However, if this is offloaded, it will > imply that even untagged packets that are simply forwarded in the Ethernet > Switch and never get to software will also have to be tagged by the Ethernet > Switch. This is not allowing the choice of leaving untagged packets as-is on the > Ethernet Switch's forwarding path. This patch attempts to allow configuring > something quite similar to this, where it is possible to *choose* whether or not > to tag packets being forwarded. So step back. Forget about your accelerator. Use just a Linux software bridge. Describe what you want the Linux software bridge to do. Andrew