From: MD Danish Anwar <danishanwar@ti.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Diogo Ivo <diogo.ivo@siemens.com>,
Jan Kiszka <jan.kiszka@siemens.com>, Andrew Lunn <andrew@lunn.ch>,
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>, <r-gunasekaran@ti.com>,
Roger Quadros <rogerq@kernel.org>,
MD Danish Anwar <danishanwar@ti.com>
Subject: [RFC PATCH net-next 0/2] Add multicast filtering support for ICSSG driver
Date: Thu, 16 May 2024 14:47:50 +0530 [thread overview]
Message-ID: <20240516091752.2969092-1-danishanwar@ti.com> (raw)
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
next reply other threads:[~2024-05-16 9:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 9:17 MD Danish Anwar [this message]
2024-05-16 9:17 ` [RFC PATCH net-next 1/2] net: ti: icssg-prueth: Add helper functions to configure FDB MD Danish Anwar
2024-05-16 9:17 ` [RFC PATCH net-next 2/2] net: ti: icssg-prueth: Add multicast filtering support MD Danish Anwar
2024-05-30 19:08 ` Simon Horman
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=20240516091752.2969092-1-danishanwar@ti.com \
--to=danishanwar@ti.com \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--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=r-gunasekaran@ti.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®