diff options
author | 2023-11-24 16:03:40 +0100 | |
---|---|---|
committer | 2024-02-16 09:28:14 -0800 | |
commit | b1f1b46f466a0855b92bd191d8fea8bf297bc7ab (patch) | |
tree | d6508e5acf2cf1ca5d69e24f7ed837705d815db5 /net/core/sock.c | |
parent | i40e: Use existing helper to find flow director VSI (diff) | |
download | wireguard-linux-b1f1b46f466a0855b92bd191d8fea8bf297bc7ab.tar.xz wireguard-linux-b1f1b46f466a0855b92bd191d8fea8bf297bc7ab.zip |
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>
Diffstat (limited to 'net/core/sock.c')
0 files changed, 0 insertions, 0 deletions