netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 00/10] Pause updates for phylib and phylink
Date: Sun, 16 Feb 2020 00:00:28 +0000	[thread overview]
Message-ID: <20200216000028.GU25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <db876d85-94d3-9295-a21f-d338c1be3b36@gmail.com>

On Sat, Feb 15, 2020 at 01:11:16PM -0800, Florian Fainelli wrote:
> 
> 
> On 2/15/2020 7:48 AM, Russell King - ARM Linux admin wrote:
> > Currently, phylib resolves the speed and duplex settings, which MAC
> > drivers use directly. phylib also extracts the "Pause" and "AsymPause"
> > bits from the link partner's advertisement, and stores them in struct
> > phy_device's pause and asym_pause members with no further processing.
> > It is left up to each MAC driver to implement decoding for this
> > information.
> > 
> > phylink converted drivers are able to take advantage of code therein
> > which resolves the pause advertisements for the MAC driver, but this
> > does nothing for unconverted drivers. It also does not allow us to
> > make use of hardware-resolved pause states offered by several PHYs.
> > 
> > This series aims to address this by:
> > 
> > 1. Providing a generic implementation, linkmode_resolve_pause(), that
> >    takes the ethtool linkmode arrays for the link partner and local
> >    advertisements, decoding the result to whether pause frames should
> >    be allowed to be transmitted or received and acted upon.  I call
> >    this the pause enablement state.
> > 
> > 2. Providing a phylib implementation, phy_get_pause(), which allows
> >    MAC drivers to request the pause enablement state from phylib.
> > 
> > 3. Providing a generic linkmode_set_pause() for setting the pause
> >    advertisement according to the ethtool tx/rx flags - note that this
> >    design has some shortcomings, see the comments in the kerneldoc for
> >    this function.
> > 
> > 4. Remove the ability in phylink to set the pause states for fixed
> >    links, which brings them into line with how we deal with the speed
> >    and duplex parameters; we can reintroduce this later if anyone
> >    requires it.  This could be a userspace-visible change.
> > 
> > 5. Split application of manual pause enablement state from phylink's
> >    resolution of the same to allow use of phylib's new phy_get_pause()
> >    interface by phylink, and make that switch.
> > 
> > 6. Resolve the fixed-link pause enablement state using the generic
> >    linkmode_resolve_pause() helper introduced earlier. This, in
> >    connection with the previous commits, allows us to kill the
> >    MLO_PAUSE_SYM and MLO_PAUSE_ASYM flags.
> > 
> > 7. make phylink's ethtool pause setting implementation update the
> >    pause advertisement in the same way that phylib does, with the
> >    same caveats that are present there (as mentioned above w.r.t
> >    linkmode_set_pause()).
> > 
> > 8. create a more accurate initial configuration for MACs, used when
> >    phy_start() is called or a SFP is detected. In particular, this
> >    ensures that the pause bits seen by MAC drivers in state->pause
> >    are accurate for SGMII.
> > 
> > 9. finally, update the kerneldoc descriptions for mac_config() for
> >    the above changes.
> > 
> > This series has been build-tested against net-next; the boot tested
> > patches are in my "phy" branch against v5.5 plus the queued phylink
> > changes that were merged for 5.6.
> > 
> > The next series will introduce the ability for phylib drivers to
> > provide hardware resolved pause enablement state.  These patches can
> > be found in my "phy" branch.
> 
> I do not think that patch #1 made it to the mailing-list though, so if
> nothing else you may want to resend it:
> 
> http://patchwork.ozlabs.org/project/netdev/list/?series=158739

You're right, it was missing the Cc line.  Resent just that - which
makes the series complete in patchwork, although not sure if the
order is correct.  Does it sort a patch series by sent date?

> 
> > 
> >  drivers/net/phy/Makefile     |   3 +-
> >  drivers/net/phy/linkmode.c   |  95 +++++++++++++++++++++++++
> >  drivers/net/phy/phy_device.c |  43 +++++++-----
> >  drivers/net/phy/phylink.c    | 162 +++++++++++++++++++++++++++----------------
> >  include/linux/linkmode.h     |   8 ++-
> >  include/linux/phy.h          |   3 +
> >  include/linux/phylink.h      |  34 +++++----
> >  7 files changed, 258 insertions(+), 90 deletions(-)
> >  create mode 100644 drivers/net/phy/linkmode.c
> > 
> 
> -- 
> Florian
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  reply	other threads:[~2020-02-16  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15 15:48 [PATCH net-next 00/10] Pause updates for phylib and phylink Russell King - ARM Linux admin
2020-02-15 15:49 ` [PATCH net-next 02/10] net: add helpers to resolve negotiated flow control Russell King
2020-02-15 18:49   ` Andrew Lunn
2020-02-15 23:18     ` Russell King - ARM Linux admin
2020-02-15 15:49 ` [PATCH net-next 03/10] net: add linkmode helper for setting flow control advertisement Russell King
2020-02-15 18:56   ` Andrew Lunn
2020-02-15 23:54     ` Russell King - ARM Linux admin
2020-02-15 15:49 ` [PATCH net-next 04/10] net: phylink: remove pause mode ethtool setting for fixed links Russell King
2020-02-15 18:57   ` Andrew Lunn
2020-02-15 15:49 ` [PATCH net-next 05/10] net: phylink: ensure manual flow control is selected appropriately Russell King
2020-02-15 19:00   ` Andrew Lunn
2020-02-15 15:49 ` [PATCH net-next 06/10] net: phylink: use phylib resolved flow control modes Russell King
2020-02-15 15:49 ` [PATCH net-next 07/10] net: phylink: resolve fixed link flow control Russell King
2020-02-15 19:02   ` Andrew Lunn
2020-02-15 15:49 ` [PATCH net-next 08/10] net: phylink: allow ethtool -A to change flow control advertisement Russell King
2020-02-15 19:04   ` Andrew Lunn
2020-02-15 15:50 ` [PATCH net-next 09/10] net: phylink: improve initial mac configuration Russell King
2020-02-15 19:06   ` Andrew Lunn
2020-02-15 15:50 ` [PATCH net-next 10/10] net: phylink: clarify flow control settings in documentation Russell King
2020-02-15 19:08   ` Andrew Lunn
2020-02-15 21:11 ` [PATCH net-next 00/10] Pause updates for phylib and phylink Florian Fainelli
2020-02-16  0:00   ` Russell King - ARM Linux admin [this message]
2020-02-15 23:57 ` [PATCH net-next 01/10] net: linkmode: make linkmode_test_bit() take const pointer Russell King
2020-02-17  3:40 ` [PATCH net-next 00/10] Pause updates for phylib and phylink David Miller

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=20200216000028.GU25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.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 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).