Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Ivan Vecera
2017-04-08 16:14 GMT+02:00 Stephen Hemminger : > On Sat, 8 Apr 2017 17:05:48 +0300 > Nikolay Aleksandrov wrote: > >> On 08/04/17 16:49, Ido Schimmel wrote: >> > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: >> >> On Sat, 8 Apr 2017 14:41:58 +0300 >> >> wrote: >> >> >> >>> st

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Stephen Hemminger
On Sat, 8 Apr 2017 17:05:48 +0300 Nikolay Aleksandrov wrote: > On 08/04/17 16:49, Ido Schimmel wrote: > > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: > >> On Sat, 8 Apr 2017 14:41:58 +0300 > >> wrote: > >> > >>> static void br_dev_free(struct net_device *dev) > >>> {

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Nikolay Aleksandrov
On 08/04/17 16:49, Ido Schimmel wrote: > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: >> On Sat, 8 Apr 2017 14:41:58 +0300 >> wrote: >> >>> static void br_dev_free(struct net_device *dev) >>> { >>> - struct net_bridge *br = netdev_priv(dev); >>> - >>> - free_percpu(br->

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Ido Schimmel
On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: > On Sat, 8 Apr 2017 14:41:58 +0300 > wrote: > > > static void br_dev_free(struct net_device *dev) > > { > > - struct net_bridge *br = netdev_priv(dev); > > - > > - free_percpu(br->stats); > > free_netdev(dev); > > } >

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Stephen Hemminger
On Sat, 8 Apr 2017 14:41:58 +0300 wrote: > static void br_dev_free(struct net_device *dev) > { > - struct net_bridge *br = netdev_priv(dev); > - > - free_percpu(br->stats); > free_netdev(dev); > } > Since the only thing left is free_netdev, you can now just set dev->destructor

[PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread idosch
From: Ido Schimmel While the bridge driver implements an ndo_init(), it was missing a symmetric ndo_uninit(), causing the different de-initialization operations to be scattered around its dellink() and destructor(). Implement a symmetric ndo_uninit() and remove the overlapping operations from it