All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: linux-doc@vger.kernel.org, netdev@vger.kernel.org,
	corbet@lwn.net, intel-wired-lan@lists.osuosl.org,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 5/5] ice: refactor to use helpers
Date: Fri, 14 Jun 2024 11:37:28 +0100	[thread overview]
Message-ID: <20240614103728.GB8447@kernel.org> (raw)
In-Reply-To: <20240606224701.359706-6-jesse.brandeburg@intel.com>

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 <jacob.e.keller@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

Hi Jesse,

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

Reviewed-by: Simon Horman <horms@kernel.org>

...

> 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.

...

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	corbet@lwn.net, linux-doc@vger.kernel.org,
	Jacob Keller <jacob.e.keller@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH iwl-next v2 5/5] ice: refactor to use helpers
Date: Fri, 14 Jun 2024 11:37:28 +0100	[thread overview]
Message-ID: <20240614103728.GB8447@kernel.org> (raw)
In-Reply-To: <20240606224701.359706-6-jesse.brandeburg@intel.com>

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 <jacob.e.keller@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

Hi Jesse,

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

Reviewed-by: Simon Horman <horms@kernel.org>

...

> 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.

...

  reply	other threads:[~2024-06-14 10:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 22:46 [Intel-wired-lan] [PATCH iwl-next v2 0/5] ice: add standard stats Jesse Brandeburg
2024-06-06 22:46 ` Jesse Brandeburg
2024-06-06 22:46 ` [Intel-wired-lan] [PATCH iwl-next v2 1/5] net: docs: add missing features that can have stats Jesse Brandeburg
2024-06-06 22:46   ` Jesse Brandeburg
2024-06-14 10:40   ` [Intel-wired-lan] " Simon Horman
2024-06-14 10:40     ` Simon Horman
2024-06-06 22:46 ` [Intel-wired-lan] [PATCH iwl-next v2 2/5] ice: implement ethtool standard stats Jesse Brandeburg
2024-06-06 22:46   ` Jesse Brandeburg
2024-06-14 10:40   ` [Intel-wired-lan] " Simon Horman
2024-06-14 10:40     ` Simon Horman
2024-06-06 22:46 ` [Intel-wired-lan] [PATCH iwl-next v2 3/5] ice: add tracking of good transmit timestamps Jesse Brandeburg
2024-06-06 22:46   ` Jesse Brandeburg
2024-06-14 10:35   ` [Intel-wired-lan] " Simon Horman
2024-06-14 10:35     ` Simon Horman
2024-06-06 22:46 ` [Intel-wired-lan] [PATCH iwl-next v2 4/5] ice: implement transmit hardware timestamp statistics Jesse Brandeburg
2024-06-06 22:46   ` Jesse Brandeburg
2024-06-14 10:40   ` [Intel-wired-lan] " Simon Horman
2024-06-14 10:40     ` Simon Horman
2024-06-06 22:46 ` [Intel-wired-lan] [PATCH iwl-next v2 5/5] ice: refactor to use helpers Jesse Brandeburg
2024-06-06 22:46   ` Jesse Brandeburg
2024-06-14 10:37   ` Simon Horman [this message]
2024-06-14 10:37     ` Simon Horman
2024-07-23  3:03 ` [Intel-wired-lan] [PATCH iwl-next v2 0/5] ice: add standard stats Pucha, HimasekharX Reddy
2024-07-23  3:03   ` Pucha, HimasekharX Reddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240614103728.GB8447@kernel.org \
    --to=horms@kernel.org \
    --cc=corbet@lwn.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.