Displaying 4 results from an estimated 4 matches for "vdev_id".
Did you mean:
dev_id
2020 Aug 03
0
[PATCH v2 18/24] mlxbf-tmfifo: sparse tags for config access
...rm/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index 5739a9669b29..bbc4e71a16ff 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -625,7 +625,10 @@ static void mlxbf_tmfifo_rxtx_header(struct mlxbf_tmfifo_vring *vring,
vdev_id = VIRTIO_ID_NET;
hdr_len = sizeof(struct virtio_net_hdr);
config = &fifo->vdev[vdev_id]->config.net;
- if (ntohs(hdr.len) > config->mtu +
+ /* A legacy-only interface for now. */
+ if (ntohs(hdr.len) >
+ __virtio16_to_cpu(virtio_legacy_is_little_endian(),
+...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...buf);
+
+ return 0;
+}
+
+static int get_viodev_info(struct viotest_dev *vtest, struct viotest_info __user *arg)
+{
+ struct viotest_vq *vtvq;
+ struct viotest_info *info;
+
+ info = kzalloc(sizeof(struct viotest_info), GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ info->device_id = vtest->vdev_id.device;
+ info->vendor_id = vtest->vdev_id.vendor;
+ list_for_each_entry(vtvq, &vtest->vq_list, list)
+ info->num_vqs++;
+ if (copy_to_user(arg, info, sizeof(*info))) {
+ kfree(info);
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int get_callbacks(struct viotest_dev *vtest, s...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...buf);
+
+ return 0;
+}
+
+static int get_viodev_info(struct viotest_dev *vtest, struct viotest_info __user *arg)
+{
+ struct viotest_vq *vtvq;
+ struct viotest_info *info;
+
+ info = kzalloc(sizeof(struct viotest_info), GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ info->device_id = vtest->vdev_id.device;
+ info->vendor_id = vtest->vdev_id.vendor;
+ list_for_each_entry(vtvq, &vtest->vq_list, list)
+ info->num_vqs++;
+ if (copy_to_user(arg, info, sizeof(*info))) {
+ kfree(info);
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int get_callbacks(struct viotest_dev *vtest, s...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are
not tagged with the correct endian-ness so it's easy
to make mistakes like instanciating config space in
native endian-ness.
The following patches adding sparse tagging are currently in my tree.
Lightly tested.
As a follow-up, I plan to add new APIs that handle modern config space
in a more efficient way (bypassing the version check).