Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp67669lqo; Wed, 27 Mar 2024 07:11:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4ZWYgf5Zh8RDC5U7251D/Qn0zO5QpFtjvavIo80dlb1V8Mkgs/i0ju+EznsqnQWF+ZkkIDlfz0EEGaCHh/mQwU43p9LBJ7NKa3jdS2g== X-Google-Smtp-Source: AGHT+IGpmcpZ4RsfRLgzZLsytSyVBb1CdrogHqP2h7fLetPrFSVT2oViyBcMzI8c7QwtFBAPvUcg X-Received: by 2002:a17:906:614:b0:a47:3695:dfe4 with SMTP id s20-20020a170906061400b00a473695dfe4mr1875067ejb.11.1711548662410; Wed, 27 Mar 2024 07:11:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711548662; cv=pass; d=google.com; s=arc-20160816; b=M/v8t4jE+Ahe1Es1R4dzb6uPyNJYg2g7IM35+mt6b7a75itsZUjI6Wm/mtW96Ba5xw XrSUr2hBEPqpXIuchN72KkM1WQMFrV4VzfhWXVh5UQf4w6JNeDIba38FFIiYFgeXKOjm YMQTIlUMoFsowJCoRYo0gRpDcPoa3GiQ4jOO8H7yriDYiPklYXLrucZZnH3zQYr3hIac WV40FejXoxHEHTjxgBRGPthlouKUCOgOLg9WGVcfzAhIW0cWWWG8iY8AQXiw6/4NCPyO +dqHXD5dP2nY9yHtXDFwRJthkEL9q8Chz/YW5wLDUc8JDBpv5Q80+OhSET0qvT8frZR7 Ohug== 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=W89r0bsVU2voc8CCyX1FkI6R4xhAvahVaf/LUakcvPc=; fh=mwymctgmpXTJ6jbTT3IKW+2R92NJaC2x2dkyIeCQ+/c=; b=JqNjiFA+LJ4yuPj7GhXOHBCUdwcrDhIt0p1+CzJvu0pp0Z4sBAUZDJ9B02v+Yby4XE cFS3oKuUn0bSJ8aOpwxaTvYQdHgh14GCxnmC/sE1sntOeu8uxSRz0El52MNPJhrXnPqW AHpBRXrXb4WFjKqwRcPHK9AN/oDTBv9OTL55mwwLWtWtzGkGjmEIdYPFpx3L481PT9vd BMEUrMt6HHR4DBbTLAfV0qmkGyhNMXmCKQdU3LpiHJLSrJobAEvsY5UYgTzoze3po3qW GuZmN3XFbR5SfFTnnOBR0fJVByD7eO8C/jHB59zSLX38x8AimldefY9ICQjtWPw/W3S/ hOnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=d2joMcjM; 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-121288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121288-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 v3-20020a1709061dc300b00a46bc7a46dasi4557081ejh.1029.2024.03.27.07.11.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 07:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121288-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=d2joMcjM; 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-121288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121288-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 284351F2F980 for ; Wed, 27 Mar 2024 14:10:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 055E6131BD6; Wed, 27 Mar 2024 12:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="d2joMcjM" 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 007DD12EBDD; Wed, 27 Mar 2024 12:36:23 +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=1711542986; cv=none; b=tIYAF6cB2VPcxWK6tLT2LzjnqXJj1SP6xQzIpFzbRZ1XUNfh4pIzbTWu1YqgXjd+lKPFdwPehcP4CUf3LDYEce8zeYM4sxex+zS/fhigtfWaE84/yqrud/M4joibbxDhiEY0NuEyOeSMmfMX0ZawjktZuR/jtMCiJA4nJHTZIY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711542986; c=relaxed/simple; bh=oWual4D9pynFOAqFc+0csfX9lRZor/YG/q2D8yBbldk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FOjFrYU822uO948yW8KA/TmTrikWc9jt0IcSrnshyXr8fVc646zIGpHebz3XfkJk+h2RUsBbmVcUJerL9YYDEqok6hH4eUi2ni7wTj4HXCk5g/jR+w84M+gEb5JFfvuyZPgPV8eDZY0Fye0XUVXfTCCsPPJKvKKIgpUK0Uyz+DM= 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=d2joMcjM; 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=W89r0bsVU2voc8CCyX1FkI6R4xhAvahVaf/LUakcvPc=; b=d2joMcjMX0dxYY7/Zc+XxdAyUb fPQ77U2Rf+nkpx10PT1uNqjD2l5ZPzPFN0FOb/mfR7jIl6H+rA11CneBdmZRP83hq9LwbDngUjkmC puWTS+yXhcBXG9TbRZJSMWETxH9S0fX2dP6M9yF8C3mnPcLT5pZwPiEX3a5Hga3CIW0g=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rpSVW-00BOJ1-6F; Wed, 27 Mar 2024 13:35:54 +0100 Date: Wed, 27 Mar 2024 13:35:54 +0100 From: Andrew Lunn To: MD Danish Anwar Cc: Diogo Ivo , Rob Herring , Dan Carpenter , Jan Kiszka , Simon Horman , Wolfram Sang , Arnd Bergmann , Vignesh Raghavendra , Vladimir Oltean , 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, r-gunasekaran@ti.com Subject: Re: [PATCH net-next v3 3/3] net: ti: icssg-prueth: Add support for ICSSG switch firmware Message-ID: <27d960ed-8e67-431b-a910-e6b2fc12e292@lunn.ch> References: <20240327114054.1907278-1-danishanwar@ti.com> <20240327114054.1907278-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: <20240327114054.1907278-4-danishanwar@ti.com> On Wed, Mar 27, 2024 at 05:10:54PM +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 > > Switch mode requires loading of new firmware into ICSSG cores. This > means interfaces have to taken down and then reconfigured to switch > mode. Patch 0/3 does not say this. It just shows the interfaces being added to the bridge. There should not be any need to down the interfaces. > Example assuming ETH1 and ETH2 as ICSSG2 interfaces: > > Switch to ICSSG Switch mode: > ip link set dev eth1 down > ip link set dev eth2 down > 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 > ip link set dev eth1 up > ip link set dev eth2 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 set dev eth1 down > ip link set dev eth2 down > ip link del name br0 type bridge > ip link set dev eth1 up > ip link set dev eth2 up > > By default, Dual EMAC firmware is loaded, and can be changed to switch > mode by above steps I keep asking this, so it would be good to explain it in the commit message. What configuration is preserved over a firmware reload, and what is lost? Can i add VLAN in duel MAC mode and then swap into the switch firmware and all the VLANs are preserved? Can i add fdb entries to a port in dual MAC mode, and then swap into the swtich firmware and the FDB table is preserved? What about STP port state? What about ... ? > +bool prueth_dev_check(const struct net_device *ndev) > +{ > + if (ndev->netdev_ops == &emac_netdev_ops && netif_running(ndev)) { > + struct prueth_emac *emac = netdev_priv(ndev); > + > + return emac->prueth->is_switch_mode; > + } > + > + return false; > +} This does not appear to be used anywhere? Andrew