Re: [PATCH] dpaa2-ethsw: move the DPAA2 Ethernet Switch driver out of staging

From: Andrew Lunn
Date: Sat Aug 10 2019 - 23:22:48 EST


Hi Ioana

> >> + struct ethsw_port_priv *port_priv = netdev_priv(netdev);
> >> + struct ethsw_core *ethsw = port_priv->ethsw_data;
> >> + int i, err;
> >> +
> >> + for (i = 0; i < ethsw->sw_attr.num_ifs; i++)
> >> + if (ethsw->ports[i]->bridge_dev &&
> >> + (ethsw->ports[i]->bridge_dev != upper_dev)) {
> >> + netdev_err(netdev,
> >> + "Another switch port is connected to %s\n",
> >> + ethsw->ports[i]->bridge_dev->name);
> >> + return -EINVAL;
> >> + }
> >
> > Am i reading this correct? You only support a single bridge? The
> > error message is not very informative. Also, i think you should be
> > returning EOPNOTSUPP, indicating the offload is not possible. Linux
> > will then do it in software. If it could actually receive/transmit the
> > frames....
> >
>
> Yes, we only support a single bridge.

That is a pretty severe restriction for a device of this class. Some
of the very simple switches DSA support have a similar restriction,
but in general, most do support multiple bridges.

Are there any plans to fix this?

Thanks
Andrew