[RFC PATCH net-next 0/2] Add multicast filtering support for ICSSG driver

MD Danish Anwar danishanwar at ti.com
Thu May 16 02:17:50 PDT 2024


This series add multicast filtering support for ICSSG driver.

The patch 1/2 of the series introduces helper APIs needed to configure
FDB tables maintained by firmware.

Patch 2/2 introduces the support for multicast filtering.

The driver will keep a copy of multicast addresses in emac->mcast_list.
This list will be kept in sync with the netdev list and to add / del
multicast address icssg_prueth_mac_add_mcast / icssg_prueth_mac_del_mcast
APIs will be called.

To add a mac_address for a port, driver need 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_mac_add_mcast / icssg_prueth_mac_del_mcast APIs.

MD Danish Anwar (2):
  net: ti: icssg-prueth: Add helper functions to configure FDB
  net: ti: icssg-prueth: Add multicast filtering support

 drivers/net/ethernet/ti/icssg/icssg_config.c | 186 ++++++++++++++++++-
 drivers/net/ethernet/ti/icssg/icssg_config.h |  19 ++
 drivers/net/ethernet/ti/icssg/icssg_prueth.c |  50 ++++-
 drivers/net/ethernet/ti/icssg/icssg_prueth.h |  15 ++
 4 files changed, 263 insertions(+), 7 deletions(-)


base-commit: 654de42f3fc6edc29d743c1dbcd1424f7793f63d
-- 
2.34.1




More information about the linux-arm-kernel mailing list