Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354410

Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF
Date 2016-03-09 21:10 +0100
Message-ID <raSAF-4vK-1@gated-at.bofh.it> (permalink)
References <raQpc-2UT-17@gated-at.bofh.it> <raQpe-2UT-33@gated-at.bofh.it> <raRbB-3t4-41@gated-at.bofh.it> <raS7F-44y-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 09, 2016 at 02:32:05PM -0500, Vivien Didelot wrote:
> Hi Andrew,
> 
> Andrew Lunn <andrew@lunn.ch> writes:
> 
> >> -static bool dsa_slave_dev_check(struct net_device *dev)
> >> -{
> >> -	return dev->netdev_ops == &dsa_slave_netdev_ops;
> >> -}
> >
> > Where is the equivalent of this happening? Where do we check that the
> > interface added to the bridge is part of the switch?
> 
> Why should we check that? In this RFC, br_if.c tries to set the new
> attribute to the net_device, when creating and deleting the net bridge
> port. If it supports attr_set and this attribute, then we're good. Or am
> I missing something?

One of us is missing something...

What happens if i have two dsa clusters? We probably want to limit the
object to only being passed to the DSA cluster which contains the
port, or once we receive the object, we verify it belongs to the
cluster processing it.

What happens with a team/bind interface is added to the bridge. In the
future we need to know about this, so we can add the trunk in Marvells
terms to the bridge.

> > How about team/bonding? We are not ready to implement it yet with the
> > Marvell devices, but at some point we probably will. Won't we need the
> > events then? We need to know when a switch port has been added to a
> > team?
> >
> > Or do you think a switchdev object will be added for this case?
> > Mellanox already have the ability to add switch interfaces to a team,
> > and then add the team to a bridge. So we need to ensure your solution
> > works for such stacked systems.
> 
> Indeed these features can be propagated through new switchdev attributes
> or objects.
> 
> I think it'd be preferable to factorize the switch related operations
> into the switchdev API, instead of having every single switchdev user
> implement its custom (but similar) listeners and checks for global
> netdev events. What do you think?

Centralizing the code would be good. But DSA is way behind what
Mellanox can do, so you need to look at how your changes fit into
their driver.

During a netdev 1.1 BOF there was a conversation about the stack of
interfaces, teams/bonds, bridges, etc. If the video is available, you
might find it interesting.

      Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH net-next 0/2] net: switchdev: add attribute for port bridging Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 18:50 +0100
  [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for port bridging Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 18:50 +0100
    Re: [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for port  bridging Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-09 20:30 +0100
    Re: [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for  port bridging Ido Schimmel <idosch@mellanox.com> - 2016-03-09 22:50 +0100
      Re: [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for port bridging Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-10 00:00 +0100
  [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 18:50 +0100
    Re: [RFC PATCH net-next 2/2] net: dsa: support  SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Andrew Lunn <andrew@lunn.ch> - 2016-03-09 19:40 +0100
      Re: [RFC PATCH net-next 2/2] net: dsa: support  SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Jiri Pirko <jiri@resnulli.us> - 2016-03-09 20:30 +0100
        Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 23:20 +0100
      Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 20:40 +0100
        Re: [RFC PATCH net-next 2/2] net: dsa: support  SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Andrew Lunn <andrew@lunn.ch> - 2016-03-09 21:10 +0100

csiph-web