linux/drivers/net/ethernet/intel/i40e
Jesse Brandeburg 0bcd952fee ethernet/intel: consolidate NAPI and NAPI exit
While reviewing code, I noticed that Eric Dumazet recommends that
drivers check the return code of napi_complete_done, and use that
to decide to enable interrupts or not when exiting poll.  One of
the Intel drivers was already fixed (ixgbe).

Upon looking at the Intel drivers as a whole, we are handling our
polling and NAPI exit in a few different ways based on whether we
have multiqueue and whether we have Tx cleanup included. Several
drivers had the bug of exiting NAPI with return 0, which appears
to mess up the accounting in the stack.

Consolidate all the NAPI routines to do best known way of exiting
and to just mostly look like each other.
1) check return code of napi_complete_done to control interrupt enable
2) return the actual amount of work done.
3) return budget immediately if need NAPI poll again

Tested the changes on e1000e with a high interrupt rate set, and
it shows about an 8% reduction in the CPU utilization when busy
polling because we aren't re-enabling interrupts when we're about
to be polled.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-21 10:35:23 -08:00
..
i40e_adminq_cmd.h i40e: Add capability flag for stopping FW LLDP 2018-11-14 10:56:33 -08:00
i40e_adminq.c i40e: Add capability flag for stopping FW LLDP 2018-11-14 10:56:33 -08:00
i40e_adminq.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_alloc.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_client.c i40e/i40evf: cleanup incorrect function doxygen comments 2018-04-30 09:09:04 -07:00
i40e_client.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_common.c i40e: Allow disabling FW LLDP on X722 devices 2018-11-14 10:56:33 -08:00
i40e_dcb_nl.c i40e/i40evf: cleanup incorrect function doxygen comments 2018-04-30 09:09:04 -07:00
i40e_dcb.c i40e: fix reading LLDP configuration 2018-04-30 09:12:33 -07:00
i40e_dcb.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_debugfs.c i40e: Remove unnecessary print statement 2018-10-03 12:33:34 -07:00
i40e_devids.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_diag.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_diag.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_ethtool.c i40e: always set ks->base.speed in i40e_get_settings_link_up 2018-11-14 10:56:33 -08:00
i40e_hmc.c i40e/i40evf: cleanup incorrect function doxygen comments 2018-04-30 09:09:04 -07:00
i40e_hmc.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_lan_hmc.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_lan_hmc.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_main.c i40e: prevent overlapping tx_timeout recover 2018-11-14 10:56:34 -08:00
i40e_nvm.c i40e/i40evf: cleanup incorrect function doxygen comments 2018-04-30 09:09:04 -07:00
i40e_osdep.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_prototype.h i40e: Add AQ command for rearrange NVM structure 2018-08-07 12:20:45 -07:00
i40e_ptp.c i40e: Replace strncpy with strlcpy to ensure null termination 2018-11-14 10:56:33 -08:00
i40e_register.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_status.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_trace.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_txrx_common.h i40e: disallow changing the number of descriptors when AF_XDP is on 2018-09-25 13:16:19 -07:00
i40e_txrx.c ethernet/intel: consolidate NAPI and NAPI exit 2018-11-21 10:35:23 -08:00
i40e_txrx.h i40e: add AF_XDP zero-copy Rx support 2018-08-29 12:25:53 -07:00
i40e_type.h i40e: Add capability flag for stopping FW LLDP 2018-11-14 10:56:33 -08:00
i40e_virtchnl_pf.c i40e: suppress bogus error message 2018-11-14 10:56:34 -08:00
i40e_virtchnl_pf.h i40e: Use correct shift for VLAN priority 2018-11-14 10:56:33 -08:00
i40e_xsk.c i40e: disallow changing the number of descriptors when AF_XDP is on 2018-09-25 13:16:19 -07:00
i40e_xsk.h i40e: add AF_XDP zero-copy Tx support 2018-08-29 12:25:53 -07:00
i40e.h i40e: prevent overlapping tx_timeout recover 2018-11-14 10:56:34 -08:00
Makefile i40e: add AF_XDP zero-copy Rx support 2018-08-29 12:25:53 -07:00