linux_dsm_epyc7002/drivers/net/ethernet/intel
Jacob Keller 0da36b9774 i40e: use DECLARE_BITMAP for state fields
Instead of assuming our flags fit within an unsigned long, use
DECLARE_BITMAP which will ensure that we always allocate enough space.
Additionally, use __I40E_STATE_SIZE__ markers as the last element of the
enumeration so that the size of the BITMAP is compile-time assigned
rather than programmer-time assigned. This ensures that potential future
flag additions do not actually overrun the array. This is especially
important as 32bit systems would only have 32bit longs instead of 64bit
longs as we generally have assumed in the prior code.

This change also removes a dereference of the state fields throughout
the code, so it does have a bit of code churn. The conversions were
automated using sed replacements with an alternation

  s/&(vsi->back|vsi|pf)->state/\1->state/
  s/&adapter->vsi.state/adapter->vsi.state/

For debugfs, we modify the printing so that we can display chunks of the
state value on new lines. This ensures that we can print the entire set
of state values. Additionally, we now print them as 08lx to ensure that
they display nicely.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-04-30 04:48:13 -07:00
..
e1000 e1000: Omit private ndo_get_stats function 2017-04-20 16:18:45 -07:00
e1000e e1000e: fix timing for 82579 Gigabit Ethernet controller 2017-04-20 16:32:44 -07:00
fm10k fm10k: do not enqueue mailbox when host not ready 2017-04-05 22:47:31 -07:00
i40e i40e: use DECLARE_BITMAP for state fields 2017-04-30 04:48:13 -07:00
i40evf i40e: use DECLARE_BITMAP for state fields 2017-04-30 04:48:13 -07:00
igb igb: Enable reading of wake up packet 2017-04-20 16:32:45 -07:00
igbvf igbvf: Use net_device_stats from struct net_device 2017-04-20 16:32:45 -07:00
ixgb ixgb: Omit private ndo_get_stats function 2017-04-20 16:18:45 -07:00
ixgbe ixgbe: Check for RSS key before setting value 2017-04-29 20:01:04 -07:00
ixgbevf ixgbevf: Check for RSS key before setting value 2017-04-29 20:01:04 -07:00
e100.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
Kconfig i40e: Drop FCoE code from core driver files 2017-03-27 16:47:43 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00