Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2436980lqb; Mon, 27 May 2024 22:29:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVCh3SEflq0WmTeh2f0F+0gyqDUPNhZSQS8AEpcEPDyApuFJATkpAJQSIYOhIJqE1r4ll8NXOen2kJlhMNf0wMF+rUl5kWoWEu04hw/mg== X-Google-Smtp-Source: AGHT+IFnNGD13/sNxGNPe96poMfCh8MzXyjYjaxa8/mUQsgrmTkO+PMPFSCe4kkANWMdkqphylAZ X-Received: by 2002:a05:6512:4cb:b0:521:54b5:86a3 with SMTP id 2adb3069b0e04-5296717fec4mr6941355e87.64.1716874181064; Mon, 27 May 2024 22:29:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716874181; cv=pass; d=google.com; s=arc-20160816; b=mK5ix4pI1dog04iQWYJygg47giLbBKy6LD1789/xW4binX9Qs+G05Os1t83R6vdU7q 1vyMfmsGgNsN9h3v+HFxcZm55ARY8M4gDb8J7prfmSaJbyx9Fh7Ln58rOi9cUp7bZIM7 kKvahEFDjb8fXfwnXPaAGj2ERAXh4GAR+LnQ2WU3SPMTf9jX0TnW+0Q+eME7p4NOFH7L 5NZH+Zma3hQ2UuvOoLPP9AFSH04O/CNZ1Ahs9H36toJqUzzQn575u2nOHgAB4z5jJ1aM TnVmjTt/mghfBUPFvtFapZkkhQgzlVr/WkfqctIstkZAeV0dRgpaWdwUJ8HKqmBLdDFA ICtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Au+V2jHmMZS62BTdB/hRuB16oG3domx+bjJTJ69vBIk=; fh=F+bwuTwEXL69T3u2lWQPCFBNFJOStR7sfp/6/HRmL9k=; b=uAmklJP2Dax3X8M40r1NdwPy4lWKJqpYkmX+aTO4hlH53z1halxGhUAk8PWfrYt7QF GT5oUEP3ACjMEWlACBHDYNptM7TlWeli3UcseStR6nzm0EL8zR6wW5oK4Irq92xhb7Hw G4K3twBgPZTIxixsTvXyJjvpcZpPs5TNG88rg0+xS1f/eoVTSBH3kB0DrQFskvKPbJgb dtMd9U9WcReucz6aes2lEmvKdeEZ2+PyuZAqmKMgJxyJlPsFwSaH+NhwVDQeRujXAdBx 2zdilTFT/6WeP58Rrs94aN4WjjA3Sv/biT8RGzaDOlg74z1nrt1lDRk61rl6EAD1Lk1d TtPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JTEx46+Z; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-191772-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57852386aa4si4641847a12.175.2024.05.27.22.29.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 22:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191772-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JTEx46+Z; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-191772-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 C70771F240C5 for ; Tue, 28 May 2024 05:29:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F3F04D9E9; Tue, 28 May 2024 05:29:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="JTEx46+Z" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 1886A4CB2B; Tue, 28 May 2024 05:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716874170; cv=none; b=K7MgQ+uEl2A9IX0vDstQRS+X6R6ZRGnWPQ6BaSbGCgfLLuau4pat6t19YU30siruorSO6VsK6ZIoFr5UCfAoN8hwHSUdKGnQdrL/FrXPDzB3UpKHpN7olr30e+2GhoJ5uv/VaMe0w3EHHs31n2pw9OAsb4IICbVKHTm6Gr9Ltjs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716874170; c=relaxed/simple; bh=XFd0stmfvih21xWWcU4aTX2RVyZ1rCmh9kUw8IaXCU8=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=IkBSahhw/cndFk8rrWqWzqsCJlehLsbOmZudQtG+8jRfggkg2GXwE9ezFIAlUhdQU5dGWuZqhI1QSlqvZ/sCE/z1TVeAYnQN7N9pGfvmapFrnTAS9uBPMBMIS1DZq/mG0AE7fNWg+5/zPo+NDUzZ6YnKga4+5OR6xUEixrjr0rc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=JTEx46+Z; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44S5SiMX080021; Tue, 28 May 2024 00:28:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716874124; bh=Au+V2jHmMZS62BTdB/hRuB16oG3domx+bjJTJ69vBIk=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=JTEx46+ZULOZHGGJ5blYxkdyCxjO4aEs3hO+5MFDw4uRuFCOFEZ2h5H36f4gLm52K IqmMhU4N1kSsZRZ0YW9lp16HALh+6ZCSSuSFnqmUAX2gjxrvJ7kQJEIpwcE/EP8ayY SIMqg9pVeBmd1x4TXpZus4UPiC/FQ+PcI0pB/5UI= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44S5SiGN018043 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 May 2024 00:28:44 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 28 May 2024 00:28:43 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 28 May 2024 00:28:43 -0500 Received: from [10.24.69.25] (danish-tpc.dhcp.ti.com [10.24.69.25]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44S5Sa7o030705; Tue, 28 May 2024 00:28:37 -0500 Message-ID: Date: Tue, 28 May 2024 10:58:35 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v5 3/3] net: ti: icssg-prueth: Add support for ICSSG switch firmware Content-Language: en-US To: Andrew Lunn CC: Dan Carpenter , Jan Kiszka , Simon Horman , Vladimir Oltean , Wolfram Sang , Niklas Schnelle , Arnd Bergmann , Diogo Ivo , Roger Quadros , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , , , , , Vignesh Raghavendra References: <20240527052738.152821-1-danishanwar@ti.com> <20240527052738.152821-4-danishanwar@ti.com> <4f5a6d1b-e209-45b1-acec-ce84ca1c856f@lunn.ch> From: MD Danish Anwar In-Reply-To: <4f5a6d1b-e209-45b1-acec-ce84ca1c856f@lunn.ch> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 28/05/24 3:44 am, Andrew Lunn wrote: > On Mon, May 27, 2024 at 10:57:38AM +0530, MD Danish Anwar wrote: >> Add support for ICSSG switch firmware using existing Dual EMAC driver >> with switchdev. >> >> Limitations: >> VLAN offloading is limited to 0-256 IDs. >> MDB/FDB static entries are limited to 511 entries and different FDBs can >> hash to same bucket and thus may not completely offloaded >> >> Example assuming ETH1 and ETH2 as ICSSG2 interfaces: >> >> Switch to ICSSG Switch mode: >> ip link add name br0 type bridge >> ip link set dev eth1 master br0 >> ip link set dev eth2 master br0 >> ip link set dev br0 up >> bridge vlan add dev br0 vid 1 pvid untagged self >> >> Going back to Dual EMAC mode: >> >> ip link set dev br0 down >> ip link set dev eth1 nomaster >> ip link set dev eth2 nomaster >> ip link del name br0 type bridge >> >> By default, Dual EMAC firmware is loaded, and can be changed to switch >> mode by above steps >> >> Signed-off-by: MD Danish Anwar >> static int prueth_emac_buffer_setup(struct prueth_emac *emac) >> { >> struct icssg_buffer_pool_cfg __iomem *bpool_cfg; >> @@ -321,25 +401,63 @@ static void icssg_init_emac_mode(struct prueth *prueth) >> /* When the device is configured as a bridge and it is being brought >> * back to the emac mode, the host mac address has to be set as 0. >> */ >> + u32 addr = prueth->shram.pa + EMAC_ICSSG_SWITCH_DEFAULT_VLAN_TABLE_OFFSET; >> + int i; >> u8 mac[ETH_ALEN] = { 0 }; > > nitpick: Reverse Christmas tree > > Reviewed-by: Andrew Lunn Thanks for the review. I will change this to "Reverse Christmas tree" and send next revision. > > Andrew -- Thanks and Regards, Danish