DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: Ivan Malov <ivan.malov@arknetworks.am>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [RFC PATCH 1/3] ethdev: add set link state on close API
Date: Wed, 3 Sep 2025 09:22:49 +0000	[thread overview]
Message-ID: <DM3PPF7D18F34A1CAF2F4F05ECF6EABC8A58E01A@DM3PPF7D18F34A1.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3f8ed682-28d4-c90a-8547-8d1e98595f79@arknetworks.am>

> 
> Hi Ciara,
> 
> On Fri, 29 Aug 2025, Ciara Loftus wrote:
> 
> > Allow the user to configure the state a link should be in after
> > the device has been stopped/closed. Make this configurable
> > through the new experimental rte_eth_dev_set_link_state_on_close
> > API. Three states are allowed:
> > 1. down: bring (or keep) the link down
> > 2. up: bring (or keep) the link up
> > 3. initial: restore the link to the state it was in when the device was
> > started.
> >
> 
> Perhaps it pays to name it 'status' instead of 'state', as the latter is not
> confined to just 'up/down' but also includes the speed, technology, FEC, etc.

Sure, I think this would be a logical change.

> 
> As for the three cases:
> 
> (3)
> When the driver gets probed, it may discover the link being in some state that
> the previous driver left us, (A). Then if the user does not invoke any APIs to
> tweak the link settings and proceeds straight to 'rte_eth_dev_start', the link
> will be in some best-effort state (B). Otherwise it will be in other state, (C).
> 
> Which one is implied by 'when the device was started'?

I think what we want is (A) - the state the previous driver left us in. I will
look to improve the descriptions if there are further revisions.

> 
> (2)
> Does 'keep' describe the link being up prior to 'close'? If so, then if the
> link is not 'up' prior to 'close', this commands to bring it up, which may
> not be possible if the link partner is gone or the cable is unplugged.

Yes, I guess this is conditional on external factors such as link partner etc.
The documentation can be changed to reflect this. "Try" to bring the
link up.

> 
> (1)
> This is OK. If the driver is capable to force link down, in electrical idle,
> it will do that. If it can't do this, the whole API won't be supported.
> 
> Thank you.

Thank you for your feedback.

Ciara

  reply	other threads:[~2025-09-03  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 14:02 [RFC PATCH 0/3] Make Link Status on Close Configurable Ciara Loftus
2025-08-29 14:02 ` [RFC PATCH 1/3] ethdev: add set link state on close API Ciara Loftus
2025-08-29 15:19   ` Ivan Malov
2025-09-03  9:22     ` Loftus, Ciara [this message]
2025-08-29 14:02 ` [RFC PATCH 2/3] net/ice: implement the link state on close device op Ciara Loftus
2025-08-29 14:02 ` [RFC PATCH 3/3] app/testpmd: support link state on close ethdev API Ciara Loftus

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=DM3PPF7D18F34A1CAF2F4F05ECF6EABC8A58E01A@DM3PPF7D18F34A1.namprd11.prod.outlook.com \
    --to=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    /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).