netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: Gal Pressman <gal@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 0/2] ice: support FEC automatic disable
Date: Thu, 25 Aug 2022 18:01:07 -0700	[thread overview]
Message-ID: <20220825180107.38915c09@kernel.org> (raw)
In-Reply-To: <bcdfe60a-0eb7-b1cf-15c8-5be7740716a1@intel.com>

On Thu, 25 Aug 2022 17:38:14 -0700 Jacob Keller wrote:
> On 8/25/2022 1:34 PM, Jakub Kicinski wrote:
> > Hard to get consensus if we still don't know what the FW does...
> > But if there's no new uAPI, just always enabling OFF with AUTO
> > then I guess I'd have nothing to complain about as I don't know
> > what other drivers do either.
> >   
> Ok. I think I have a basic summary of the situation and whats going on
> in the firmware. I'll try to summarize here:
> 
> Firmware has a state machine that we call the Link Establishment State
> Machine. This is the state machine which will attempt to establish link.
> This state machine only applies when auto-negotiation is not used. If
> auto-negotation is used it will perform the standard auto-negotiation
> flow and set FEC through that method.
> 
> The way this works follows this flow:
> 
> 1) driver sends a set PHY capabilities request. This includes various
> bits including whether to automatically select FEC, and which FEC modes
> to select from. When we enable ETHTOOL_FEC_AUTO, the driver always sets
> all FEC modes with the auto FEC bit.
> 
> 2) the firmware receives this request and begins the LESM. This starts
> with the firmware generating a list of configurations to attempt. Each
> configuration is a possible link mode combined with a bitwise AND of the
> FEC modes requested above in set PHY capabiltiies and the set of FEC
> modes supported by that link mode. The example I gave was if you plugged
> in a CA-L cable, it would try:
> 
>   100G-CAUI4
>   50G-LAUI2
>   25G-AUI-C2C
>   10G-SFI-DA
> 
> I'm still not 100% sure how it decides which link modes to choose for
> which cable, but I believe this is in a table stored within the firmware
> module we call the netlist.
> 
> 2a) for older firmware, the set PHY capabiltiies interface does not have
> a bit to set for requesting No FEC. Instead, each media type has a
> determination made about whether it needed FEC of not. I was told for
> example that CA-N cables would enable No FEC as an option, but CA-L
> cables would not (even though No FEC is supported for the link modes in
> question).
> 
> 2b) on newer firmware, the set PHY capabilities interface does have a
> bit to request No FEC. In this case, if we set the No FEC bit, then the
> firmware will be able to select No FEC as an option for cables that
> otherwise wouldn't have selected it in the old firmware (such as CA-L
> cables mentioned above).

Oh, but per the IEEE standard No FEC is _not_ an option for CA-L.
From the initial reading of your series I thought that Intel NICs 
would _never_ pick No FEC.

Sounds like we need a bit for "ignore the standard and try everything".

What about BASE-R FEC? Is the FW going to try it on the CA-L cable?

> 3) once the firmware has generated the list of possible configurations,
> it will iterate through them in a loop. Each configuration is applied,
> and then we wait some time (the timeout is also stored in the netlist
> module). If link establishes at one of these phases, we stop and use
> that configuration. Otherwise we move to the next configuration and try
> that. Each FEC mode is tried in sequence. (Unless the automatic FEC
> selection bit is *not* set. In that case, only one of the FEC modes is
> tried instead, and it is expected that software only set one bit to try.
> That would perform forced FEC selection instead).
> 
> This process will repeat as it iterates through the configurations until
> link is established.
> 
> As a side note, the first stage is to try auto-negotiation if enabled.
> So in the case where auto-negotiation is enabled it will first try
> auto-negotiation, then the set of forced configurations, and then loop
> back to trying auto-negotiation before trying the forced configs again.
> 
> So from the software programming state, we currently translate
> ETHTOOL_FEC_AUTO by setting the automatic bit as well as setting every
> FEC mode bit, except the "No FEC" bit. This is a new bit which is only
> available on newer firmware.
> 
> With the proposed change, we would add the "No FEC" bit when user
> requested both ETHTOOL_FEC_AUTO and ETHTOOL_FEC_OFF simultaneously.
> 
> From reading your previous replies, you would prefer to just have the
> driver set the "No FEC" bit always for ETHTOOL_FEC_AUTO when its
> available/supported by firmware?


  reply	other threads:[~2022-08-26  1:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 15:04 [PATCH net-next 0/2] ice: support FEC automatic disable Jacob Keller
2022-08-23 15:04 ` [PATCH net-next 1/2] ethtool: pass netlink extended ACK to .set_fecparam Jacob Keller
2022-08-23 15:06   ` Simon Horman
2022-08-23 22:13   ` Jakub Kicinski
2022-08-24 17:27     ` Keller, Jacob E
2022-08-23 15:04 ` [PATCH net-next 2/2] ice: add support for Auto FEC with FEC disabled via ETHTOOL_SFECPARAM Jacob Keller
2022-08-23 22:17   ` Jakub Kicinski
2022-08-24 17:29     ` Keller, Jacob E
2022-08-24 21:29     ` Keller, Jacob E
2022-08-24 22:47       ` Jakub Kicinski
2022-08-24 22:53         ` Keller, Jacob E
2022-08-24 23:02           ` Jakub Kicinski
2022-08-24 23:13             ` Keller, Jacob E
2022-08-24 23:32               ` Jakub Kicinski
2022-08-24 13:35 ` [PATCH net-next 0/2] ice: support FEC automatic disable Gal Pressman
2022-08-24 16:25   ` Jakub Kicinski
2022-08-25  7:08     ` Gal Pressman
2022-08-24 17:40   ` Keller, Jacob E
2022-08-25  7:08     ` Gal Pressman
2022-08-25 16:29       ` Jakub Kicinski
2022-08-25 16:57         ` Keller, Jacob E
2022-08-25 17:30           ` Jakub Kicinski
2022-08-25 17:51             ` Keller, Jacob E
2022-08-25 20:34               ` Jakub Kicinski
2022-08-25 21:04                 ` Keller, Jacob E
2022-08-26  0:38                 ` Jacob Keller
2022-08-26  1:01                   ` Jakub Kicinski [this message]
2022-08-26 17:51                     ` Jacob Keller
2022-08-26 23:57                       ` Jakub Kicinski
2022-08-28 10:42                         ` Gal Pressman
2022-08-29  7:11                           ` Keller, Jacob E
2022-08-29 11:21                             ` Gal Pressman
2022-08-29 18:10                               ` Jacob Keller
2022-08-30 20:09                                 ` Jacob Keller
2022-08-30 21:44                                   ` Jakub Kicinski
2022-08-30 23:09                                     ` Keller, Jacob E
2022-08-31 11:01                                     ` Gal Pressman
2022-08-31 17:36                                       ` Jakub Kicinski
2022-09-01 11:52                                         ` Gal Pressman
2022-09-05 11:25                                         ` Gal Pressman
2022-08-31 20:15                                       ` Jacob Keller
2022-09-01 11:51                                         ` Gal Pressman
2022-09-01 17:59                                           ` Keller, Jacob E
2022-09-07  3:44                                     ` Michael Chan

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=20220825180107.38915c09@kernel.org \
    --to=kuba@kernel.org \
    --cc=gal@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.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 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).