mbox series

[net-next,v2,0/5] nfp: support FEC mode reporting and auto-neg

Message ID 20220929085832.622510-1-simon.horman@corigine.com (mailing list archive)
Headers show
Series nfp: support FEC mode reporting and auto-neg | expand

Message

Simon Horman Sept. 29, 2022, 8:58 a.m. UTC
Hi,

this series adds support for the following features to the nfp driver:

* Patch 1/5: Support active FEC mode
* Patch 2/5: Don't halt driver on non-fatal error when interacting with fw
* Patch 3/5: Treat port independence as a firmware rather than port property
* Patch 4/5: Support link auto negotiation
* Patch 5/5: Support restart of link auto negotiation

Key changes since v1:
* Treat port independence as a firmware rather than port property
* remove the enforcement of FEC auto mode when link auto-neg is enabled
* Adjust the link reset function so that it can take effect
  in port force-up scenario

Fei Qin (1):
  nfp: add support restart of link auto-negotiation

Yinjun Zhang (4):
  nfp: add support for reporting active FEC mode
  nfp: avoid halt of driver init process when non-fatal error happens
  nfp: refine the ABI of getting `sp_indiff` info
  nfp: add support for link auto negotiation

 drivers/net/ethernet/netronome/nfp/nfp_main.c | 74 ++++++++++++++++++-
 drivers/net/ethernet/netronome/nfp/nfp_main.h |  3 +-
 .../net/ethernet/netronome/nfp/nfp_net_ctrl.c |  8 --
 .../net/ethernet/netronome/nfp/nfp_net_ctrl.h | 10 +--
 .../ethernet/netronome/nfp/nfp_net_ethtool.c  | 61 +++++++++++++--
 .../net/ethernet/netronome/nfp/nfp_net_main.c | 49 +-----------
 .../ethernet/netronome/nfp/nfpcore/nfp_nsp.h  |  3 +
 .../netronome/nfp/nfpcore/nfp_nsp_eth.c       | 11 ++-
 8 files changed, 147 insertions(+), 72 deletions(-)

Comments

Jakub Kicinski Oct. 1, 2022, 1:47 a.m. UTC | #1
On Thu, 29 Sep 2022 10:58:27 +0200 Simon Horman wrote:
> this series adds support for the following features to the nfp driver:
> 
> * Patch 1/5: Support active FEC mode
> * Patch 2/5: Don't halt driver on non-fatal error when interacting with fw
> * Patch 3/5: Treat port independence as a firmware rather than port property
> * Patch 4/5: Support link auto negotiation
> * Patch 5/5: Support restart of link auto negotiation

Looks better, thanks for the changes.

BTW shouldn't the sp_indiff symbol be prefixed by _pf%u ?
That's not really introduced by this series tho.
patchwork-bot+netdevbpf@kernel.org Oct. 1, 2022, 2:20 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 29 Sep 2022 10:58:27 +0200 you wrote:
> Hi,
> 
> this series adds support for the following features to the nfp driver:
> 
> * Patch 1/5: Support active FEC mode
> * Patch 2/5: Don't halt driver on non-fatal error when interacting with fw
> * Patch 3/5: Treat port independence as a firmware rather than port property
> * Patch 4/5: Support link auto negotiation
> * Patch 5/5: Support restart of link auto negotiation
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/5] nfp: add support for reporting active FEC mode
    https://git.kernel.org/netdev/net-next/c/fc26e70f8aca
  - [net-next,v2,2/5] nfp: avoid halt of driver init process when non-fatal error happens
    https://git.kernel.org/netdev/net-next/c/965dd27d9893
  - [net-next,v2,3/5] nfp: refine the ABI of getting `sp_indiff` info
    https://git.kernel.org/netdev/net-next/c/b1e4f11e426d
  - [net-next,v2,4/5] nfp: add support for link auto negotiation
    https://git.kernel.org/netdev/net-next/c/8d545385bf26
  - [net-next,v2,5/5] nfp: add support restart of link auto-negotiation
    https://git.kernel.org/netdev/net-next/c/2820a400dfd3

You are awesome, thank you!
Yinjun Zhang Oct. 3, 2022, 8:41 a.m. UTC | #3
On Fri, Sep 30, 2022 at 06:47:35PM -0700, Jakub Kicinski wrote:
> On Thu, 29 Sep 2022 10:58:27 +0200 Simon Horman wrote:
> > this series adds support for the following features to the nfp driver:
> > 
> > * Patch 1/5: Support active FEC mode
> > * Patch 2/5: Don't halt driver on non-fatal error when interacting with fw
> > * Patch 3/5: Treat port independence as a firmware rather than port property
> > * Patch 4/5: Support link auto negotiation
> > * Patch 5/5: Support restart of link auto negotiation
> 
> Looks better, thanks for the changes.
> 
> BTW shouldn't the sp_indiff symbol be prefixed by _pf%u ?
> That's not really introduced by this series tho.

Thanks for your advice. Although sp_indiff is exposed by per-PF rtsym
_pf%u_net_app_cap, which can be used for per-PF capabilities in future,
I think sp_indiff won't be inconsistent among PFs. We'll adjust it if
it happens.
Jakub Kicinski Oct. 3, 2022, 8:01 p.m. UTC | #4
On Mon, 3 Oct 2022 16:41:11 +0800 Yinjun Zhang wrote:
> > Looks better, thanks for the changes.
> > 
> > BTW shouldn't the sp_indiff symbol be prefixed by _pf%u ?
> > That's not really introduced by this series tho.  
> 
> Thanks for your advice. Although sp_indiff is exposed by per-PF rtsym
> _pf%u_net_app_cap, which can be used for per-PF capabilities in future,
> I think sp_indiff won't be inconsistent among PFs. We'll adjust it if
> it happens.

It's not about inconsistencies but about the fact that in multi-host
systems there are multiple driver instances which come and go.
The driver seems to set sp_indiff to one at load and to zero when it
unloads. IDK what that actually does to the FW but if it does anything
it's not gonna work reliably in MH.
Yinjun Zhang Oct. 4, 2022, 2:04 a.m. UTC | #5
On Mon, Oct 03, 2022 at 01:01:49PM -0700, Jakub Kicinski wrote:
> On Mon, 3 Oct 2022 16:41:11 +0800 Yinjun Zhang wrote:
> > Thanks for your advice. Although sp_indiff is exposed by per-PF rtsym
> > _pf%u_net_app_cap, which can be used for per-PF capabilities in future,
> > I think sp_indiff won't be inconsistent among PFs. We'll adjust it if
> > it happens.
> 
> It's not about inconsistencies but about the fact that in multi-host
> systems there are multiple driver instances which come and go.
> The driver seems to set sp_indiff to one at load and to zero when it
> unloads. IDK what that actually does to the FW but if it does anything
> it's not gonna work reliably in MH.

I see, it's indeed a problem, not only in MH case, but also in
single-host-multi-PF case. Instead of renaming sp_indiff, I'll use
`unload_fw_on_remove` to decide if need clean sp_indiff when unloading.
I think it makes more sense. Will fix it.