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]
Message-ID: <d857ff81-a49c-4dd2-b07d-f17f9019bed1@windriver.com>
Date: Wed, 29 May 2024 18:55:21 +0800
From: xiaolei wang <xiaolei.wang@...driver.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: alexandre.torgue@...s.st.com, joabreu@...opsys.com, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        mcoquelin.stm32@...il.com, netdev@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [net PATCH] net: stmmac: update priv->speed to SPEED_UNKNOWN when
 link down


On 5/29/24 16:46, Russell King (Oracle) wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue, May 28, 2024 at 05:20:10PM +0800, Xiaolei Wang wrote:
>> The CBS parameter can still be configured when the port is
>> currently disconnected and link down. This is unreasonable.
>> The current speed_div and ptr parameters depend on the negotiated
>> speed after uplinking. So When the link is down, update priv->speed
>> to SPEED_UNKNOWN and an error log should be added.
>>
>> Signed-off-by: Xiaolei Wang <xiaolei.wang@...driver.com>
> So what happens if stmmac is connected to a PHY that can negotiate with
> the link partner, it has link up at e.g. 1G speed, one configures CBS,
> and then the link goes down and comes up at a different speed?
>
> I can't see any way in the stmmac driver that this is handled, which
> makes this feature way more buggy than you're referring to here. It
> also means that with your patch, if one attempts to configure CBS
> when the link is down, it will fail.

If there is no connection at the beginning, we still cannot configure,

but after linking up again, and then linking down, we can configure again.

This is very confusing. I think it makes sense to give a prompt for the 
stmmac

driver after linking down.

>
> To me, commit 1f705bc61aee ("net: stmmac: Add support for CBS QDISC")
> just looks very buggy.

This makes sense. I think it is necessary to update the parameters after 
linking up.

Does anyone have a better suggestion?

thanks

xiaolei

>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ