Re: [ovs-dev] [patch net-next RFC v2 4/6] net: introduce switchdev API

2014-03-31 Thread Neil Jerram
Hi Jiri, Apologies for possibly newbie questions here, but: > +bool swdev_dev_check(const struct net_device *dev) > +{ > + return dev->priv_flags & IFF_SWITCH; > +} > +EXPORT_SYMBOL(swdev_dev_check); [...] > + BUG_ON(!swdev_dev_check(dev)); [...] > +int __swdev_register(struct net_device

Re: [ovs-dev] [patch net-next RFC v2 4/6] net: introduce switchdev API

2014-03-31 Thread Neil Jerram
> diff --git a/net/Kconfig b/net/Kconfig > index e411046..e02ab8d 100644 > --- a/net/Kconfig > +++ b/net/Kconfig > @@ -285,6 +285,16 @@ config NET_FLOW_LIMIT > with many clients some protection against DoS by a single (spoofed) > flow that greatly exceeds average workload. > > +con

Re: [ovs-dev] [patch net-next RFC v2 4/6] net: introduce switchdev API

2014-03-27 Thread Jiri Pirko
Thu, Mar 27, 2014 at 12:23:39PM CET, tg...@suug.ch wrote: >On 03/26/14 at 05:31pm, Jiri Pirko wrote: >> switchdev API is designed to allow kernel support for various switch >> chips. >> >> It is the responsibility of a driver to create netdevice instances which >> represents every port and for the

Re: [ovs-dev] [patch net-next RFC v2 4/6] net: introduce switchdev API

2014-03-27 Thread Thomas Graf
On 03/26/14 at 05:31pm, Jiri Pirko wrote: > switchdev API is designed to allow kernel support for various switch > chips. > > It is the responsibility of a driver to create netdevice instances which > represents every port and for the switch master itself. Driver uses > swdev_register and swportde