lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26a8fde2-6403-b14e-a163-c3a1b6afeb4d@gmail.com>
Date:   Wed, 9 Nov 2016 09:06:09 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Timur Tabi <timur@...eaurora.org>,
        David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] [RFC] net: phy: phy drivers should not set
 SUPPORTED_Pause or SUPPORTED_Asym_Pause

On 11/08/2016 12:43 PM, Timur Tabi wrote:
> On 11/07/2016 10:30 AM, Timur Tabi wrote:
>>
>> I'm still don't understand 100% how these flags really work, because I
>> just can't shake the feeling that they should not be set for every phy.
>>   If these flags are supposed to be turned on universally, then why are
>> they even an option?
> 
> So I've been giving this more thought.  Can you tell me if the following
> is correct:
> 
> 1) PHY drivers and/or phylib sets the SUPPORTED_Pause |
> SUPPORTED_AsymPause bits in phydev->supported.  This indicates that the
> PHY supports pause frames.

Agreed.

> 
> 2) The MAC driver checks phydev->supported before it calls phy_start().
>  If (SUPPORTED_Pause | SUPPORTED_AsymPause) is set, then it sets those
> bits in phydev->advertising if it wants to enable pause frame support.

Also correct.

> 
> 3) When the link state changes, the MAC driver checks
> phydev->advertising, and if the bits are set, then it enables those
> features in the MAC.

Almost, we need to see what the link partner advertised, by looking at
phydev->pause / phydev->asym_pause and checking the local knobs whether
flow control can be enabled, but other than that, this looks correct to me.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ