HomeFreeBSD

if_vtnet: Rx path cleanup

Description

if_vtnet: Rx path cleanup

  • Fix the NEEDS_CSUM and DATA_VALID checksum flags. The NEEDS_CSUM checksum is incomplete (partial) so offer a fallback for the driver to calculate the checksum. Simplify DATA_VALID because we know the host has validated the checksum.
  • Default 4K mbuf clusters for mergeable buffers. May need to scale this down to 2K clusters in certain configurations such many queue pairs, big queues (like 4096 in GCP), and low memory.
  • Use the MTU when calculated the receive mbuf cluster size when not doing TSO/LRO. This will need more adjustment once the MTU feature is supported.

Reviewed by: grehan (mentor)
Differential Revision: https://reviews.freebsd.org/D27906

Details

Provenance
bryanvAuthored on Jan 19 2021, 4:55 AM
Reviewer
grehan
Differential Revision
D27906: if_vtnet: improve and cleanup the receive code
Parents
rG149ab110dd5c: virtio_blk: Use DISKFLAG_WRITE_PROTECT for RO disks
Branches
Unknown
Tags
Unknown