opnsense-src/sys/dev/virtio
Warner Losh 3be59adbb5 vtnet: Adjust for ethernet alignment.
If the header that we add to the packet's size is 0 % 4 and we're
strictly aligning, then we need to adjust where we store the header so
the packet that follows will have it's struct ip header properly
aligned.  We do this on allocation (and when we check the length of the
mbufs in the lro_nomrg case). We can't just adjust the clustersz in the
softc, because it's also used to allocate the mbufs and it needs to be
the proper size for that. Since we otherwise use the size of the mbuf
(or sometimes the smaller size of the received packet) to compute how
much we can buffer, this ensures no overflows. The 2 byte adjustment
also does not affect how many packets we can receive in the lro_nomrg
case.

PR:			271288
Sponsored by:		Netflix
Reviewed by:		bryanv
Differential Revision:	https://reviews.freebsd.org/D43224
2024-01-28 22:08:55 -07:00
..
balloon sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
block sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
console sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
gpu vtgpu: Fix the physical memory size 2023-09-21 11:50:29 +01:00
mmio sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
network vtnet: Adjust for ethernet alignment. 2024-01-28 22:08:55 -07:00
pci sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
random sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
scsi sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
virtio.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
virtio.h virtio: remove virtio_alloc_virtqueues' flags arg 2023-09-18 22:03:31 +02:00
virtio_bus_if.m virtio: remove virtio_alloc_virtqueues' flags arg 2023-09-18 22:03:31 +02:00
virtio_config.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
virtio_endian.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
virtio_ids.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
virtio_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
virtio_ring.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
virtqueue.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
virtqueue.h virtio: use bool for boolean functions 2023-09-18 22:03:26 +02:00