1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel
Ivan Vecera b1f1b46f46 i40e: Introduce and use macros for iterating VSIs and VEBs
Introduce i40e_for_each_vsi() and i40e_for_each_veb() helper
macros and use them to iterate relevant arrays.

Replace pattern:
for (i = 0; i < pf->num_alloc_vsi; i++)
by:
i40e_for_each_vsi(pf, i, vsi)

and pattern:
for (i = 0; i < I40E_MAX_VEB; i++)
by
i40e_for_each_veb(pf, i, veb)

These macros also check if array item pf->vsi[i] or pf->veb[i]
are not NULL and skip such items so we can remove redundant
checks from loop bodies.

Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-02-16 09:28:14 -08:00
..
e1000 intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000e Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-01 15:12:37 -08:00
fm10k intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
i40e i40e: Introduce and use macros for iterating VSIs and VEBs 2024-02-16 09:28:14 -08:00
iavf iavf: field get conversion 2023-12-18 11:20:43 -08:00
ice Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-15 16:20:04 -08:00
idpf idpf: avoid compiler padding in virtchnl2_ptype struct 2024-02-01 09:10:41 -08:00
igb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-15 16:20:04 -08:00
igbvf intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
igc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-15 16:20:04 -08:00
ixgbe ixgbe: Clarify the values of the returning status 2024-02-06 13:17:14 -08:00
ixgbevf net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
e100.c e100: replace deprecated strncpy with strscpy 2023-10-18 18:10:17 -07:00
Kconfig igc: Add support for LEDs on i225/i226 2024-02-15 13:38:59 +01:00
Makefile idpf: add SRIOV support and other ndo_ops 2023-09-13 14:59:24 -07:00