aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorIvan Vecera <[email protected]>2023-11-24 15:03:40 +0000
committerTony Nguyen <[email protected]>2024-02-16 17:28:14 +0000
commitb1f1b46f466a0855b92bd191d8fea8bf297bc7ab (patch)
treed6508e5acf2cf1ca5d69e24f7ed837705d815db5 /drivers/net/xen-netback/interface.c
parenti40e: Use existing helper to find flow director VSI (diff)
downloadkernel-b1f1b46f466a0855b92bd191d8fea8bf297bc7ab.tar.gz
kernel-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 <[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 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions