OpenCloudOS-Kernel/drivers/net/ethernet/intel
Jakub Kicinski 5198d545db net: remove napi_hash_del() from driver-facing API
We allow drivers to call napi_hash_del() before calling
netif_napi_del() to batch RCU grace periods. This makes
the API asymmetric and leaks internal implementation details.
Soon we will want the grace period to protect more than just
the NAPI hash table.

Restructure the API and have drivers call a new function -
__netif_napi_del() if they want to take care of RCU waits.

Note that only core was checking the return status from
napi_hash_del() so the new helper does not report if the
NAPI was actually deleted.

Some notes on driver oddness:
 - veth observed the grace period before calling netif_napi_del()
   but that should not matter
 - myri10ge observed normal RCU flavor
 - bnx2x and enic did not actually observe the grace period
   (unless they did so implicitly)
 - virtio_net and enic only unhashed Rx NAPIs

The last two points seem to indicate that the calls to
napi_hash_del() were a left over rather than an optimization.
Regardless, it's easy enough to correct them.

This patch may introduce extra synchronize_net() calls for
interfaces which set NAPI_STATE_NO_BUSY_POLL and depend on
free_netdev() to call netif_napi_del(). This seems inevitable
since we want to use RCU for netpoll dev->napi_list traversal,
and almost no drivers set IFF_DISABLE_NETPOLL.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-10 13:08:46 -07:00
..
e1000 e1000: Remove unnecessary usages of memset 2020-07-30 10:51:25 -07:00
e1000e treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
fm10k net: Take common prefetch code structure into a function 2020-08-26 15:55:53 -07:00
i40e Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-09-01 13:22:59 -07:00
iavf net: Take common prefetch code structure into a function 2020-08-26 15:55:53 -07:00
ice Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-09-01 13:22:59 -07:00
igb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
igbvf igbvf: use generic power management 2020-07-30 08:36:08 -07:00
igc net: Take common prefetch code structure into a function 2020-08-26 15:55:53 -07:00
ixgb pci-v5.9-changes 2020-08-07 18:48:15 -07:00
ixgbe net: remove napi_hash_del() from driver-facing API 2020-09-10 13:08:46 -07:00
ixgbevf net: Take common prefetch code structure into a function 2020-08-26 15:55:53 -07:00
Kconfig ice: implement device flash update via devlink 2020-07-28 17:07:06 -07:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00
e100.c e100: use generic power management 2020-07-30 10:50:55 -07:00