search for: vhost_mdev_net_ctrl

Displaying 5 results from an estimated 5 matches for "vhost_mdev_net_ctrl".

2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
.... + */ +static long vhost_mdev_dev_ioctl(struct vhost_mdev *m, unsigned int cmd, + void __user *argp) +{ + struct mdev_device *mdev = m->mdev; + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); + + switch (m->virtio_id) { + case VIRTIO_ID_NET: + switch (cmd) { + case VHOST_MDEV_NET_CTRL: + if (!ops->net.ctrl) + return -ENOTSUPP; + return ops->net.ctrl(mdev, argp); + } + break; + } + + return -ENOIOCTLCMD; +} + static int vhost_mdev_open(void *device_data) { struct vhost_mdev *m = device_data; @@ -460,8 +490,11 @@ static long vhost_mdev_unlocked_ioctl(void *devic...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
.... + */ +static long vhost_mdev_dev_ioctl(struct vhost_mdev *m, unsigned int cmd, + void __user *argp) +{ + struct mdev_device *mdev = m->mdev; + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); + + switch (m->virtio_id) { + case VIRTIO_ID_NET: + switch (cmd) { + case VHOST_MDEV_NET_CTRL: + if (!ops->net.ctrl) + return -ENOTSUPP; + return ops->net.ctrl(mdev, argp); + } + break; + } + + return -ENOIOCTLCMD; +} + static int vhost_mdev_open(void *device_data) { struct vhost_mdev *m = device_data; @@ -460,8 +490,11 @@ static long vhost_mdev_unlocked_ioctl(void *devic...
2019 Oct 29
0
[RFC] vhost_mdev: add network control vq support
...ct vhost_mdev *m, unsigned int cmd, > + void __user *argp) > +{ > + struct mdev_device *mdev = m->mdev; > + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); > + > + switch (m->virtio_id) { > + case VIRTIO_ID_NET: > + switch (cmd) { > + case VHOST_MDEV_NET_CTRL: > + if (!ops->net.ctrl) > + return -ENOTSUPP; > + return ops->net.ctrl(mdev, argp); > + } > + break; > + } > + > + return -ENOIOCTLCMD; > +} As you comment above, then vhost-mdev need device specific stuffs. > + > static int vhost_mdev_open(void...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...+ void __user *argp) > > +{ > > + struct mdev_device *mdev = m->mdev; > > + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); > > + > > + switch (m->virtio_id) { > > + case VIRTIO_ID_NET: > > + switch (cmd) { > > + case VHOST_MDEV_NET_CTRL: > > + if (!ops->net.ctrl) > > + return -ENOTSUPP; > > + return ops->net.ctrl(mdev, argp); > > + } > > + break; > > + } > > + > > + return -ENOIOCTLCMD; > > +} > > As you comment above, then vhost-mdev need device specific...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...+ void __user *argp) > > +{ > > + struct mdev_device *mdev = m->mdev; > > + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); > > + > > + switch (m->virtio_id) { > > + case VIRTIO_ID_NET: > > + switch (cmd) { > > + case VHOST_MDEV_NET_CTRL: > > + if (!ops->net.ctrl) > > + return -ENOTSUPP; > > + return ops->net.ctrl(mdev, argp); > > + } > > + break; > > + } > > + > > + return -ENOIOCTLCMD; > > +} > > As you comment above, then vhost-mdev need device specific...