diff options
| author | yamt <yamt@NetBSD.org> | 2013-12-06 02:39:58 +0000 |
|---|---|---|
| committer | yamt <yamt@NetBSD.org> | 2013-12-06 02:39:58 +0000 |
| commit | 08bb0b90d820e2cca0050d8f1bd0afca41007999 (patch) | |
| tree | d3ec53964e62940eb88eefaf1796e846347d074b /sys/dev | |
| parent | e7efb3f2a3b3b55dd80cae7e593d6d1050dc181e (diff) | |
virtio: move a comment to a more appropriate place
no functional changes.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/virtioreg.h | 25 | ||||
| -rw-r--r-- | sys/dev/pci/virtiovar.h | 25 |
2 files changed, 25 insertions, 25 deletions
diff --git a/sys/dev/pci/virtioreg.h b/sys/dev/pci/virtioreg.h index 911a3032bb1..d14023f463a 100644 --- a/sys/dev/pci/virtioreg.h +++ b/sys/dev/pci/virtioreg.h @@ -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_ */ diff --git a/sys/dev/pci/virtiovar.h b/sys/dev/pci/virtiovar.h index 41188a2bf08..c9a113bfddd 100644 --- a/sys/dev/pci/virtiovar.h +++ b/sys/dev/pci/virtiovar.h @@ -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); |
