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: <Y1+IBAoSHj3kLQIA@shredder>
Date:   Mon, 31 Oct 2022 10:32:04 +0200
From:   Ido Schimmel <idosch@...dia.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, jiri@...nulli.us, vladimir.oltean@....com,
        netdev@...io-technology.com, mlxsw@...dia.com
Subject: Re: [PATCH net-next] rocker: Explicitly mark learned FDB entries as
 offloaded

On Mon, Oct 31, 2022 at 09:59:22AM +0200, Ido Schimmel wrote:
> diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c
> index 58cf7cc54f40..f5880d0053da 100644
> --- a/drivers/net/ethernet/rocker/rocker_ofdpa.c
> +++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
> @@ -1828,12 +1828,14 @@ static void ofdpa_port_fdb_learn_work(struct work_struct *work)
>  	info.vid = lw->vid;
>  
>  	rtnl_lock();
> -	if (learned && removing)
> +	if (learned && removing) {
>  		call_switchdev_notifiers(SWITCHDEV_FDB_DEL_TO_BRIDGE,
>  					 lw->ofdpa_port->dev, &info.info, NULL);
> -	else if (learned && !removing)
> +	} else if (learned && !removing) {
> +		info.offloaded = true;
>  		call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_BRIDGE,
>  					 lw->ofdpa_port->dev, &info.info, NULL);
> +	}
>  	rtnl_unlock();
>  
>  	kfree(work);

Looking at it again, this is better:

diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c
index 58cf7cc54f40..4d17ae18ea61 100644
--- a/drivers/net/ethernet/rocker/rocker_ofdpa.c
+++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
@@ -1826,6 +1826,7 @@ static void ofdpa_port_fdb_learn_work(struct work_struct *work)
 
        info.addr = lw->addr;
        info.vid = lw->vid;
+       info.offloaded = learned && !removing;
 
        rtnl_lock();
        if (learned && removing)

Will send another version tomorrow assuming no other comments.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ