Re: [PATCH net-next v2 5/6] net: marvell: prestera: Register inetaddr stub notifiers

From: Yevhen Orlov
Date: Mon Jan 10 2022 - 20:00:21 EST


On Fri, Jan 07, 2022 at 02:43:03PM +0100, Andrew Lunn wrote:
> On Fri, Jan 07, 2022 at 03:42:56AM +0200, Yevhen Orlov wrote:
> > On Thu, Dec 30, 2021 at 04:34:42PM +0200, Ido Schimmel wrote:
> > >
> > > What happens to that RIF when the port is linked to a bridge or unlinked
> > > from one?
> > >
> >
> > We doesn't support any "RIF with bridge" scenario for now.
> > This restriction mentioned in cover latter.
>
> I did not look at the code. Does it return -EOPNOTSUPP? And then
> bridging is performed by the host in software?
>

Perhaps this is what you looking for:
> static int __prestera_inetaddr_event(struct prestera_switch *sw,
> ┆ struct net_device *dev,
> ┆ unsigned long event,
> ┆ struct netlink_ext_ack *extack)
> {
> if (!prestera_netdev_check(dev) || netif_is_bridge_port(dev) ||
> netif_is_lag_port(dev) || netif_is_ovs_port(dev))
> return 0;

We just do nothing for bridge port.
Note: we cannot return ENOTSUPP here, because this will make
impossible to add address on bridge interface at all.