net: remove ndo_neigh_{construct, destroy} from stacked devices
authorIdo Schimmel <idosch@mellanox.com>
Mon, 6 Feb 2017 15:20:14 +0000 (16:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2017 16:25:57 +0000 (11:25 -0500)
In commit 18bfb924f000 ("net: introduce default neigh_construct/destroy
ndo calls for L2 upper devices") we added these ndos to stacked devices
such as team and bond, so that calls will be propagated to mlxsw.

However, previous commit removed the reliance on these ndos and no new
users of these ndos have appeared since above mentioned commit. We can
therefore safely remove this dead code.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/team/team.c
include/linux/netdevice.h
net/8021q/vlan_dev.c
net/bridge/br_device.c
net/core/dev.c

index e6af04716cf7e86dd422b1acfe17490659b815db..6321f12630c8c5fb6277097dea1a847549f92d4f 100644 (file)
@@ -4145,8 +4145,6 @@ static const struct net_device_ops bond_netdev_ops = {
        .ndo_add_slave          = bond_enslave,
        .ndo_del_slave          = bond_release,
        .ndo_fix_features       = bond_fix_features,
-       .ndo_neigh_construct    = netdev_default_l2upper_neigh_construct,
-       .ndo_neigh_destroy      = netdev_default_l2upper_neigh_destroy,
        .ndo_bridge_setlink     = switchdev_port_bridge_setlink,
        .ndo_bridge_getlink     = switchdev_port_bridge_getlink,
        .ndo_bridge_dellink     = switchdev_port_bridge_dellink,
index a3711769544b5cf9f3918e371fb148ec7409ba84..4a24b5d15f5a5dfe770d184533f70f7140d9e145 100644 (file)
@@ -2001,8 +2001,6 @@ static const struct net_device_ops team_netdev_ops = {
        .ndo_add_slave          = team_add_slave,
        .ndo_del_slave          = team_del_slave,
        .ndo_fix_features       = team_fix_features,
-       .ndo_neigh_construct    = netdev_default_l2upper_neigh_construct,
-       .ndo_neigh_destroy      = netdev_default_l2upper_neigh_destroy,
        .ndo_change_carrier     = team_change_carrier,
        .ndo_bridge_setlink     = switchdev_port_bridge_setlink,
        .ndo_bridge_getlink     = switchdev_port_bridge_getlink,
index 014fbe256d55f843b72595e881d646dd5762ac33..58afbd1cc6597695da1d61cfa86f790a2379a49f 100644 (file)
@@ -3888,10 +3888,6 @@ void *netdev_lower_dev_get_private(struct net_device *dev,
                                   struct net_device *lower_dev);
 void netdev_lower_state_changed(struct net_device *lower_dev,
                                void *lower_state_info);
-int netdev_default_l2upper_neigh_construct(struct net_device *dev,
-                                          struct neighbour *n);
-void netdev_default_l2upper_neigh_destroy(struct net_device *dev,
-                                         struct neighbour *n);
 
 /* RSS keys are 40 or 52 bytes long */
 #define NETDEV_RSS_KEY_LEN 52
index 116455ac3db5bf1e9a698b936b108f397d73a491..e97ab824e368cc16f9609acd70d5337866eb2936 100644 (file)
@@ -791,8 +791,6 @@ static const struct net_device_ops vlan_netdev_ops = {
        .ndo_netpoll_cleanup    = vlan_dev_netpoll_cleanup,
 #endif
        .ndo_fix_features       = vlan_dev_fix_features,
-       .ndo_neigh_construct    = netdev_default_l2upper_neigh_construct,
-       .ndo_neigh_destroy      = netdev_default_l2upper_neigh_destroy,
        .ndo_fdb_add            = switchdev_port_fdb_add,
        .ndo_fdb_del            = switchdev_port_fdb_del,
        .ndo_fdb_dump           = switchdev_port_fdb_dump,
index 6c46d1b4cdbbc5e1ed5e119996da75b6f83dd23e..5ba0b558f8ae46f136ecf15925b8eb1546025ebb 100644 (file)
@@ -347,8 +347,6 @@ static const struct net_device_ops br_netdev_ops = {
        .ndo_add_slave           = br_add_slave,
        .ndo_del_slave           = br_del_slave,
        .ndo_fix_features        = br_fix_features,
-       .ndo_neigh_construct     = netdev_default_l2upper_neigh_construct,
-       .ndo_neigh_destroy       = netdev_default_l2upper_neigh_destroy,
        .ndo_fdb_add             = br_fdb_add,
        .ndo_fdb_del             = br_fdb_delete,
        .ndo_fdb_dump            = br_fdb_dump,
index 404d2e6d5d3233ad95edee18581276841573644c..3e1a60102e64d1040867181a03605b8eca508557 100644 (file)
@@ -6111,50 +6111,6 @@ void netdev_lower_state_changed(struct net_device *lower_dev,
 }
 EXPORT_SYMBOL(netdev_lower_state_changed);
 
-int netdev_default_l2upper_neigh_construct(struct net_device *dev,
-                                          struct neighbour *n)
-{
-       struct net_device *lower_dev, *stop_dev;
-       struct list_head *iter;
-       int err;
-
-       netdev_for_each_lower_dev(dev, lower_dev, iter) {
-               if (!lower_dev->netdev_ops->ndo_neigh_construct)
-                       continue;
-               err = lower_dev->netdev_ops->ndo_neigh_construct(lower_dev, n);
-               if (err) {
-                       stop_dev = lower_dev;
-                       goto rollback;
-               }
-       }
-       return 0;
-
-rollback:
-       netdev_for_each_lower_dev(dev, lower_dev, iter) {
-               if (lower_dev == stop_dev)
-                       break;
-               if (!lower_dev->netdev_ops->ndo_neigh_destroy)
-                       continue;
-               lower_dev->netdev_ops->ndo_neigh_destroy(lower_dev, n);
-       }
-       return err;
-}
-EXPORT_SYMBOL_GPL(netdev_default_l2upper_neigh_construct);
-
-void netdev_default_l2upper_neigh_destroy(struct net_device *dev,
-                                         struct neighbour *n)
-{
-       struct net_device *lower_dev;
-       struct list_head *iter;
-
-       netdev_for_each_lower_dev(dev, lower_dev, iter) {
-               if (!lower_dev->netdev_ops->ndo_neigh_destroy)
-                       continue;
-               lower_dev->netdev_ops->ndo_neigh_destroy(lower_dev, n);
-       }
-}
-EXPORT_SYMBOL_GPL(netdev_default_l2upper_neigh_destroy);
-
 static void dev_change_rx_flags(struct net_device *dev, int flags)
 {
        const struct net_device_ops *ops = dev->netdev_ops;