diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-10-27 03:00:36 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-10-27 03:00:36 +0000 |
commit | d8387b6837f7832fe3fa9fd6158994b6d0ef16f9 (patch) | |
tree | b0a9ff793749e2a273aaecc7e3a7f0f4e6f557b6 /sys/net/if.h | |
parent | c3ec7559ddf5301cc2e4c3703b0d1b345c476545 (diff) |
add a new pool for 2k + 2 byte (mcl2k2) clusters.
a certain vendor likes to make chips that specify the rx buffer
sizes in kilobyte increments. unfortunately it places the ethernet
header on the start of the rx buffer, which means if you give it a
mcl2k cluster, the ethernet header will not be ETHER_ALIGNed cos
mcl2k clusters are always allocated on 2k boundarys (cos they pack
into pages well). that in turn means the ip header wont be aligned
correctly.
the current workaround on these chips has been to let non-strict
alignment archs just use the normal 2k cluster, but use whatever
cluster can fit 2k + 2 on strict archs. that turns out to be the
4k cluster, meaning we waste nearly 2k of space on every packet.
properly aligning the ethernet header and ip headers gives a
performance boost, even on non-strict archs.
Diffstat (limited to 'sys/net/if.h')
-rw-r--r-- | sys/net/if.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 662f7ebaf2a..c5f83c49032 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.179 2016/09/04 15:10:59 reyk Exp $ */ +/* $OpenBSD: if.h,v 1.180 2016/10/27 03:00:35 dlg Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -68,7 +68,7 @@ struct if_clonereq { char *ifcr_buffer; /* buffer for cloner names */ }; -#define MCLPOOLS 7 /* number of cluster pools */ +#define MCLPOOLS 8 /* number of cluster pools */ struct if_rxring { int rxr_adjusted; |