> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Ivan > Vecera > Sent: Friday, November 24, 2023 8:34 PM > To: [email protected] > Cc: Drewek, Wojciech <[email protected]>; [email protected]; > Brandeburg, Jesse <[email protected]>; [email protected]; > Eric Dumazet <[email protected]>; Nguyen, Anthony L > <[email protected]>; Simon Horman <[email protected]>; Keller, Jacob > E <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni > <[email protected]>; David S . Miller <[email protected]> > Subject: [Intel-wired-lan] [PATCH v5 2/5] 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]> > --- > drivers/net/ethernet/intel/i40e/i40e.h | 56 ++- > drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 10 +- > .../net/ethernet/intel/i40e/i40e_debugfs.c | 54 +-- > drivers/net/ethernet/intel/i40e/i40e_main.c | 389 ++++++++---------- > 4 files changed, 264 insertions(+), 245 deletions(-) >
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
