Ethernet Bridge development
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: Nikolay Aleksandrov <razor@blackwall.org>,
	bridge@lists.linux-foundation.org, idosch@idosch.org,
	roopa@nvidia.com, kuba@kernel.org, davem@davemloft.net
Subject: [Bridge] [PATCH net-next v2 2/8] net: add ndo_fdb_flush op
Date: Mon, 11 Apr 2022 20:29:28 +0300	[thread overview]
Message-ID: <20220411172934.1813604-3-razor@blackwall.org> (raw)
In-Reply-To: <20220411172934.1813604-1-razor@blackwall.org>

Add a new netdev op called ndo_fdb_flush, it will be later used for
driver-specific flush implementation dispatched from rtnetlink. The first
user will be the bridge.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
---
 include/linux/netdevice.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 28ea4f8269d4..16d67e40053c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1265,6 +1265,12 @@ struct netdev_net_notifier {
  *		       int *idx)
  *	Used to add FDB entries to dump requests. Implementers should add
  *	entries to skb and update idx with the number of entries.
+ * int (*ndo_fdb_flush)(struct ndmsg *ndm, struct nlattr *tb[],
+ *			struct net_device *dev,
+ *			u16 vid,
+ *			struct netlink_ext_ack *extack);
+ *	Used to flush FDB entries. Filter attributes can be specified to delete
+ *	only matching FDB entries if implementers support it.
  *
  * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh,
  *			     u16 flags, struct netlink_ext_ack *extack)
@@ -1515,6 +1521,11 @@ struct net_device_ops {
 						struct net_device *dev,
 						struct net_device *filter_dev,
 						int *idx);
+	int			(*ndo_fdb_flush)(struct ndmsg *ndm,
+						 struct nlattr *tb[],
+						 struct net_device *dev,
+						 u16 vid,
+						 struct netlink_ext_ack *extack);
 	int			(*ndo_fdb_get)(struct sk_buff *skb,
 					       struct nlattr *tb[],
 					       struct net_device *dev,
-- 
2.35.1


  parent reply	other threads:[~2022-04-11 17:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 17:29 [Bridge] [PATCH net-next v2 0/8] net: bridge: add flush filtering support Nikolay Aleksandrov
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 1/8] net: rtnetlink: add RTM_FLUSHNEIGH Nikolay Aleksandrov
2022-04-11 22:57   ` David Ahern
2022-04-11 17:29 ` Nikolay Aleksandrov [this message]
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 3/8] net: bridge: fdb: add ndo_fdb_flush op Nikolay Aleksandrov
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 4/8] net: rtnetlink: register a generic rtnl_fdb_flush call Nikolay Aleksandrov
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 5/8] net: rtnetlink: add common flush attributes Nikolay Aleksandrov
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 6/8] net: bridge: fdb: add support for fine-grained flushing Nikolay Aleksandrov
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 7/8] net: bridge: fdb: add support for flush filtering based on ndm flags and state Nikolay Aleksandrov
2022-04-11 17:29 ` [Bridge] [PATCH net-next v2 8/8] net: bridge: fdb: add support for flush filtering based on ifindex and vlan Nikolay Aleksandrov
2022-04-11 17:42 ` [Bridge] [PATCH net-next v2 0/8] net: bridge: add flush filtering support Nikolay Aleksandrov
2022-04-11 18:08 ` Roopa Prabhu
2022-04-11 18:18   ` Nikolay Aleksandrov
2022-04-11 18:31     ` Nikolay Aleksandrov
2022-04-11 19:22       ` Roopa Prabhu
2022-04-11 19:49         ` Jakub Kicinski
2022-04-11 20:34           ` Nikolay Aleksandrov
2022-04-11 20:48             ` Jakub Kicinski
2022-04-11 21:17               ` Nikolay Aleksandrov
2022-04-11 21:35                 ` Jakub Kicinski
2022-04-11 23:03         ` David Ahern

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=20220411172934.1813604-3-razor@blackwall.org \
    --to=razor@blackwall.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@nvidia.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