Use and alignment of 1 instead of ETHER_ALIGN for rx and tx buffers and jumbo

frames.  BGE hardware with the rx alignment bug will still be handled by the
calls to m_adj() that already exist.  m_adj() is probably better suited for
this task anyways.  Just as with if_em, this saves a malloc + several locks
per packet and prevents unneeded data copying within busdma.
This commit is contained in:
scottl 2004-10-19 02:42:49 +00:00
parent 57d3e400ee
commit 76f96ced4b

View File

@ -1935,7 +1935,7 @@ bge_dma_alloc(dev)
* Create tag for RX mbufs.
*/
nseg = 32;
error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, ETHER_ALIGN,
error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1,
0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL,
NULL, MCLBYTES * nseg, nseg, MCLBYTES, 0, NULL, NULL,
&sc->bge_cdata.bge_mtag);
@ -2024,7 +2024,7 @@ bge_dma_alloc(dev)
*/
error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag,
ETHER_ALIGN, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL,
1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL,
NULL, MCLBYTES * nseg, nseg, BGE_JLEN, 0, NULL, NULL,
&sc->bge_cdata.bge_mtag_jumbo);