diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-08-26 09:17:21 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-08-26 09:17:21 +0000 |
commit | 0f98ea08ea77b115aa15ff2b7b3d133afdfce396 (patch) | |
tree | f4a822afcd70c484ec59513612354a6344d5040f /sys/dev/pci/if_em.h | |
parent | e1de1d5a903c4a656a14fe8aac2ab5c30825db2f (diff) |
Get rid if em_align. This approach used to make sense, but now that the
hardware rx mtu always gets set to the maximum supported value we will hit
it for every received packet. Instead, use a larger mbuf cluster size on
strict alignment architectures such that we can always m_adj to make sure the
packets are properly aligned. This wastes some memory but simplifies things
considerably. Hopefully we can reduce the spillage in the near future by
taking advantage of recent improvements in the pool code.
ok mpi@, mikeb@, dlg@
Diffstat (limited to 'sys/dev/pci/if_em.h')
-rw-r--r-- | sys/dev/pci/if_em.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_em.h b/sys/dev/pci/if_em.h index da4144784fc..f58051644b7 100644 --- a/sys/dev/pci/if_em.h +++ b/sys/dev/pci/if_em.h @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ /* $FreeBSD: if_em.h,v 1.26 2004/09/01 23:22:41 pdeuskar Exp $ */ -/* $OpenBSD: if_em.h,v 1.55 2015/08/21 09:16:06 kettenis Exp $ */ +/* $OpenBSD: if_em.h,v 1.56 2015/08/26 09:17:20 kettenis Exp $ */ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -266,6 +266,12 @@ typedef int boolean_t; #define EM_RXBUFFER_8192 8192 #define EM_RXBUFFER_16384 16384 +#ifdef __STRICT_ALIGNMENT +#define EM_MCLBYTES (EM_RXBUFFER_2048 + ETHER_ALIGN) +#else +#define EM_MCLBYTES EM_RXBUFFER_2048 +#endif + #define EM_MAX_SCATTER 64 #define EM_TSO_SIZE 65535 @@ -324,12 +330,6 @@ struct em_softc { struct timeout timer_handle; struct timeout tx_fifo_timer_handle; -#ifdef __STRICT_ALIGNMENT - /* Used for carrying forward alignment adjustments */ - unsigned char align_buf[ETHER_ALIGN]; /* tail of unaligned packet */ - u_int8_t align_buf_len; /* bytes in tail */ -#endif /* __STRICT_ALIGNMENT */ - /* Info about the board itself */ u_int32_t part_num; u_int8_t link_active; |