]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: provide generic busy polling to all NAPI drivers
authorEric Dumazet <edumazet@google.com>
Wed, 18 Nov 2015 14:31:03 +0000 (06:31 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 15:13:42 +0000 (07:13 -0800)
NAPI drivers no longer need to observe a particular protocol
to benefit from busy polling (CONFIG_NET_RX_BUSY_POLL=y)

napi_hash_add() and napi_hash_del() are automatically called
from core networking stack, respectively from
netif_napi_add() and netif_napi_del()

This patch depends on free_netdev() and netif_napi_del() being
called from process context, which seems to be the norm.

Drivers might still prefer to call napi_hash_del() on their
own, since they might combine all the rcu grace periods into
a single one, knowing their NAPI structures lifetime, while
core networking stack has no idea of a possible combining.

Once this patch proves to not bring serious regressions,
we will cleanup drivers to either remove napi_hash_del()
or provide appropriate rcu grace periods combining.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Orabug: 22725582
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/net/ethernet/emulex/benet/be_main.c

index 8588debdb772668fd0bfe0afdf5afa61f6678548..c5367fbd18942fcd2c98bf620c8fe2e3cc75c4a6 100644 (file)
@@ -2630,7 +2630,6 @@ static int be_evt_queues_create(struct be_adapter *adapter)
                                eqo->affinity_mask);
                netif_napi_add(adapter->netdev, &eqo->napi, be_poll,
                               BE_NAPI_WEIGHT);
-               napi_hash_add(&eqo->napi);
        }
        return 0;
 }