Module Name:    src
Committed By:   yamt
Date:           Fri Dec  6 02:39:58 UTC 2013

Modified Files:
        src/sys/dev/pci: virtioreg.h virtiovar.h

Log Message:
virtio: move a comment to a more appropriate place

no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/virtioreg.h \
    src/sys/dev/pci/virtiovar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/virtioreg.h
diff -u src/sys/dev/pci/virtioreg.h:1.1 src/sys/dev/pci/virtioreg.h:1.2
--- src/sys/dev/pci/virtioreg.h:1.1	Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/virtioreg.h	Fri Dec  6 02:39:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtioreg.h,v 1.1 2011/10/30 12:12:21 hannken Exp $	*/
+/*	$NetBSD: virtioreg.h,v 1.2 2013/12/06 02:39:58 yamt Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -147,6 +147,29 @@ struct vring_used {
         struct vring_used_elem ring[0];
 } __packed;
 
+/* The standard layout for the ring is a continuous chunk of memory which
+ * looks like this.  We assume num is a power of 2.
+ *
+ * struct vring {
+ *      // The actual descriptors (16 bytes each)
+ *      struct vring_desc desc[num];
+ *
+ *      // A ring of available descriptor heads with free-running index.
+ *      __u16 avail_flags;
+ *      __u16 avail_idx;
+ *      __u16 available[num];
+ *
+ *      // Padding to the next align boundary.
+ *      char pad[];
+ *
+ *      // A ring of used descriptor heads with free-running index.
+ *      __u16 used_flags;
+ *      __u16 used_idx;
+ *      struct vring_used_elem used[num];
+ * };
+ * Note: for virtio PCI, align is 4096.
+ */
+
 #define VIRTIO_PAGE_SIZE	(4096)
 
 #endif /* _DEV_PCI_VIRTIOREG_H_ */
Index: src/sys/dev/pci/virtiovar.h
diff -u src/sys/dev/pci/virtiovar.h:1.1 src/sys/dev/pci/virtiovar.h:1.2
--- src/sys/dev/pci/virtiovar.h:1.1	Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/virtiovar.h	Fri Dec  6 02:39:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtiovar.h,v 1.1 2011/10/30 12:12:21 hannken Exp $	*/
+/*	$NetBSD: virtiovar.h,v 1.2 2013/12/06 02:39:58 yamt Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -146,29 +146,6 @@ struct virtio_softc {
 					 /* set by child */
 };
 
-/* The standard layout for the ring is a continuous chunk of memory which
- * looks like this.  We assume num is a power of 2.
- *
- * struct vring {
- *      // The actual descriptors (16 bytes each)
- *      struct vring_desc desc[num];
- *
- *      // A ring of available descriptor heads with free-running index.
- *      __u16 avail_flags;
- *      __u16 avail_idx;
- *      __u16 available[num];
- *
- *      // Padding to the next align boundary.
- *      char pad[];
- *
- *      // A ring of used descriptor heads with free-running index.
- *      __u16 used_flags;
- *      __u16 used_idx;
- *      struct vring_used_elem used[num];
- * };
- * Note: for virtio PCI, align is 4096.
- */
-
 /* public interface */
 uint32_t virtio_negotiate_features(struct virtio_softc*, uint32_t);
 

Reply via email to