From: Simon Horman <horms@kernel.org>
To: Wojciech Drewek <wojciech.drewek@intel.com>
Cc: netdev@vger.kernel.org, edumazet@google.com,
anthony.l.nguyen@intel.com, kuba@kernel.org,
intel-wired-lan@lists.osuosl.org, pabeni@redhat.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: Implement ethtool reset support
Date: Wed, 31 Jul 2024 10:24:06 +0100 [thread overview]
Message-ID: <20240731092406.GQ1967603@kernel.org> (raw)
In-Reply-To: <20240730105121.78985-1-wojciech.drewek@intel.com>
On Tue, Jul 30, 2024 at 12:51:21PM +0200, Wojciech Drewek wrote:
> Enable ethtool reset support. Each ethtool reset
> type is mapped to the CVL reset type:
> ETH_RESET_MAC - ICE_RESET_CORER
> ETH_RESET_ALL - ICE_RESET_GLOBR
> ETH_RESET_DEDICATED - ICE_RESET_PFR
>
> Multiple reset flags are not supported.
> Calling any reset type on port representor triggers VF reset.
>
> Command example:
> GLOBR:
> $ ethtool --reset enp1s0f0np0 all
> CORER:
> $ ethtool --reset enp1s0f0np0 mac
> PFR:
> $ ethtool --reset enp1s0f0np0 dedicated
> VF reset:
> $ ethtool --reset $port_representor mac
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 64 ++++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index 39d2652c3ee1..00b8ac3f1dff 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -4794,6 +4794,68 @@ static void ice_get_ts_stats(struct net_device *netdev,
> ts_stats->lost = ptp->tx_hwtstamp_timeouts;
> }
>
> +/**
> + * ice_ethtool_reset - triggers a given type of reset
> + * @dev: network interface device structure
> + * @flags: set of reset flags
> + *
> + * Note that multiple reset flags are not supported
> + */
> +static int ice_ethtool_reset(struct net_device *dev, u32 *flags)
> +{
nit: Please include a "Return:" or "Returns:" section in the Kernel doc
of new functions that return a value.
(i.e. also for ice_repr_ethtool_reset)
Flagged by ./scripts/kernel-doc -none -Wall
...
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Wojciech Drewek <wojciech.drewek@intel.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
anthony.l.nguyen@intel.com, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH iwl-next] ice: Implement ethtool reset support
Date: Wed, 31 Jul 2024 10:24:06 +0100 [thread overview]
Message-ID: <20240731092406.GQ1967603@kernel.org> (raw)
In-Reply-To: <20240730105121.78985-1-wojciech.drewek@intel.com>
On Tue, Jul 30, 2024 at 12:51:21PM +0200, Wojciech Drewek wrote:
> Enable ethtool reset support. Each ethtool reset
> type is mapped to the CVL reset type:
> ETH_RESET_MAC - ICE_RESET_CORER
> ETH_RESET_ALL - ICE_RESET_GLOBR
> ETH_RESET_DEDICATED - ICE_RESET_PFR
>
> Multiple reset flags are not supported.
> Calling any reset type on port representor triggers VF reset.
>
> Command example:
> GLOBR:
> $ ethtool --reset enp1s0f0np0 all
> CORER:
> $ ethtool --reset enp1s0f0np0 mac
> PFR:
> $ ethtool --reset enp1s0f0np0 dedicated
> VF reset:
> $ ethtool --reset $port_representor mac
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 64 ++++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index 39d2652c3ee1..00b8ac3f1dff 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -4794,6 +4794,68 @@ static void ice_get_ts_stats(struct net_device *netdev,
> ts_stats->lost = ptp->tx_hwtstamp_timeouts;
> }
>
> +/**
> + * ice_ethtool_reset - triggers a given type of reset
> + * @dev: network interface device structure
> + * @flags: set of reset flags
> + *
> + * Note that multiple reset flags are not supported
> + */
> +static int ice_ethtool_reset(struct net_device *dev, u32 *flags)
> +{
nit: Please include a "Return:" or "Returns:" section in the Kernel doc
of new functions that return a value.
(i.e. also for ice_repr_ethtool_reset)
Flagged by ./scripts/kernel-doc -none -Wall
...
next prev parent reply other threads:[~2024-07-31 9:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 10:51 [Intel-wired-lan] [PATCH iwl-next] ice: Implement ethtool reset support Wojciech Drewek
2024-07-30 10:51 ` Wojciech Drewek
2024-07-30 13:58 ` [Intel-wired-lan] " Jakub Kicinski
2024-07-30 13:58 ` Jakub Kicinski
2024-07-31 12:08 ` [Intel-wired-lan] " Wojciech Drewek
2024-07-31 12:08 ` Wojciech Drewek
2024-07-31 16:48 ` [Intel-wired-lan] " Jacob Keller
2024-07-31 16:48 ` Jacob Keller
2024-07-31 23:47 ` Jakub Kicinski
2024-07-31 23:47 ` Jakub Kicinski
2024-08-01 11:01 ` Wojciech Drewek
2024-08-01 11:01 ` Wojciech Drewek
2024-08-01 14:13 ` Jakub Kicinski
2024-08-01 14:13 ` Jakub Kicinski
2024-07-31 8:22 ` Przemek Kitszel
2024-07-31 8:22 ` Przemek Kitszel
2024-07-31 12:14 ` Wojciech Drewek
2024-07-31 12:14 ` Wojciech Drewek
2024-07-31 9:24 ` Simon Horman [this message]
2024-07-31 9:24 ` Simon Horman
2024-07-31 12:11 ` [Intel-wired-lan] " Wojciech Drewek
2024-07-31 12:11 ` Wojciech Drewek
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=20240731092406.GQ1967603@kernel.org \
--to=horms@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wojciech.drewek@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.