summaryrefslogtreecommitdiffstats
path: root/sys/dev/mxge
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2007-05-25 19:38:32 +0000
committergallatin <gallatin@FreeBSD.org>2007-05-25 19:38:32 +0000
commit4395bbf72e2f9c70562ef2e362413cc20ac4f2e7 (patch)
treed845684661faea1e095cea758725f7cff4cc325c /sys/dev/mxge
parentbf51ee7f9c250d5ab6bed863292c18110e18e23e (diff)
downloadFreeBSD-src-4395bbf72e2f9c70562ef2e362413cc20ac4f2e7.zip
FreeBSD-src-4395bbf72e2f9c70562ef2e362413cc20ac4f2e7.tar.gz
- Use m_getcl() rather than m_getjcl() when we're allocating 2KB
clusters. This helps quite a bit on my low end machines (improves performance by about 300Kpps when being blasted by a hardware packet generator). - Include one extended f/w counter forgotten in earlier commit Sponsored by: Myricom Inc.
Diffstat (limited to 'sys/dev/mxge')
-rw-r--r--sys/dev/mxge/if_mxge.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index d57eff8..93c55a1 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -1372,6 +1372,12 @@ mxge_add_sysctls(mxge_softc_t *sc)
0, mxge_handle_be32,
"I", "dropped_runt");
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO,
+ "dropped_unicast_filtered",
+ CTLTYPE_INT|CTLFLAG_RD, &fw->dropped_unicast_filtered,
+ 0, mxge_handle_be32,
+ "I", "dropped_unicast_filtered");
+
/* host counters exported for debugging */
SYSCTL_ADD_INT(ctx, children, OID_AUTO,
"rx_small_cnt",
@@ -1953,7 +1959,10 @@ mxge_get_buf_big(mxge_softc_t *sc, bus_dmamap_t map, int idx)
mxge_rx_buf_t *rx = &sc->rx_big;
int cnt, err, i;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size);
+ if (rx->cl_size == MCLBYTES)
+ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ else
+ m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size);
if (m == NULL) {
rx->alloc_fail++;
err = ENOBUFS;
OpenPOWER on IntegriCloud