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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Jul 2019 22:51:50 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     René van Dorst <opensource@...rst.com>
Cc:     netdev@...r.kernel.org
Subject: Re: phylink: flow control on fixed-link not working.

On Wed, Jul 17, 2019 at 09:31:11PM +0000, René van Dorst wrote:
> Hi,
> 
> I am trying to enable flow control/pause on PHYLINK and fixed-link.
> 
> My setup SOC mac (mt7621) <-> RGMII <-> SWITCH mac (mt7530).
> 
> It seems that in fixed-link mode all the flow control/pause bits are cleared
> in
> phylink_parse_fixedlink(). If I read phylink_parse_fixedlink() [0] correctly,
> I see that pl->link_config.advertising is AND with pl->supprted which has only
> the PHY_SETTING() modes bits set. pl->link_config.advertising is losing Pause
> bits. pl->link_config.advertising is used in phylink_resolve_flow() to set the
> MLO_PAUSE_RX/TX BITS.
> 
> I think this is an error.
> Because in phylink_start() see this part [1].
> 
>  /* Apply the link configuration to the MAC when starting. This allows
>   * a fixed-link to start with the correct parameters, and also
>   * ensures that we set the appropriate advertisement for Serdes links.
>   */
>  phylink_resolve_flow(pl, &pl->link_config);
>  phylink_mac_config(pl, &pl->link_config);
> 
> 
> If I add a this hacky patch below, flow control is enabled on the fixed-link.
>         if (s) {
>                 __set_bit(s->bit, pl->supported);
> +               if (phylink_test(pl->link_config.advertising, Pause))
> +                       phylink_set(pl->supported, Pause);
>         } else {
> 
> So is phylink_parse_fixedlink() broken or should it handled in a other way?

Quite simply, if the MAC says it doesn't support pause modes (i.o.w.
the validate callback clears them) then pause modes aren't supported.

-- 
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ