Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2301224lqb; Mon, 27 May 2024 15:14:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEsQ/9eUwcZmAQ5URSpvYeij2To5BBoK7cNCXIf4xkgVYzTzfHzLs1KYve4kAgYsUibA8oQeVoGvxf49/TmfXh//aQZdc6hXVYcIVWDg== X-Google-Smtp-Source: AGHT+IGnDaelkSUmId9rmMlwSFZ4hSgVXfT9qEJlOAAZ3uhRhiKn85LRkUs14MWHjrZC5pmfLkNi X-Received: by 2002:a05:620a:70f8:b0:792:b8c4:31a6 with SMTP id af79cd13be357-794ab0940b4mr1102018085a.35.1716848092863; Mon, 27 May 2024 15:14:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716848092; cv=pass; d=google.com; s=arc-20160816; b=LgjhlUTjVmNIsLmA1/aoLoRZ5LLLPkrQlwNhpF1dQzeL98s0dyrQW0xC83uA6pYmVA ursPiGAqOFfomBT+mWPO1lERLTbuAiK1hd45/zOoNYuBHPWZoAswLbmaZbTWKkYzXzFP swcyE5i9Qx2IxOFM7+gGEamX4fHPcyaQC0QpkDZ89j4CZIsGXUDd2KRWxtWDiSWTK3uK rKtsRjSY5tRmt2cPZMXSmG4pC43+XLeFUfXcrlIbeE3dvwniUPzNJ5ExmjlHDK4wtCoW OPPJOQqL7QY27+adDPkgPFhke84Z4QrZWm9ICjN2phdrYu+0KUDz+9QLmVu8OK6z9QEs UozA== 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=P3m1mGGdZuBlv9pNaAOCADsgv4akQAfs3EJqTNO+jgw=; fh=AzUWqtGHdeWuBYhghF+P768qBhaZEFaYtYPUBuvcLlc=; b=gITs3UIWfoi28BH3ar/IdJ98utiBE2mF1AKsKfxZt9iTsMBEgZt98JZJtvtZJDGP2A VPknh3YJrurrbKWlf3cJGIU3c3DW1LHly3u44uDi9deboU/vqma1UT5DfCGH2o9zhjDw J3CceMCTYyEYxhnISVyAcG34W4uDwtAQMMCHBzrjbcYhNJcmFWOYiqo89waDEndmBWPj DWSGMiGOpgEhMYldbqdLtLbkY+P8NPMyJREwCz7qwUJu04T4av+w/kYVvgXQEtDGswhS EAsyMxVQeCGGG4MCeSTWzCoTjn9HpAYWM1eaxcCBw3NRmlc7++zB3foFid5GDGQIoNr6 veZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=TG3kesYE; 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-191478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd51e12si864501485a.626.2024.05.27.15.14.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 15:14:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=TG3kesYE; 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-191478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191478-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 95A411C2143E for ; Mon, 27 May 2024 22:14:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7D60167267; Mon, 27 May 2024 22:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="TG3kesYE" 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 7352052F6D; Mon, 27 May 2024 22:14:43 +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=1716848084; cv=none; b=TTlIupnyufbY18xKfTNLEYOoqq3qsjQ46LWVLiNNXz4OGriap31xGV3HGZLK+csaFkt3MEN3ntPjwY3/rtSti3CjQ8NKOYQEYe6spfTMxQdfxurB1TlS8tXT/K1i7zPC0H1bRzIzLmwqYkY9AFLYdz4NJB3OMqC+2d1nQkGBm+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716848084; c=relaxed/simple; bh=MNJ7EaOmKWZ5jc1RxL7pDjEITEQqmj2VizO//tduxEM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=c36RrasjkdRAkF1AMWfJYrDhLsIy080SmxxIi7uYk0GMaq5jnSbfiGcqHwog7zzDioWJ43xVlGZs8w7jNjyiT1Q2XTBekHTrx6YwIQe0EHdsrIh7Q1qvJG90TkRq9jLNMflTgg3sdIGMjJcoFoRee6YWAhTlzOionkslvbqnM+E= 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=TG3kesYE; 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=P3m1mGGdZuBlv9pNaAOCADsgv4akQAfs3EJqTNO+jgw=; b=TG3kesYEvm/+2MM7UvfaDRcasQ NTFdblKpqDjecRvPwAGqBOR9GwxO4LryY2Gru3qkY2ORNjvgXDlGF2Fi+S/bpcbqUqetdcrtF0xhc eou1LE0qZxiEwW6PpFFuPWplSOCjp9T6PAXowj55gsaphPh7qzv2Cr1Awvf3EpEBwAAM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sBibq-00G6o7-9u; Tue, 28 May 2024 00:14:26 +0200 Date: Tue, 28 May 2024 00:14:26 +0200 From: Andrew Lunn To: MD Danish Anwar 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" , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, srk@ti.com, Vignesh Raghavendra Subject: Re: [PATCH net-next v5 3/3] net: ti: icssg-prueth: Add support for ICSSG switch firmware Message-ID: <4f5a6d1b-e209-45b1-acec-ce84ca1c856f@lunn.ch> References: <20240527052738.152821-1-danishanwar@ti.com> <20240527052738.152821-4-danishanwar@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: <20240527052738.152821-4-danishanwar@ti.com> 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 Andrew