Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci virtio: move a comment to a more appropriate place



details:   https://anonhg.NetBSD.org/src/rev/935920240a45
branches:  trunk
changeset: 325104:935920240a45
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Dec 06 02:39:58 2013 +0000

description:
virtio: move a comment to a more appropriate place

no functional changes.

diffstat:

 sys/dev/pci/virtioreg.h |  25 ++++++++++++++++++++++++-
 sys/dev/pci/virtiovar.h |  25 +------------------------
 2 files changed, 25 insertions(+), 25 deletions(-)

diffs (78 lines):

diff -r 1c413f40c996 -r 935920240a45 sys/dev/pci/virtioreg.h
--- a/sys/dev/pci/virtioreg.h   Fri Dec 06 02:31:31 2013 +0000
+++ b/sys/dev/pci/virtioreg.h   Fri Dec 06 02:39:58 2013 +0000
@@ -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_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_ */
diff -r 1c413f40c996 -r 935920240a45 sys/dev/pci/virtiovar.h
--- a/sys/dev/pci/virtiovar.h   Fri Dec 06 02:31:31 2013 +0000
+++ b/sys/dev/pci/virtiovar.h   Fri Dec 06 02:39:58 2013 +0000
@@ -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 @@
                                         /* 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);
 



Home | Main Index | Thread Index | Old Index