Displaying 1 result from an estimated 1 matches for "virtexample_info".
2019 Apr 29
1
[RFC-PATCH] Introducing virtio-example.
...a-mapping.h> /* DMA */
+#include <linux/kernel.h> /* kstrtoint() func */
+#include <linux/virtio_config.h> /* find_single_vq() func */
+
+
+#define VIRTIO_ID_EXAMPLE 21
+/* big enough to contain a string representing an integer */
+#define MAX_DATA_SIZE 20
+
+struct virtexample_info {
+ struct virtqueue *vq;
+ /*
+ * in - the data we get from the device
+ * out - the data we send to the device
+ */
+ int in, out;
+};
+
+
+
+//-----------------------------------------------------------------------------
+// sysfs - give user access to driver
+...