Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Giving up adjusting ETHER_ALIGN.
details: https://anonhg.NetBSD.org/src/rev/de5778ad28e2
branches: trunk
changeset: 369616:de5778ad28e2
user: ryo <ryo%NetBSD.org@localhost>
date: Wed Aug 24 03:03:58 2022 +0000
description:
Giving up adjusting ETHER_ALIGN.
Even if the jumbo frame setting is off, eqos will DMA transfer frames of
2048 bytes or more in increments of 2048 bytes if they are received.
If the start position of the mbuf data is shifted by ETHER_ALIGN bytes
in m_adj(), up to 2048 bytes of data will be written from the +ETHER_ALIGN
position, causing overflow of the mbuf cluster.
diffstat:
sys/dev/ic/dwc_eqos.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r ec7493e745f4 -r de5778ad28e2 sys/dev/ic/dwc_eqos.c
--- a/sys/dev/ic/dwc_eqos.c Tue Aug 23 21:13:46 2022 +0000
+++ b/sys/dev/ic/dwc_eqos.c Wed Aug 24 03:03:58 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_eqos.c,v 1.10 2022/08/23 05:41:46 ryo Exp $ */
+/* $NetBSD: dwc_eqos.c,v 1.11 2022/08/24 03:03:58 ryo Exp $ */
/*-
* Copyright (c) 2022 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
#include "opt_net_mpsafe.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.10 2022/08/23 05:41:46 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.11 2022/08/24 03:03:58 ryo Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -365,8 +365,6 @@
{
int error;
- m_adj(m, ETHER_ALIGN);
-
error = bus_dmamap_load_mbuf(sc->sc_dmat,
sc->sc_rx.buf_map[index].map, m, BUS_DMA_READ | BUS_DMA_NOWAIT);
if (error != 0)
Home |
Main Index |
Thread Index |
Old Index