search for: mvnet_ioctl

Displaying 3 results from an estimated 3 matches for "mvnet_ioctl".

2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...MDEV_CONFIG) { > + if (count == 4) > + ret = mvnet_write_config(mdev, (u32 *)buf, *ppos); > + else > + ret = -EINVAL; > + *ppos += 4; > + } else { > + /* No writable net config */ > + ret = -EINVAL; > + } > + > + return ret; > +} > + > +static long mvnet_ioctl(struct mdev_device *mdev, unsigned int cmd, > + unsigned long arg) > +{ > + int ret = 0; > + struct mvnet_state *mvnet; > + struct virtio_mdev_callback *cb; > + > + if (!mdev) > + return -EINVAL; > + > + mvnet = mdev_get_drvdata(mdev); > + if (!mvnet) > + ret...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...size_t count, loff_t *ppos) +{ + int ret; + + if (*ppos < VIRTIO_MDEV_CONFIG) { + if (count == 4) + ret = mvnet_write_config(mdev, (u32 *)buf, *ppos); + else + ret = -EINVAL; + *ppos += 4; + } else { + /* No writable net config */ + ret = -EINVAL; + } + + return ret; +} + +static long mvnet_ioctl(struct mdev_device *mdev, unsigned int cmd, + unsigned long arg) +{ + int ret = 0; + struct mvnet_state *mvnet; + struct virtio_mdev_callback *cb; + + if (!mdev) + return -EINVAL; + + mvnet = mdev_get_drvdata(mdev); + if (!mvnet) + return -ENODEV; + + spin_lock(&mvnet->lock); + + switch...
2019 Sep 10
8
[RFC PATCH 0/4] mdev based hardware virtio offloading support
Hi all: There are hardware that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and register itself as a new kind of mdev driver. Then it provides a unified way for kernel virtio driver to