From: Sean Anderson <sean.anderson@seco.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <olteanv@gmail.com>,
Alexandru Marginean <alexandru.marginean@nxp.com>,
linux-kernel@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next v5 1/8] net: phylink: Document MAC_(A)SYM_PAUSE
Date: Wed, 7 Sep 2022 12:52:59 -0400 [thread overview]
Message-ID: <8cf0a225-31b7-748d-bb9d-ac4bbddd4b6a@seco.com> (raw)
In-Reply-To: <YxhmnVIB+qT0W/5v@shell.armlinux.org.uk>
On 9/7/22 5:38 AM, Russell King (Oracle) wrote:
> On Tue, Sep 06, 2022 at 12:18:45PM -0400, Sean Anderson wrote:
>> This documents the possible MLO_PAUSE_* settings which can result from
>> different combinations of MLO_(A)SYM_PAUSE. These are more-or-less a
>> direct consequence of IEEE 802.3 Table 28B-2.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>> ---
>>
>> (no changes since v3)
>>
>> Changes in v3:
>> - New
>>
>> include/linux/phylink.h | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/include/linux/phylink.h b/include/linux/phylink.h
>> index 6d06896fc20d..a431a0b0d217 100644
>> --- a/include/linux/phylink.h
>> +++ b/include/linux/phylink.h
>> @@ -21,6 +21,22 @@ enum {
>> MLO_AN_FIXED, /* Fixed-link mode */
>> MLO_AN_INBAND, /* In-band protocol */
>>
>> + /* MAC_SYM_PAUSE and MAC_ASYM_PAUSE correspond to the PAUSE and
>> + * ASM_DIR bits used in autonegotiation, respectively. See IEEE 802.3
>
> "used in our autonegotiation advertisement" would be more clear.
What else would it be (besides advertisement)? Regarding "our", these bits are
also set based on the link partner pause settings (e.g. by phylink_decode_c37_word).
>> + * Annex 28B for more information.
>> + *
>> + * The following table lists the values of MLO_PAUSE_* (aside from
>> + * MLO_PAUSE_AN) which might be requested depending on the results of
>> + * autonegotiation or user configuration:
>> + *
>> + * MAC_SYM_PAUSE MAC_ASYM_PAUSE Valid pause modes
>> + * ============= ============== ==============================
>> + * 0 0 MLO_PAUSE_NONE
>> + * 0 1 MLO_PAUSE_NONE, MLO_PAUSE_TX
>> + * 1 0 MLO_PAUSE_NONE, MLO_PAUSE_TXRX
>> + * 1 1 MLO_PAUSE_NONE, MLO_PAUSE_TXRX,
>> + * MLO_PAUSE_RX
>
> Any of none, tx, txrx and rx can occur with both bits set in the last
> case, the tx-only case will be due to user configuration.
What flow did you have in mind? According to the comment on linkmode_set_pause,
if ethtool requests tx-only, we will use MAC_ASYM_PAUSE for the advertising,
which is the second row above. I don't see the path where we set both
MAC_SYM_PAUSE and MAC_ASYM_PAUSE and then we resolve to MLO_PAUSE_TX. Would this
be due to manual user configuration of both the advertising and the pause? By
that logic, couldn't we get any pause mode from any combination of MLO_PAUSE_*?
--Sean
next prev parent reply other threads:[~2022-09-07 16:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 16:18 [PATCH net-next v5 0/8] net: phy: Add support for rate adaptation Sean Anderson
2022-09-06 16:18 ` [PATCH net-next v5 1/8] net: phylink: Document MAC_(A)SYM_PAUSE Sean Anderson
2022-09-07 9:38 ` Russell King (Oracle)
2022-09-07 16:52 ` Sean Anderson [this message]
2022-09-07 18:04 ` Russell King (Oracle)
2022-09-07 20:11 ` Sean Anderson
2022-09-07 21:01 ` Russell King (Oracle)
2022-09-07 22:39 ` Sean Anderson
2022-09-08 14:21 ` Russell King (Oracle)
2022-09-08 21:03 ` Sean Anderson
2022-09-08 21:58 ` Russell King (Oracle)
2022-09-06 16:18 ` [PATCH net-next v5 2/8] net: phylink: Export phylink_caps_to_linkmodes Sean Anderson
2022-09-06 16:18 ` [PATCH net-next v5 3/8] net: phylink: Generate caps and convert to linkmodes separately Sean Anderson
2022-09-07 9:42 ` Russell King (Oracle)
2022-09-07 16:55 ` Sean Anderson
2022-09-06 16:18 ` [PATCH net-next v5 4/8] net: phy: Add support for rate adaptation Sean Anderson
2022-09-06 16:18 ` [PATCH net-next v5 5/8] net: phylink: Adjust link settings based on " Sean Anderson
2022-09-07 10:10 ` Russell King (Oracle)
2022-09-07 17:01 ` Sean Anderson
2022-09-07 18:06 ` Russell King (Oracle)
2022-09-06 16:18 ` [PATCH net-next v5 6/8] net: phylink: Adjust advertisement " Sean Anderson
2022-09-06 16:18 ` [PATCH net-next v5 7/8] net: phy: aquantia: Add some additional phy interfaces Sean Anderson
2022-09-06 16:18 ` [PATCH net-next v5 8/8] net: phy: aquantia: Add support for rate adaptation Sean Anderson
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=8cf0a225-31b7-748d-bb9d-ac4bbddd4b6a@seco.com \
--to=sean.anderson@seco.com \
--cc=alexandru.marginean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®