diff mbox series

[net-next,3/9] net: Add MDB bulk deletion device operation

Message ID 20231217083244.4076193-4-idosch@nvidia.com (mailing list archive)
State Accepted
Commit 1a36e0f50f963465e9b2b980d250ab38b8fcd7a3
Delegated to: Netdev Maintainers
Headers show
Series Add MDB bulk deletion support | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5200 this patch: 5200
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 1358 this patch: 1358
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 5527 this patch: 5527
netdev/checkpatch warning WARNING: line length of 84 exceeds 80 columns
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ido Schimmel Dec. 17, 2023, 8:32 a.m. UTC
Add MDB net device operation that will be invoked by rtnetlink code in
response to received 'RTM_DELMDB' messages with the 'NLM_F_BULK' flag
set. Subsequent patches will implement the operation in the bridge and
VXLAN drivers.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
---
 include/linux/netdevice.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Nikolay Aleksandrov Dec. 18, 2023, 10:08 a.m. UTC | #1
On 17/12/2023 10:32, Ido Schimmel wrote:
> Add MDB net device operation that will be invoked by rtnetlink code in
> response to received 'RTM_DELMDB' messages with the 'NLM_F_BULK' flag
> set. Subsequent patches will implement the operation in the bridge and
> VXLAN drivers.
> 
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> ---
>   include/linux/netdevice.h | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 1b935ee341b4..75c7725e5e4f 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1329,6 +1329,9 @@ struct netdev_net_notifier {
>    * 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_del_bulk)(struct net_device *dev, struct nlattr *tb[],
> + *			   struct netlink_ext_ack *extack);
> + *	Bulk deletes MDB entries 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
> @@ -1611,6 +1614,9 @@ struct net_device_ops {
>   	int			(*ndo_mdb_del)(struct net_device *dev,
>   					       struct nlattr *tb[],
>   					       struct netlink_ext_ack *extack);
> +	int			(*ndo_mdb_del_bulk)(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);

Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
diff mbox series

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1b935ee341b4..75c7725e5e4f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1329,6 +1329,9 @@  struct netdev_net_notifier {
  * 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_del_bulk)(struct net_device *dev, struct nlattr *tb[],
+ *			   struct netlink_ext_ack *extack);
+ *	Bulk deletes MDB entries 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
@@ -1611,6 +1614,9 @@  struct net_device_ops {
 	int			(*ndo_mdb_del)(struct net_device *dev,
 					       struct nlattr *tb[],
 					       struct netlink_ext_ack *extack);
+	int			(*ndo_mdb_del_bulk)(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);