diff options
| author | David S. Miller <[email protected]> | 2021-02-13 01:08:05 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-02-13 01:08:05 +0000 |
| commit | 4098ced4680a485c5953f60ac63dff19f3fb3d42 (patch) | |
| tree | 9a5ee02c4090b3bdb06c3f69079d7a08e694eaba /net/switchdev/switchdev.c | |
| parent | octeontx2: Fix condition. (diff) | |
| parent | net: dsa: sja1105: offload bridge port flags to device (diff) | |
| download | kernel-4098ced4680a485c5953f60ac63dff19f3fb3d42.tar.gz kernel-4098ced4680a485c5953f60ac63dff19f3fb3d42.zip | |
Merge branch 'brport-flags'
Vladimir Oltean says:
====================
Cleanup in brport flags switchdev offload for DSA
The initial goal of this series was to have better support for
standalone ports mode on the DSA drivers like ocelot/felix and sja1105.
This turned out to require some API adjustments in both directions:
to the information presented to and by the switchdev notifier, and to
the API presented to the switch drivers by the DSA layer.
====================
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
| -rw-r--r-- | net/switchdev/switchdev.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index 94113ca29dcf..0b84f076591e 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c @@ -488,14 +488,18 @@ static int __switchdev_handle_port_attr_set(struct net_device *dev, struct switchdev_notifier_port_attr_info *port_attr_info, bool (*check_cb)(const struct net_device *dev), int (*set_cb)(struct net_device *dev, - const struct switchdev_attr *attr)) + const struct switchdev_attr *attr, + struct netlink_ext_ack *extack)) { + struct netlink_ext_ack *extack; struct net_device *lower_dev; struct list_head *iter; int err = -EOPNOTSUPP; + extack = switchdev_notifier_info_to_extack(&port_attr_info->info); + if (check_cb(dev)) { - err = set_cb(dev, port_attr_info->attr); + err = set_cb(dev, port_attr_info->attr, extack); if (err != -EOPNOTSUPP) port_attr_info->handled = true; return err; @@ -525,7 +529,8 @@ int switchdev_handle_port_attr_set(struct net_device *dev, struct switchdev_notifier_port_attr_info *port_attr_info, bool (*check_cb)(const struct net_device *dev), int (*set_cb)(struct net_device *dev, - const struct switchdev_attr *attr)) + const struct switchdev_attr *attr, + struct netlink_ext_ack *extack)) { int err; |
