Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2014 04:25:05 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267522 - in head/sys/dev/virtio: . pci
Message-ID:  <201406160425.s5G4P5nR055880@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Mon Jun 16 04:25:04 2014
New Revision: 267522
URL: http://svnweb.freebsd.org/changeset/base/267522

Log:
  Move the VIRTIO_RING_F_* defines out of virtqueue.h into virtio_config.h
  
  These defines are applicable to userland too, but virtqueue.h contains
  the kernel virtqueue interface, and is therefore not usable in userland.
  
  Note that Linux places these defines in virtio_ring.h, but I don't want
  the drivers including this header file to keep the VirtIO ring opaque to
  everything but the virtqueue.
  
  MFC after:	1 week

Modified:
  head/sys/dev/virtio/pci/virtio_pci.c
  head/sys/dev/virtio/virtio.h
  head/sys/dev/virtio/virtio_config.h
  head/sys/dev/virtio/virtqueue.c
  head/sys/dev/virtio/virtqueue.h

Modified: head/sys/dev/virtio/pci/virtio_pci.c
==============================================================================
--- head/sys/dev/virtio/pci/virtio_pci.c	Mon Jun 16 04:16:31 2014	(r267521)
+++ head/sys/dev/virtio/pci/virtio_pci.c	Mon Jun 16 04:25:04 2014	(r267522)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
 #include <dev/pci/pcireg.h>
 
 #include <dev/virtio/virtio.h>
-#include <dev/virtio/virtio_config.h>
 #include <dev/virtio/virtqueue.h>
 #include <dev/virtio/pci/virtio_pci.h>
 

Modified: head/sys/dev/virtio/virtio.h
==============================================================================
--- head/sys/dev/virtio/virtio.h	Mon Jun 16 04:16:31 2014	(r267521)
+++ head/sys/dev/virtio/virtio.h	Mon Jun 16 04:25:04 2014	(r267522)
@@ -30,6 +30,7 @@
 #define _VIRTIO_H_
 
 #include <dev/virtio/virtio_ids.h>
+#include <dev/virtio/virtio_config.h>
 
 struct vq_alloc_info;
 

Modified: head/sys/dev/virtio/virtio_config.h
==============================================================================
--- head/sys/dev/virtio/virtio_config.h	Mon Jun 16 04:16:31 2014	(r267521)
+++ head/sys/dev/virtio/virtio_config.h	Mon Jun 16 04:25:04 2014	(r267522)
@@ -44,6 +44,12 @@
  */
 #define VIRTIO_F_NOTIFY_ON_EMPTY (1 << 24)
 
+/* Support for indirect buffer descriptors. */
+#define VIRTIO_RING_F_INDIRECT_DESC	(1 << 28)
+
+/* Support to suppress interrupt until specific index is reached. */
+#define VIRTIO_RING_F_EVENT_IDX		(1 << 29)
+
 /*
  * The guest should never negotiate this feature; it
  * is used to detect faulty drivers.

Modified: head/sys/dev/virtio/virtqueue.c
==============================================================================
--- head/sys/dev/virtio/virtqueue.c	Mon Jun 16 04:16:31 2014	(r267521)
+++ head/sys/dev/virtio/virtqueue.c	Mon Jun 16 04:25:04 2014	(r267522)
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/rman.h>
 
 #include <dev/virtio/virtio.h>
-#include <dev/virtio/virtio_config.h>
 #include <dev/virtio/virtqueue.h>
 #include <dev/virtio/virtio_ring.h>
 

Modified: head/sys/dev/virtio/virtqueue.h
==============================================================================
--- head/sys/dev/virtio/virtqueue.h	Mon Jun 16 04:16:31 2014	(r267521)
+++ head/sys/dev/virtio/virtqueue.h	Mon Jun 16 04:25:04 2014	(r267522)
@@ -32,12 +32,6 @@
 struct virtqueue;
 struct sglist;
 
-/* Support for indirect buffer descriptors. */
-#define VIRTIO_RING_F_INDIRECT_DESC	(1 << 28)
-
-/* Support to suppress interrupt until specific index is reached. */
-#define VIRTIO_RING_F_EVENT_IDX		(1 << 29)
-
 /* Device callback for a virtqueue interrupt. */
 typedef void virtqueue_intr_t(void *);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406160425.s5G4P5nR055880>