mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: MD Danish Anwar <danishanwar@ti.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Diogo Ivo <diogo.ivo@siemens.com>, Andrew Lunn <andrew@lunn.ch>,
	Simon Horman <horms@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <srk@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Roger Quadros <rogerq@kernel.org>
Subject: Re: [PATCH net-next v3] net: ti: icssg-prueth: Add multicast filtering support
Date: Wed, 5 Jun 2024 12:02:59 +0200	[thread overview]
Message-ID: <b52758c4-a0f4-4cda-9bd0-5ff022a9c9d0@intel.com> (raw)
In-Reply-To: <20240605095223.2556963-1-danishanwar@ti.com>



On 05.06.2024 11:52, MD Danish Anwar wrote:
> Add multicast filtering support for ICSSG Driver. Multicast addresses will
> be updated by __dev_mc_sync() API. icssg_prueth_add_macst () and
> icssg_prueth_del_mcast() will be sync and unsync APIs for the driver
> respectively.
> 
> To add a mac_address for a port, driver needs to call icssg_fdb_add_del()
> and pass the mac_address and BIT(port_id) to the API. The ICSSG firmware
> will then configure the rules and allow filtering.
> 
> If a mac_address is added to port0 and the same mac_address needs to be
> added for port1, driver needs to pass BIT(port0) | BIT(port1) to the
> icssg_fdb_add_del() API. If driver just pass BIT(port1) then the entry for
> port0 will be overwritten / lost. This is a design constraint on the
> firmware side.
> 
> To overcome this in the driver, to add any mac_address for let's say portX
> driver first checks if the same mac_address is already added for any other
> port. If yes driver calls icssg_fdb_add_del() with BIT(portX) |
> BIT(other_existing_port). If not, driver calls icssg_fdb_add_del() with
> BIT(portX).
> 
> The same thing is applicable for deleting mac_addresses as well. This
> logic is in icssg_prueth_add_mcast / icssg_prueth_del_mcast APIs.
> 
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> ---
> Cc: Wojciech Drewek <wojciech.drewek@intel.com>
> 
> v2 -> v3:
> *) Using __dev_mc_sync() instead of __hw_addr_sync_dev().
> *) Stopped keeping local copy of multicast list as pointed out by
>    Wojciech Drewek <wojciech.drewek@intel.com>

Thank you!
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>

> 
> v1 -> v2:
> *) Rebased on latest net-next/main.
> 
> NOTE: This series can be applied cleanly on the tip of net-next/main. This
> series doesn't depend on any other ICSSG driver related series that is
> floating around in netdev.
> 
> v1 https://lore.kernel.org/all/20240516091752.2969092-1-danishanwar@ti.com/
> v2 https://lore.kernel.org/all/20240604114402.1835973-1-danishanwar@ti.com/
> 
>  drivers/net/ethernet/ti/icssg/icssg_prueth.c | 38 +++++++++++++++++---
>  1 file changed, 34 insertions(+), 4 deletions(-)
> 

<...>


  reply	other threads:[~2024-06-05 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05  9:52 MD Danish Anwar
2024-06-05 10:02 ` Wojciech Drewek [this message]
2024-06-07 13:32 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b52758c4-a0f4-4cda-9bd0-5ff022a9c9d0@intel.com \
    --to=wojciech.drewek@intel.com \
    --cc=andrew@lunn.ch \
    --cc=dan.carpenter@linaro.org \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®