diff mbox series

[net] nfp: update ethtool reporting of pauseframe control

Message ID 20210803103911.22639-1-simon.horman@corigine.com (mailing list archive)
State Accepted
Commit 9fdc5d85a8fe684cdf24dc31c6bc4a727decfe87
Delegated to: Netdev Maintainers
Headers show
Series [net] nfp: update ethtool reporting of pauseframe control | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers warning 1 maintainers not CCed: alexanderduyck@fb.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Simon Horman Aug. 3, 2021, 10:39 a.m. UTC
From: Fei Qin <fei.qin@corigine.com>

Pauseframe control is set to symmetric mode by default on the NFP.
Pause frames can not be configured through ethtool now, but ethtool can
report the supported mode.

Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 3, 2021, noon UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue,  3 Aug 2021 12:39:11 +0200 you wrote:
> From: Fei Qin <fei.qin@corigine.com>
> 
> Pauseframe control is set to symmetric mode by default on the NFP.
> Pause frames can not be configured through ethtool now, but ethtool can
> report the supported mode.
> 
> Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
> Signed-off-by: Fei Qin <fei.qin@corigine.com>
> Signed-off-by: Louis Peens <louis.peens@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>
> 
> [...]

Here is the summary with links:
  - [net] nfp: update ethtool reporting of pauseframe control
    https://git.kernel.org/netdev/net/c/9fdc5d85a8fe

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Andrew Lunn Aug. 3, 2021, 3:03 p.m. UTC | #2
On Tue, Aug 03, 2021 at 12:39:11PM +0200, Simon Horman wrote:
> From: Fei Qin <fei.qin@corigine.com>
> 
> Pauseframe control is set to symmetric mode by default on the NFP.
> Pause frames can not be configured through ethtool now, but ethtool can
> report the supported mode.
> 
> Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
> Signed-off-by: Fei Qin <fei.qin@corigine.com>
> Signed-off-by: Louis Peens <louis.peens@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>
> ---
>  drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> index 1b482446536d..8803faadd302 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> @@ -286,6 +286,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev,
>  
>  	/* Init to unknowns */
>  	ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
> +	ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
> +	ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);

Hi Simon

Does it act on the results of the pause auto-neg? If the link peer
says it does not support pause, will it turn pause off?

     Andrew
Simon Horman Aug. 3, 2021, 3:50 p.m. UTC | #3
On Tue, Aug 03, 2021 at 05:03:33PM +0200, Andrew Lunn wrote:
> On Tue, Aug 03, 2021 at 12:39:11PM +0200, Simon Horman wrote:
> > From: Fei Qin <fei.qin@corigine.com>
> > 
> > Pauseframe control is set to symmetric mode by default on the NFP.
> > Pause frames can not be configured through ethtool now, but ethtool can
> > report the supported mode.
> > 
> > Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
> > Signed-off-by: Fei Qin <fei.qin@corigine.com>
> > Signed-off-by: Louis Peens <louis.peens@corigine.com>
> > Signed-off-by: Simon Horman <simon.horman@corigine.com>
> > ---
> >  drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > index 1b482446536d..8803faadd302 100644
> > --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > @@ -286,6 +286,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev,
> >  
> >  	/* Init to unknowns */
> >  	ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
> > +	ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
> > +	ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);
> 
> Hi Simon
> 
> Does it act on the results of the pause auto-neg? If the link peer
> says it does not support pause, will it turn pause off?

Thanks Andrew,

I'll try and get an answer to that question for you.
Simon Horman Aug. 6, 2021, 9:38 a.m. UTC | #4
On Tue, Aug 03, 2021 at 05:50:26PM +0200, Simon Horman wrote:
> On Tue, Aug 03, 2021 at 05:03:33PM +0200, Andrew Lunn wrote:
> > On Tue, Aug 03, 2021 at 12:39:11PM +0200, Simon Horman wrote:
> > > From: Fei Qin <fei.qin@corigine.com>
> > > 
> > > Pauseframe control is set to symmetric mode by default on the NFP.
> > > Pause frames can not be configured through ethtool now, but ethtool can
> > > report the supported mode.
> > > 
> > > Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
> > > Signed-off-by: Fei Qin <fei.qin@corigine.com>
> > > Signed-off-by: Louis Peens <louis.peens@corigine.com>
> > > Signed-off-by: Simon Horman <simon.horman@corigine.com>
> > > ---
> > >  drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > > index 1b482446536d..8803faadd302 100644
> > > --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > > +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > > @@ -286,6 +286,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev,
> > >  
> > >  	/* Init to unknowns */
> > >  	ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
> > > +	ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
> > > +	ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);
> > 
> > Hi Simon
> > 
> > Does it act on the results of the pause auto-neg? If the link peer
> > says it does not support pause, will it turn pause off?
> 
> Thanks Andrew,
> 
> I'll try and get an answer to that question for you.

Hi Andrew,

The simple answer to those questions is no.
Andrew Lunn Aug. 7, 2021, 2:17 a.m. UTC | #5
On Fri, Aug 06, 2021 at 11:38:57AM +0200, Simon Horman wrote:
> On Tue, Aug 03, 2021 at 05:50:26PM +0200, Simon Horman wrote:
> > On Tue, Aug 03, 2021 at 05:03:33PM +0200, Andrew Lunn wrote:
> > > On Tue, Aug 03, 2021 at 12:39:11PM +0200, Simon Horman wrote:
> > > > From: Fei Qin <fei.qin@corigine.com>
> > > > 
> > > > Pauseframe control is set to symmetric mode by default on the NFP.
> > > > Pause frames can not be configured through ethtool now, but ethtool can
> > > > report the supported mode.
> > > > 
> > > > Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
> > > > Signed-off-by: Fei Qin <fei.qin@corigine.com>
> > > > Signed-off-by: Louis Peens <louis.peens@corigine.com>
> > > > Signed-off-by: Simon Horman <simon.horman@corigine.com>
> > > > ---
> > > >  drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > > > index 1b482446536d..8803faadd302 100644
> > > > --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > > > +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
> > > > @@ -286,6 +286,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev,
> > > >  
> > > >  	/* Init to unknowns */
> > > >  	ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
> > > > +	ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
> > > > +	ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);
> > > 
> > > Hi Simon
> > > 
> > > Does it act on the results of the pause auto-neg? If the link peer
> > > says it does not support pause, will it turn pause off?
> > 
> > Thanks Andrew,
> > 
> > I'll try and get an answer to that question for you.
> 
> Hi Andrew,
> 
> The simple answer to those questions is no.

Hi Simon

Then please send a patch removing Pause from advertising, and ensure
your PHY, SERDES etc, does not advertise it.

It seems like all the smart NICs get pause wrong.

   Andrew
diff mbox series

Patch

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
index 1b482446536d..8803faadd302 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
@@ -286,6 +286,8 @@  nfp_net_get_link_ksettings(struct net_device *netdev,
 
 	/* Init to unknowns */
 	ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
+	ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
+	ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);
 	cmd->base.port = PORT_OTHER;
 	cmd->base.speed = SPEED_UNKNOWN;
 	cmd->base.duplex = DUPLEX_UNKNOWN;