mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 13:30:57 +03:00
[virtio] Consolidate vring_get_buf() by using a buffer list to add to the vring
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
This commit is contained in:
committed by
Michael Brown
parent
5dd5107976
commit
fc49421c7e
@@ -58,6 +58,11 @@ struct vring {
|
||||
struct vring_used *used;
|
||||
};
|
||||
|
||||
struct vring_list {
|
||||
char *addr;
|
||||
unsigned int length;
|
||||
};
|
||||
|
||||
static inline void vring_init(struct vring *vr,
|
||||
unsigned int num, unsigned char *queue)
|
||||
{
|
||||
@@ -90,4 +95,5 @@ static inline void vring_init(struct vring *vr,
|
||||
(sizeof(struct vring_avail) + sizeof(u16) * num)) \
|
||||
+ PAGE_MASK) & ~PAGE_MASK) + \
|
||||
(sizeof(struct vring_used) + sizeof(struct vring_used_elem) * num))
|
||||
|
||||
#endif /* _VIRTIO_RING_H_ */
|
||||
|
||||
Reference in New Issue
Block a user