DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Ciara Loftus <ciara.loftus@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH] net/ice: make link state configurable on device stop
Date: Thu, 28 Aug 2025 11:35:24 +0100	[thread overview]
Message-ID: <aLAw7JMyHARI_1Z4@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20250828102305.1522036-1-ciara.loftus@intel.com>

On Thu, Aug 28, 2025 at 10:23:05AM +0000, Ciara Loftus wrote:
> Introduce the boolean restore_link_state devarg for the ice driver. When
> set, when the ice port is stopped, the physical link will be restored to
> the state it was in when the device was started.
> 
> Prior to this patch the default behaviour was to always restore the link
> to its original state. The new default behaiour is to always bring the
> link down, which is in keeping with most other drivers.
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
>  doc/guides/nics/ice.rst            | 12 ++++++++++++
>  drivers/net/intel/ice/ice_ethdev.c | 10 ++++++++--
>  drivers/net/intel/ice/ice_ethdev.h |  1 +
>  3 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
> index 2c0f41c56c..9007b79471 100644
> --- a/doc/guides/nics/ice.rst
> +++ b/doc/guides/nics/ice.rst
> @@ -322,6 +322,18 @@ Runtime Configuration
>  
>      -a af:00.0,pps_out='[pin:0]'
>  
> +- ``Restore initial link state`` (default ``0``)
> +
> +  The user can request that the link be restored to its original state when
> +  the device is stopped.
> +
> +    -a af:00.0,restore_link_state=1
> +
> +  The default behaviour is to bring the link down when the device is stopped,
> +  however if restore_link_state is set and if the link state was up when the
> +  device was started, then it will be restored to the up state when the
> +  device is stopped.
> +
>  - ``Low Rx latency`` (default ``0``)
>  
I think that control over this is a good thing to have. However, I'm also
wondering if we also need a way to force the link to always be up on close,
therefore requiring a tri-state option, rather than just two as here
(previous or down). How about renaming the option to maybe:
"link_state_on_close" with 3 options of "up", "down", "initial"?

/Bruce

  reply	other threads:[~2025-08-28 10:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 10:23 Ciara Loftus
2025-08-28 10:35 ` Bruce Richardson [this message]
2025-08-28 14:55 ` Stephen Hemminger

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=aLAw7JMyHARI_1Z4@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).