bridge.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Cc: petrm@nvidia.com, mlxsw@nvidia.com, razor@blackwall.org,
	Ido Schimmel <idosch@nvidia.com>,
	edumazet@google.com, roopa@nvidia.com, kuba@kernel.org,
	pabeni@redhat.com, davem@davemloft.net
Subject: [Bridge] [PATCH net-next v2 01/11] net: Add MDB net device operations
Date: Wed, 15 Mar 2023 15:11:45 +0200	[thread overview]
Message-ID: <20230315131155.4071175-2-idosch@nvidia.com> (raw)
In-Reply-To: <20230315131155.4071175-1-idosch@nvidia.com>

Add MDB net device operations that will be invoked by rtnetlink code in
response to received RTM_{NEW,DEL,GET}MDB messages. Subsequent patches
will implement these operations in the bridge and VXLAN drivers.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
---
 include/linux/netdevice.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ee483071cf59..23b0d7eaaadd 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1307,6 +1307,17 @@ struct netdev_net_notifier {
  *	Used to add FDB entries to dump requests. Implementers should add
  *	entries to skb and update idx with the number of entries.
  *
+ * int (*ndo_mdb_add)(struct net_device *dev, struct nlattr *tb[],
+ *		      u16 nlmsg_flags, struct netlink_ext_ack *extack);
+ *	Adds an MDB entry to dev.
+ * int (*ndo_mdb_del)(struct net_device *dev, struct nlattr *tb[],
+ *		      struct netlink_ext_ack *extack);
+ *	Deletes the MDB entry from dev.
+ * int (*ndo_mdb_dump)(struct net_device *dev, struct sk_buff *skb,
+ *		       struct netlink_callback *cb);
+ *	Dumps MDB entries from dev. The first argument (marker) in the netlink
+ *	callback is used by core rtnetlink code.
+ *
  * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh,
  *			     u16 flags, struct netlink_ext_ack *extack)
  * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq,
@@ -1569,6 +1580,16 @@ struct net_device_ops {
 					       const unsigned char *addr,
 					       u16 vid, u32 portid, u32 seq,
 					       struct netlink_ext_ack *extack);
+	int			(*ndo_mdb_add)(struct net_device *dev,
+					       struct nlattr *tb[],
+					       u16 nlmsg_flags,
+					       struct netlink_ext_ack *extack);
+	int			(*ndo_mdb_del)(struct net_device *dev,
+					       struct nlattr *tb[],
+					       struct netlink_ext_ack *extack);
+	int			(*ndo_mdb_dump)(struct net_device *dev,
+						struct sk_buff *skb,
+						struct netlink_callback *cb);
 	int			(*ndo_bridge_setlink)(struct net_device *dev,
 						      struct nlmsghdr *nlh,
 						      u16 flags,
-- 
2.37.3


  reply	other threads:[~2023-03-15 13:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 13:11 [Bridge] [PATCH net-next v2 00/11] vxlan: Add MDB support Ido Schimmel
2023-03-15 13:11 ` Ido Schimmel [this message]
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 02/11] bridge: mcast: Implement MDB net device operations Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 03/11] rtnetlink: bridge: mcast: Move MDB handlers out of bridge driver Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 04/11] rtnetlink: bridge: mcast: Relax group address validation in common code Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 05/11] vxlan: Move address helpers to private headers Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 06/11] vxlan: Expose vxlan_xmit_one() Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 07/11] vxlan: mdb: Add MDB control path support Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 08/11] vxlan: mdb: Add an internal flag to indicate MDB usage Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 09/11] vxlan: Add MDB data path support Ido Schimmel
2023-03-16  8:55   ` Nikolay Aleksandrov
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 10/11] vxlan: Enable MDB support Ido Schimmel
2023-03-15 13:11 ` [Bridge] [PATCH net-next v2 11/11] selftests: net: Add VXLAN MDB test Ido Schimmel
2023-03-17  8:30 ` [Bridge] [PATCH net-next v2 00/11] vxlan: Add MDB support 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=20230315131155.4071175-2-idosch@nvidia.com \
    --to=idosch@nvidia.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).