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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210206232931.pbdvtx3gyluw2s4u@skbuf>
Date:   Sun, 7 Feb 2021 01:29:31 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     George McCollister <george.mccollister@...il.com>
Cc:     Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Jonathan Corbet <corbet@....net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 3/4] net: dsa: add support for offloading HSR

On Thu, Feb 04, 2021 at 03:59:25PM -0600, George McCollister wrote:
> @@ -1935,6 +1936,19 @@ static int dsa_slave_changeupper(struct net_device *dev,
>  			dsa_port_lag_leave(dp, info->upper_dev);
>  			err = NOTIFY_OK;
>  		}
> +	} else if (is_hsr_master(info->upper_dev)) {
> +		if (info->linking) {
> +			err = dsa_port_hsr_join(dp, info->upper_dev);
> +			if (err == -EOPNOTSUPP) {
> +				NL_SET_ERR_MSG_MOD(info->info.extack,
> +						   "Offloading not supported");
> +				err = 0;
> +			}
> +			err = notifier_from_errno(err);
> +		} else {
> +			dsa_port_hsr_leave(dp, info->upper_dev);
> +			err = NOTIFY_OK;
> +		}
>  	}
[..]
> +static int dsa_switch_hsr_join(struct dsa_switch *ds,
> +			       struct dsa_notifier_hsr_info *info)
> +{
> +	if (ds->index == info->sw_index && ds->ops->port_hsr_join)
> +		return ds->ops->port_hsr_join(ds, info->port, info->hsr);
> +
> +	return 0;
> +}
> +
> +static int dsa_switch_hsr_leave(struct dsa_switch *ds,
> +				struct dsa_notifier_hsr_info *info)
> +{
> +	if (ds->index == info->sw_index && ds->ops->port_hsr_leave)
> +		ds->ops->port_hsr_leave(ds, info->port, info->hsr);
> +
> +	return 0;
> +}
> +

If you return zero, the software fallback is never going to kick in.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ