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, 8 May 2024 17:21:11 +0100
From: Simon Horman <horms@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: yisen.zhuang@...wei.com, salil.mehta@...wei.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	jiri@...nulli.us, shenjian15@...wei.com, wangjie125@...wei.com,
	liuyonglong@...wei.com, chenhao418@...wei.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 net 1/7] net: hns3: using user configure after
 hardware reset

On Tue, May 07, 2024 at 09:42:18PM +0800, Jijie Shao wrote:
> From: Peiyang Wang <wangpeiyang1@...wei.com>
> 
> When a reset occurring, it's supposed to recover user's configuration.
> Currently, the port info(speed, duplex and autoneg) is stored in hclge_mac
> and will be scheduled updated. Consider the case that reset was happened
> consecutively. During the first reset, the port info is configured with
> a temporary value cause the PHY is reset and looking for best link config.
> Second reset start and use pervious configuration which is not the user's.
> The specific process is as follows:
> 
> +------+               +----+                +----+
> | USER |               | PF |                | HW |
> +---+--+               +-+--+                +-+--+
>     |  ethtool --reset   |                     |
>     +------------------->|    reset command    |
>     |  ethtool --reset   +-------------------->|
>     +------------------->|                     +---+
>     |                    +---+                 |   |
>     |                    |   |reset currently  |   | HW RESET
>     |                    |   |and wait to do   |   |
>     |                    |<--+                 |   |
>     |                    | send pervious cfg   |<--+
>     |                    | (1000M FULL AN_ON)  |
>     |                    +-------------------->|
>     |                    | read cfg(time task) |
>     |                    | (10M HALF AN_OFF)   +---+
>     |                    |<--------------------+   | cfg take effect
>     |                    |    reset command    |<--+
>     |                    +-------------------->|
>     |                    |                     +---+
>     |                    | send pervious cfg   |   | HW RESET
>     |                    | (10M HALF AN_OFF)   |<--+
>     |                    +-------------------->|
>     |                    | read cfg(time task) |
>     |                    |  (10M HALF AN_OFF)  +---+
>     |                    |<--------------------+   | cfg take effect
>     |                    |                     |   |
>     |                    | read cfg(time task) |<--+
>     |                    |  (10M HALF AN_OFF)  |
>     |                    |<--------------------+
>     |                    |                     |
>     v                    v                     v
> 
> To avoid aboved situation, this patch introduced req_speed, req_duplex,
> req_autoneg to store user's configuration and it only be used after
> hardware reset and to recover user's configuration
> 
> Fixes: f5f2b3e4dcc0 ("net: hns3: add support for imp-controlled PHYs")
> Signed-off-by: Peiyang Wang <wangpeiyang1@...wei.com>
> Signed-off-by: Jijie Shao <shaojijie@...wei.com>

Thanks for the update since v1.

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ