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

2018-05-29 Thread Vivien Didelot
Hi Petr, Petr Machata writes: > 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

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

2018-05-29 Thread Dan Carpenter
On Mon, May 28, 2018 at 05:10:28PM +0200, Petr Machata wrote: > /* Try switchdev op first. In case it is not supported, fallback to >* 8021q add. >*/ > - err = switchdev_port_obj_add(dev, ); > + int err = br_switchdev_port_vlan_add(dev, vid, flags); > if (err ==

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

2018-05-28 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