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: <20201120022540.GD1804098@lunn.ch>
Date:   Fri, 20 Nov 2020 03:25:40 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     DENG Qingfang <dqfext@...il.com>
Cc:     netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        Sean Wang <sean.wang@...iatek.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Russell King <linux@...linux.org.uk>,
        René van Dorst <opensource@...rst.com>,
        Frank Wunderlich <frank-w@...lic-files.de>,
        Greg Ungerer <gerg@...nel.org>,
        Alex Dewar <alex.dewar90@...il.com>,
        Chuanhong Guo <gch981213@...il.com>
Subject: Re: [RFC PATCH net-next] net: dsa: mt7530: support setting ageing
 time

On Thu, Nov 19, 2020 at 02:40:20PM +0800, DENG Qingfang wrote:
> MT7530 has a global address age control register, so use it to set
> ageing time.
> 
> The applied timer is (AGE_CNT + 1) * (AGE_UNIT + 1) seconds
> 
> Signed-off-by: DENG Qingfang <dqfext@...il.com>
> ---
>  drivers/net/dsa/mt7530.c | 41 ++++++++++++++++++++++++++++++++++++++++
>  drivers/net/dsa/mt7530.h | 13 +++++++++++++
>  2 files changed, 54 insertions(+)
> 
> RFC:
> 1. What is the expected behaviour if the timer is too big or too small?
>    - return -ERANGE or -EINVAL;

ERANGE is good. 

>      or
>    - if it is too big, apply the maximum value; if it is too small,
>      disable learning;
> 
> 2. Is there a better algorithm to find the closest pair?

The bridge code will default to 300 seconds. And after a topology
change, it sets it to 2 * the forwarding delay, which defaults to 15
seconds. So maybe you can look for these two values, and use
pre-computed values?

You still need to handle other values, the user can configure these.

	     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ