mirror of
https://github.com/ipxe/ipxe
synced 2026-01-02 01:42:37 +03:00
[virtio] Add virtio 1.0 constants and data structures
Virtio 1.0 introduces new constants and data structures, common to all devices as well as specific to virtio-net. This commit adds a subset of these to be able to drive the virtio-net 1.0 network device. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
2379494918
commit
7b499f849e
@@ -14,6 +14,12 @@
|
||||
#define VIRTIO_NET_F_HOST_TSO6 12 /* Host can handle TSOv6 in. */
|
||||
#define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */
|
||||
#define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */
|
||||
#define VIRTIO_NET_F_MRG_RXBUF 15 /* Driver can merge receive buffers. */
|
||||
#define VIRTIO_NET_F_STATUS 16 /* Configuration status field is available. */
|
||||
#define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel is available. */
|
||||
#define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support. */
|
||||
#define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering. */
|
||||
#define VIRTIO_NET_F_GUEST_ANNOUNCE 21 /* Driver can send gratuitous packets. */
|
||||
|
||||
struct virtio_net_config
|
||||
{
|
||||
@@ -41,4 +47,14 @@ struct virtio_net_hdr
|
||||
uint16_t csum_start;
|
||||
uint16_t csum_offset;
|
||||
};
|
||||
|
||||
/* Virtio 1.0 version of the first element of the scatter-gather list. */
|
||||
struct virtio_net_hdr_modern
|
||||
{
|
||||
struct virtio_net_hdr legacy;
|
||||
|
||||
/* Used only if VIRTIO_NET_F_MRG_RXBUF: */
|
||||
uint16_t num_buffers;
|
||||
};
|
||||
|
||||
#endif /* _VIRTIO_NET_H_ */
|
||||
|
||||
Reference in New Issue
Block a user