diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2024-08-21 01:17:51 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2024-08-21 01:17:51 +0000 |
commit | 2a54d2ae6aec2502a507d77622792279fbb97b90 (patch) | |
tree | 3bc941d3b595a96fd96c3b0b9c53de3cfa02ad8c | |
parent | f3e934410fd68fc4fee2921b36a784d9cf9ea98b (diff) |
use 2k clusters on the rx ring instead of 9k clusters.
rge can chain mbufs from multiple rx descriptors together to build
a jumbo packet. 1514 byte packets are still the most common, so
avoiding the waste of most of a 9k cluster if we can still makes
sense.
-rw-r--r-- | sys/dev/pci/if_rge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_rge.c b/sys/dev/pci/if_rge.c index 44ce8f0d7c1..b4a09c1d6dc 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.32 2024/08/21 01:12:52 dlg Exp $ */ +/* $OpenBSD: if_rge.c,v 1.33 2024/08/21 01:17:50 dlg Exp $ */ /* * Copyright (c) 2019, 2020, 2023, 2024 @@ -566,7 +566,7 @@ rge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCGIFRXR: error = if_rxr_ioctl((struct if_rxrinfo *)ifr->ifr_data, - NULL, RGE_JUMBO_FRAMELEN, &sc->sc_queues->q_rx.rge_rx_ring); + NULL, MCLBYTES, &sc->sc_queues->q_rx.rge_rx_ring); break; default: error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data); @@ -1144,11 +1144,11 @@ rge_newbuf(struct rge_queues *q) uint32_t cmdsts; int idx; - m = MCLGETL(NULL, M_DONTWAIT, RGE_JUMBO_FRAMELEN); + m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES); if (m == NULL) return (ENOBUFS); - m->m_len = m->m_pkthdr.len = RGE_JUMBO_FRAMELEN; + m->m_len = m->m_pkthdr.len = MCLBYTES; idx = q->q_rx.rge_rxq_prodidx; rxq = &q->q_rx.rge_rxq[idx]; |