All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Asmaa Mnebhi <asmaa@nvidia.com>
Cc: David Thompson <davthompson@nvidia.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Liming Sun <limings@nvidia.com>
Subject: Re: [PATCH net-next v5] Add Mellanox BlueField Gigabit Ethernet driver
Date: Tue, 1 Jun 2021 15:19:51 +0200	[thread overview]
Message-ID: <YLYz94yo0ge6CDh+@lunn.ch> (raw)
In-Reply-To: <CH2PR12MB3895FA4354E69D830F39CDC8D73E9@CH2PR12MB3895.namprd12.prod.outlook.com>

Please do not top post.

> Thanks.
> Asmaa
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch> 
> Sent: Friday, May 28, 2021 8:22 PM
> To: David Thompson <davthompson@nvidia.com>
> Cc: davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; Liming Sun <limings@nvidia.com>; Asmaa Mnebhi <asmaa@nvidia.com>
> Subject: Re: [PATCH net-next v5] Add Mellanox BlueField Gigabit Ethernet driver
> 
> > +static void mlxbf_gige_adjust_link (struct net_device *netdev) {
> > +	struct mlxbf_gige *priv = netdev_priv(netdev);
> > +	struct phy_device *phydev = netdev->phydev;
> > +
> > +	if (phydev->link) {
> > +		priv->rx_pause = phydev->pause;
> > +		priv->tx_pause = phydev->pause;
> > +	}
> 
> ...
> 
> > +	/* MAC supports symmetric flow control */
> > +	phy_support_sym_pause(phydev);
> 

> What i don't see anywhere is you acting on the results of the pause
> negotiation. It could be, mlxbf_gige_adjust_link() tells you the
> peer does not support pause, and you need to disable it in this MAC
> as well. It is a negotiation, after all.

From what you are saying, this is all wrong. You don't negotiate at
all. So don't report negotiated values in ethtool, just report the
fixed values, and do not set autoneg in ethtool_pauseparam because you
have not negotiated it.

You also should not be calling phy_support_sym_pause(), which means, i
support negotiated pause up to and including symmetric pause. You
might also need to clear the pause bits from phydev->advertising.

	Andrew

  reply	other threads:[~2021-06-01 13:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 19:37 [PATCH net-next v5] Add Mellanox BlueField Gigabit Ethernet driver David Thompson
2021-05-28 22:14 ` Jakub Kicinski
2021-06-01  1:10   ` David Thompson
2021-05-29  0:22 ` Andrew Lunn
2021-06-01 12:48   ` Asmaa Mnebhi
2021-06-01 13:19     ` Andrew Lunn [this message]
2021-06-01 13:43       ` Asmaa Mnebhi
2021-06-01 14:12         ` Andrew Lunn

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=YLYz94yo0ge6CDh+@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=asmaa@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=davthompson@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=limings@nvidia.com \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.