diff options
| author | Ivan Vecera <[email protected]> | 2023-11-24 16:03:40 +0100 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2024-02-16 09:28:14 -0800 |
| commit | b1f1b46f466a0855b92bd191d8fea8bf297bc7ab (patch) | |
| tree | d6508e5acf2cf1ca5d69e24f7ed837705d815db5 /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
| parent | 7e6cec7d3bb0ae2107cda6175bbf3b0275ca0d09 (diff) | |
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 <[email protected]>
Signed-off-by: Ivan Vecera <[email protected]>
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions