Subject: Re: [PATCH iwl-next v2 5/5] ice: refactor to use helpers

From: Simon Horman <[email-masked]>
Date: Fri, 14 Jun 2024 11:37:28 +0100

On Thu, Jun 06, 2024 at 03:46:59PM -0700, Jesse Brandeburg wrote:
> Use the ice_netdev_to_pf() helper in more places and remove a bunch of
> boilerplate code. Not every instance could be replaced due to use of the
> netdev_priv() output or the vsi variable within a bunch of functions.
> 
> Reviewed-by: Jacob Keller <[email-masked]>
> Reviewed-by: Przemek Kitszel <[email-masked]>
> Reviewed-by: Jakub Kicinski <[email-masked]>
> Signed-off-by: Jesse Brandeburg <[email-masked]>

Hi Jesse,

The minor nit below notwithstanding, this looks good to me.

Reviewed-by: Simon Horman <[email-masked]>

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c

...

> @@ -938,9 +931,8 @@ static int ice_lbtest_receive_frames(struct ice_rx_ring *rx_ring)
>   */
>  static u64 ice_loopback_test(struct net_device *netdev)
>  {
> -	struct ice_netdev_priv *np = netdev_priv(netdev);
> -	struct ice_vsi *orig_vsi = np->vsi, *test_vsi;
> -	struct ice_pf *pf = orig_vsi->back;
> +	struct ice_pf *pf = ice_netdev_to_pf(netdev);
> +	struct ice_vsi *test_vsi;
>  	u8 *tx_frame __free(kfree) = NULL;
>  	u8 broadcast[ETH_ALEN], ret = 0;
>  	int num_frames, valid_frames;

nit: If you end up respinning for some other reason,
     please consider arranging things reverse xmas tree order here.

...