search for: minormask

Displaying 7 results from an estimated 7 matches for "minormask".

2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
On Fri, Jan 31, 2020 at 11:36:51AM +0800, Tiwei Bie wrote: > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL); > +} Please don't use idr in new code, use xarray directly > +static int vhost_vdpa_probe(struct device *dev) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa *v;...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
On Fri, Jan 31, 2020 at 11:36:51AM +0800, Tiwei Bie wrote: > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL); > +} Please don't use idr in new code, use xarray directly > +static int vhost_vdpa_probe(struct device *dev) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa *v;...
2020 Feb 19
1
[PATCH] vhost: introduce vDPA based backend
...(IS_ERR(vhost_vdpa.class)) { > > > + r = PTR_ERR(vhost_vdpa.class); > > > + goto err_class; > > > + } > > > + > > > + vhost_vdpa.class->devnode = vhost_vdpa_devnode; > > > + > > > + r = alloc_chrdev_region(&vhost_vdpa.devt, 0, MINORMASK + 1, > > > + "vhost-vdpa"); > > > + if (r) > > > + goto err_alloc_chrdev; > > > + > > > + cdev_init(&vhost_vdpa.cdev, &vhost_vdpa_fops); > > > + r = cdev_add(&vhost_vdpa.cdev, vhost_vdpa.devt, MINORMASK + 1); > >...
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
On Tue, Feb 18, 2020 at 09:53:59AM -0400, Jason Gunthorpe wrote: > On Fri, Jan 31, 2020 at 11:36:51AM +0800, Tiwei Bie wrote: > > > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > > +{ > > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > > + GFP_KERNEL); > > +} > > Please don't use idr in new code, use xarray directly > > > +static int vhost_vdpa_probe(struct device *dev) > > +{ > > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > > + const struct vdpa_config_ops *ops = v...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...> + wait_queue_head_t release_q; > +} vhost_vdpa; > + > +static const u64 vhost_vdpa_features[] = { > + [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, > +}; > + > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL); > +} > + > +static void vhost_vdpa_free_minor(int minor) > +{ > + idr_remove(&vhost_vdpa.idr, minor); > +} > + > +static struct vhost_vdpa *vhost_vdpa_get_from_minor(int minor) > +{ > + struct vhost_vdpa *v; > + > + mutex_lock(&amp...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...> + wait_queue_head_t release_q; > +} vhost_vdpa; > + > +static const u64 vhost_vdpa_features[] = { > + [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, > +}; > + > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL); > +} > + > +static void vhost_vdpa_free_minor(int minor) > +{ > + idr_remove(&vhost_vdpa.idr, minor); > +} > + > +static struct vhost_vdpa *vhost_vdpa_get_from_minor(int minor) > +{ > + struct vhost_vdpa *v; > + > + mutex_lock(&amp...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...; +} vhost_vdpa; > > + > > +static const u64 vhost_vdpa_features[] = { > > + [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, > > +}; > > + > > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > > +{ > > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > > + GFP_KERNEL); > > +} > > + > > +static void vhost_vdpa_free_minor(int minor) > > +{ > > + idr_remove(&vhost_vdpa.idr, minor); > > +} > > + > > +static struct vhost_vdpa *vhost_vdpa_get_from_minor(int minor) > > +{ > &gt...