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:   Mon, 8 Feb 2021 11:21:26 -0600
From:   George McCollister <george.mccollister@...il.com>
To:     Vladimir Oltean <olteanv@...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 Sat, Feb 6, 2021 at 5:29 PM Vladimir Oltean <olteanv@...il.com> wrote:
>
> 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.

For join and leave? How is this not a problem for the bridge and lag
functions? They work the same way don't they? I figured it would be
safe to follow what they were doing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ