vtnet: Adjust rx buffer so IP header 32-bit aligned

Call madj(m, ETHER_ALIGN) to offset rx buffers when allocating them.
This improves performance everywhere, and allows armv7 to work at all.

PR:			271288 (PR had a different fix than I wound up with)
MFC After:		3 days
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D43136
This commit is contained in:
Warner Losh 2023-12-20 12:09:09 -07:00
parent 486ee36440
commit 9e6d11ce9a

View file

@ -1532,8 +1532,8 @@ vtnet_rx_alloc_buf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp)
m_freem(m_head);
return (NULL);
}
m->m_len = size;
m_adj(m, ETHER_ALIGN);
if (m_head != NULL) {
m_tail->m_next = m;
m_tail = m;