]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vtnet: Better adjust for ethernet alignment.
authorWarner Losh <imp@FreeBSD.org>
Thu, 21 Dec 2023 20:36:12 +0000 (13:36 -0700)
committerWarner Losh <imp@FreeBSD.org>
Thu, 28 Dec 2023 06:25:53 +0000 (23:25 -0700)
commite9da71cd35d46ca13da4396d99e0af1703290e68
tree83b32713085d78f6b6817bb307e10e7afc1c364a
parentb8856bd2d6acb10af236b7b8cd0cf3121da8c994
vtnet: Better adjust for ethernet alignment.

Move adjustment of the mbuf from where we allocate it to where we are
about to queue it to the device. Do this only on those platforms that
require it. This allows us to receive an entire jumbo frame on other
platforms. It also doesn't make the adjustment on subsequent frames when
we queue mulitple mbufs for LRO operations.

For the normal use case on armv7, there's no difference because we only
ever allocate one mbuf. However, for the LRO cases it increases what's
available in LRO. It also ensure that we get enough mbufs in those cases
as well (though I have no ability to test this on a LRO scenario with
armv7).

This has the side effect of reverting 527b62e37e68.

Fixes: 527b62e37e68
Sponsored by: Netflix
sys/dev/virtio/network/if_vtnet.c