From: dlg Date: Wed, 21 Aug 2024 01:22:31 +0000 (+0000) Subject: offset rx buffers by ETHER_ALIGN so ip payloads are properly aligned. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1361d1699d51d03492545c0862206edac92d69a9;p=openbsd offset rx buffers by ETHER_ALIGN so ip payloads are properly aligned. --- diff --git a/sys/dev/pci/if_rge.c b/sys/dev/pci/if_rge.c index b4a09c1d6dc..c30c4c99504 100644 --- a/sys/dev/pci/if_rge.c +++ b/sys/dev/pci/if_rge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rge.c,v 1.33 2024/08/21 01:17:50 dlg Exp $ */ +/* $OpenBSD: if_rge.c,v 1.34 2024/08/21 01:22:31 dlg Exp $ */ /* * Copyright (c) 2019, 2020, 2023, 2024 @@ -1149,6 +1149,7 @@ rge_newbuf(struct rge_queues *q) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; + m_adj(m, ETHER_ALIGN); idx = q->q_rx.rge_rxq_prodidx; rxq = &q->q_rx.rge_rxq[idx];