Commit e50bfdf7 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: flower: remove unnecessary iteration over devices

For flower tunnel offloads FW has to be informed about MAC addresses
of tunnel devices.  We use a netdev notifier to keep track of these
addresses.

Remove unnecessary loop over netdevices after notifier is registered.
The intention of the loop was to catch devices which already existed
on the system before nfp driver got loaded, but netdev notifier will
replay NETDEV_REGISTER events.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarJohn Hurley <john.hurley@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4234d62c
...@@ -686,7 +686,6 @@ static int nfp_tun_mac_event_handler(struct notifier_block *nb, ...@@ -686,7 +686,6 @@ static int nfp_tun_mac_event_handler(struct notifier_block *nb,
int nfp_tunnel_config_start(struct nfp_app *app) int nfp_tunnel_config_start(struct nfp_app *app)
{ {
struct nfp_flower_priv *priv = app->priv; struct nfp_flower_priv *priv = app->priv;
struct net_device *netdev;
int err; int err;
/* Initialise priv data for MAC offloading. */ /* Initialise priv data for MAC offloading. */
...@@ -715,12 +714,6 @@ int nfp_tunnel_config_start(struct nfp_app *app) ...@@ -715,12 +714,6 @@ int nfp_tunnel_config_start(struct nfp_app *app)
if (err) if (err)
goto err_unreg_mac_nb; goto err_unreg_mac_nb;
/* Parse netdevs already registered for MACs that need offloaded. */
rtnl_lock();
for_each_netdev(&init_net, netdev)
nfp_tun_add_to_mac_offload_list(netdev, app);
rtnl_unlock();
return 0; return 0;
err_unreg_mac_nb: err_unreg_mac_nb:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment