[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/32] net: reorganize headers
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 15/32] net: reorganize headers |
Date: |
Thu, 25 Oct 2012 09:50:45 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Oct 24, 2012 at 02:58:45PM +0200, Paolo Bonzini wrote:
> +struct virtio_net_hdr
> +{
> +#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start,
> csum_offset
> +#define VIRTIO_NET_HDR_F_DATA_VALID 2 // Csum is valid
> + uint8_t flags;
> +#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame
> +#define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO)
> +#define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO)
> +#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP
> +#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
> + uint8_t gso_type;
> + uint16_t hdr_len;
> + uint16_t gso_size;
> + uint16_t csum_start;
> + uint16_t csum_offset;
> +};
Idea for a separate cleanup: net/tap.c doesn't need the definition of
struct virtio_net_hdr or virtio_net_hdr_mrg_rxbuf. It should simply
negotiate vnet_hdr_size between hw/virtio-net.c and the kernel tun
driver. The layout and contents of the struct are not needed by
net/tap.c itself.
Stefan
- [Qemu-devel] [PATCH 03/32] build: adjust setting of QEMU_INCLUDES, (continued)
- [Qemu-devel] [PATCH 03/32] build: adjust setting of QEMU_INCLUDES, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 04/32] build: add $(TARGET_DIR) to "GEN config-target.h" lines, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 02/32] vscclient: use per-target variables, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 06/32] build: create ldscripts/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 05/32] build: move rules from Makefile to */Makefile.objs, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 07/32] build: kill libdis, move disassemblers to disas/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 13/32] net: do not include net.h everywhere, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 12/32] net: move Bluetooth stuff out of net.h, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 15/32] net: reorganize headers, Paolo Bonzini, 2012/10/24
- Re: [Qemu-devel] [PATCH 15/32] net: reorganize headers,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 11/32] janitor: do not include qemu-char everywhere, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 20/32] qapi: move include files to include/qapi/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 24/32] monitor: move include files to include/monitor/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 22/32] block: move include files to include/block/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 21/32] qapi: create qobject/ and include/qobject/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 29/32] softmmu: move remaining include files to include/ subdirectories, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 23/32] exec: move include files to include/exec/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 27/32] misc: move include files to include/qemu/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 28/32] softmmu: move include files to include/sysemu/, Paolo Bonzini, 2012/10/24
- [Qemu-devel] [PATCH 10/32] janitor: do not rely on indirect inclusions from qemu-char.h, Paolo Bonzini, 2012/10/24