[Bug 165059] vtnet(4): Networking breaks with a router using virtio net driver on KVM host

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165059

Aleksandr Fedorov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #37 from Aleksandr Fedorov <[email protected]> ---
This is simply because FreeBSD does not know how to forward and NAT packets
with offload.
KVM forwards packets to a virtual machine that can be up to 64 kilobytes in
size and without checksums.

This is optimization!!!

Just read the virtio specification:

struct virtio_net_hdr {
#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1
#define VIRTIO_NET_HDR_F_DATA_VALID 2
#define VIRTIO_NET_HDR_F_RSC_INFO 4
u8 flags;
#define VIRTIO_NET_HDR_GSO_NONE 0
#define VIRTIO_NET_HDR_GSO_TCPV4 1
#define VIRTIO_NET_HDR_GSO_UDP 3
#define VIRTIO_NET_HDR_GSO_TCPV6 4
#define VIRTIO_NET_HDR_GSO_UDP_L4 5
#define VIRTIO_NET_HDR_GSO_ECN 0x80
 u8 gso_type;
 le16 hdr_len;
 le16 gso_size;
 le16 csum_start;
 le16 csum_offset;
 le16 num_buffers;
 le32 hash_value; (Only if VIRTIO_NET_F_HASH_REPORT negotiated)
 le16 hash_report; (Only if VIRTIO_NET_F_HASH_REPORT negotiated)
 le16 padding_reserved; (Only if VIRTIO_NET_F_HASH_REPORT negotiated)
};

https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-2170001

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.