MFC FreeBSD if_em.c 1.48 and 1.49.
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 19 Oct 2004 05:47:52 +0000 (05:47 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 19 Oct 2004 05:47:52 +0000 (05:47 +0000)
commit82342dcec92268a6af1be7c87a96ac1012d520b2
tree8c0cc45ea5e6b851460fec531090ffed2a248b8f
parent2848dd3159846312568da795b989466299a9f821
MFC FreeBSD if_em.c 1.48 and 1.49.

Remove an unnecessary bus_dmamap_create and destroy for the rx and tx
descriptor rings.  No bounce buffers are ever needed since bus_dmamem_alloc()
allocates the correct type of memory and never needs a bounce buffer.

Use an alignment of 1 instead of PAGE_SIZE for the rx and tx buffer tags.
Since the e1000 DMA engines hava no constraints on the alignment of buffer
transfers, there is no reason to tell busdma that there is.  This saves a
minimum of 1 malloc call per packet and avoids needless boucning.

Use BUS_DMA_WAITOK when allocating the receive descriptor ring.  It's really
silly to use BUS_DMA_NOWAIT here, it isn't all that much memory.

A simple cached NFS test did not result in any noticeable improvement in
cpu or packet efficiency but Scott's commit message indicated a significant
improvement in a larger FreeBSD machine setup, probably oweing more to the
locks eliminated in FreeBSD (which does not apply to DragonFly).

Suggested-by: David Rhodus
Obtained from: Sandvine, Inc.  via FreeBSD  if_em.c 1.48 and 1.49 (scottl)
sys/dev/netif/em/if_em.c