DragonFly commits List (threaded) for 2006-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/sys/dev/netif/sk if_sk.c if_skvar.h
sephe 2006/12/21 06:13:04 PST
DragonFly src repository
Modified files:
sys/dev/netif/sk if_sk.c if_skvar.h
Log:
- Use jumbo buffers only when MTU > 1518 bytes.
o In sk_dma_alloc(), allocate additional DMA stuffs for normal mbuf cluster
to use.
o In sk_init(), set sk_if_softc.sk_use_jumbo if ifnet.if_mtu > 1518. This
should only be done after sk_stop(), so sk_stop() will not free wrong RX
buffers. Add a comment about it.
o Don't touch jumbo buffer related bits in hardware registers, if jumbo
buffer is not used currently.
o Rename old sk_newbuf() to sk_newbuf_jumbo().
o Implement sk_newbuf_std(), which allocates RX buffer using mbuf clusters.
o Add a wrapper function, sk_newbuf(), to switch between above two functions
based on whether sk_if_softc.sk_use_jumbo is set or not.
- If something fail in sk_rxeof(), don't call sk_newbuf() with old mbuf:
Hardware will not change RX descriptor's buffer address part. Only
controlling bits of the RX descriptor need to be set up properly.
Nuke third parameter (i.e. mbuf) of sk_newbuf() after this change and
rearrange sk_newbuf_jumbo() accordingly.
- Since sk_chain and TX/RX descriptor use same index, nuke unnecessary
sk_chain.sk_desc field, which points to a corresponding TX/RX descriptor.
Pass the TX/RX descriptor index to sk_newbuf() instead of sk_chain pointer.
Nuke never used sk_chain.sk_next field. These changes degenarate sk_chain
into a mbuf pointer, so nuke no longer needed sk_chain structure.
Tested-by: Rumko <rumcic@gmail.com> and Gergo Szakal <bastyaelvtars@gmail.com>
Partially-reviewed-by: dillon@
Revision Changes Path
1.51 +240 -104 src/sys/dev/netif/sk/if_sk.c
1.2 +6 -9 src/sys/dev/netif/sk/if_skvar.h
http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/sk/if_sk.c.diff?r1=1.50&r2=1.51&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/sk/if_skvar.h.diff?r1=1.1&r2=1.2&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]