mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
net: switchdev: Add extack to struct switchdev_notifier_info
In order to pass extack to the drivers that need it, add an extack field to struct switchdev_notifier_info, and an extack argument to the function call_switchdev_blocking_notifiers(). Also add a helper function switchdev_notifier_info_to_extack(). Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
69b7320e14
commit
479c86dc55
3 changed files with 17 additions and 4 deletions
|
@ -149,6 +149,7 @@ enum switchdev_notifier_type {
|
|||
|
||||
struct switchdev_notifier_info {
|
||||
struct net_device *dev;
|
||||
struct netlink_ext_ack *extack;
|
||||
};
|
||||
|
||||
struct switchdev_notifier_fdb_info {
|
||||
|
@ -172,6 +173,12 @@ switchdev_notifier_info_to_dev(const struct switchdev_notifier_info *info)
|
|||
return info->dev;
|
||||
}
|
||||
|
||||
static inline struct netlink_ext_ack *
|
||||
switchdev_notifier_info_to_extack(const struct switchdev_notifier_info *info)
|
||||
{
|
||||
return info->extack;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_SWITCHDEV
|
||||
|
||||
void switchdev_deferred_process(void);
|
||||
|
@ -193,7 +200,8 @@ int call_switchdev_notifiers(unsigned long val, struct net_device *dev,
|
|||
int register_switchdev_blocking_notifier(struct notifier_block *nb);
|
||||
int unregister_switchdev_blocking_notifier(struct notifier_block *nb);
|
||||
int call_switchdev_blocking_notifiers(unsigned long val, struct net_device *dev,
|
||||
struct switchdev_notifier_info *info);
|
||||
struct switchdev_notifier_info *info,
|
||||
struct netlink_ext_ack *extack);
|
||||
|
||||
void switchdev_port_fwd_mark_set(struct net_device *dev,
|
||||
struct net_device *group_dev,
|
||||
|
@ -278,7 +286,8 @@ unregister_switchdev_blocking_notifier(struct notifier_block *nb)
|
|||
static inline int
|
||||
call_switchdev_blocking_notifiers(unsigned long val,
|
||||
struct net_device *dev,
|
||||
struct switchdev_notifier_info *info)
|
||||
struct switchdev_notifier_info *info,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue