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)
Oct 21 2024, 6:50 AM
Unknown Object (File)
Oct 5 2024, 4:08 AM
Unknown Object (File)
Oct 4 2024, 7:07 AM
Unknown Object (File)
Oct 3 2024, 10:04 AM
Unknown Object (File)
Oct 3 2024, 12:18 AM
Unknown Object (File)
Oct 2 2024, 5:07 AM
Unknown Object (File)
Sep 26 2024, 7:52 AM
Unknown Object (File)
Sep 26 2024, 4:12 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35871
Build 32760: arc lint + arc unit

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.