Page MenuHomeFreeBSD

if_vtnet: improve and cleanup the receive code
ClosedPublic

Authored by bryanv on Jan 2 2021, 8:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 21 2023, 3:12 PM
Unknown Object (File)
Dec 20 2023, 1:15 AM
Unknown Object (File)
Nov 26 2023, 7:58 AM
Unknown Object (File)
Nov 22 2023, 8:26 PM
Unknown Object (File)
Nov 13 2023, 10:16 AM
Unknown Object (File)
Oct 19 2023, 3:00 AM
Unknown Object (File)
Sep 26 2023, 3:59 PM
Unknown Object (File)
Sep 8 2023, 12:05 AM
Subscribers

Details

Summary
  • 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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bryanv held this revision as a draft.
bryanv added a reviewer: grehan.
bryanv published this revision for review.Jan 2 2021, 9:59 PM
debdrup added inline comments.
sys/dev/virtio/network/if_vtnet.c
1384–1385

Minor nit

This revision was not accepted when it landed; it landed in state Needs Review.Jan 19 2021, 5:11 AM
This revision was automatically updated to reflect the committed changes.