Re: [PATCH net-next 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-25 Thread Petr Machata
Vivien Didelot writes: > Hi Petr, > > Petr Machata writes: > >> -static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br, >> - u16 vid, u16 flags) >> +static int br_switchdev_port_obj_add(struct

Re: [PATCH net-next 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-25 Thread Vivien Didelot
Hi Petr, Petr Machata writes: > -static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br, > - u16 vid, u16 flags) > +static int br_switchdev_port_obj_add(struct net_device *dev, u16 vid, u16 > flags) > { > struct

Re: [PATCH net-next 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-25 Thread Nikolay Aleksandrov
On 24/05/18 18:10, Petr Machata wrote: > A call to switchdev_port_obj_add() or switchdev_port_obj_del() involves > initializing a struct switchdev_obj_port_vlan, a piece of code that > repeats on each call site almost verbatim. While in the current codebase > there is just one duplicated add call,

[PATCH net-next 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-24 Thread Petr Machata
A call to switchdev_port_obj_add() or switchdev_port_obj_del() involves initializing a struct switchdev_obj_port_vlan, a piece of code that repeats on each call site almost verbatim. While in the current codebase there is just one duplicated add call, the follow-up patches add more of both add and