Re: [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality

2017-12-01 Thread Jakub Kicinski
On Fri, 1 Dec 2017 22:58:29 +0100, Phil Sutter wrote: > > > > > > + ret = count; > > > > > > +exit_unlock: > > > > > > + rtnl_unlock(); > > > > > > + > > > > > > + return ret; > > > > > > +} > > > > > > > > > > [...] > > > > > > > > > > > +static void nsim_free(struct net_device *

Re: [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality

2017-12-01 Thread Phil Sutter
On Fri, Dec 01, 2017 at 01:45:09PM -0800, Jakub Kicinski wrote: > On Fri, 1 Dec 2017 22:36:52 +0100, Phil Sutter wrote: > > On Fri, Dec 01, 2017 at 12:14:07PM -0800, Jakub Kicinski wrote: > > > On Fri, 1 Dec 2017 14:43:06 +0100, Phil Sutter wrote: > > > > On Thu, Nov 30, 2017 at 05:35:39PM -0800,

Re: [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality

2017-12-01 Thread Jakub Kicinski
On Fri, 1 Dec 2017 22:36:52 +0100, Phil Sutter wrote: > On Fri, Dec 01, 2017 at 12:14:07PM -0800, Jakub Kicinski wrote: > > On Fri, 1 Dec 2017 14:43:06 +0100, Phil Sutter wrote: > > > On Thu, Nov 30, 2017 at 05:35:39PM -0800, Jakub Kicinski wrote: > > > [...] > > > > +static int nsim_vfs_enable

Re: [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality

2017-12-01 Thread Phil Sutter
On Fri, Dec 01, 2017 at 12:14:07PM -0800, Jakub Kicinski wrote: > On Fri, 1 Dec 2017 14:43:06 +0100, Phil Sutter wrote: > > On Thu, Nov 30, 2017 at 05:35:39PM -0800, Jakub Kicinski wrote: > > [...] > > > +static int nsim_vfs_enable(struct netdevsim *ns, unsigned int num_vfs) > > > +{ > > > + ns->vf

Re: [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality

2017-12-01 Thread Jakub Kicinski
On Fri, 1 Dec 2017 14:43:06 +0100, Phil Sutter wrote: > On Thu, Nov 30, 2017 at 05:35:39PM -0800, Jakub Kicinski wrote: > [...] > > +static int nsim_vfs_enable(struct netdevsim *ns, unsigned int num_vfs) > > +{ > > + ns->vfconfigs = kcalloc(num_vfs, sizeof(struct nsim_vf_config), > > +

Re: [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality

2017-12-01 Thread Phil Sutter
On Thu, Nov 30, 2017 at 05:35:39PM -0800, Jakub Kicinski wrote: [...] > +static int nsim_vfs_enable(struct netdevsim *ns, unsigned int num_vfs) > +{ > + ns->vfconfigs = kcalloc(num_vfs, sizeof(struct nsim_vf_config), > + GFP_KERNEL); > + if (!ns->vfconfigs) > +