Page MenuHomeFreeBSD

if_vtnet: improve and cleanup the receive code

Authored by bryanv on Jan 2 2021, 8:56 PM.


  • 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

R10 FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bryanv added a reviewer: grehan.
bryanv published this revision for review.Jan 2 2021, 9:59 PM
debdrup added inline comments.

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.