lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 16 May 2024 14:47:50 +0530
From: MD Danish Anwar <danishanwar@...com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
        Diogo Ivo
	<diogo.ivo@...mens.com>,
        Jan Kiszka <jan.kiszka@...mens.com>, Andrew Lunn
	<andrew@...n.ch>,
        Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski
	<kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller"
	<davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <srk@...com>,
        Vignesh Raghavendra
	<vigneshr@...com>, <r-gunasekaran@...com>,
        Roger Quadros <rogerq@...nel.org>,
        MD Danish Anwar <danishanwar@...com>
Subject: [RFC PATCH net-next 0/2] Add multicast filtering support for ICSSG driver

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ