Date: Wed, 4 Feb 2009 08:00:05 -0800 From: Andrew Thompson <thompsa@FreeBSD.org> To: Hans Petter Selasky <hselasky@c2i.net> Cc: Perforce Change Reviews <perforce@freebsd.org>, Weongyo Jeong <weongyo@freebsd.org> Subject: Re: PERFORCE change 157132 for review Message-ID: <20090204160005.GB77595@citylink.fud.org.nz> In-Reply-To: <200902041459.35445.hselasky@c2i.net> References: <200902041242.n14CgXj2014958@repoman.freebsd.org> <200902041459.35445.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 04, 2009 at 02:59:35PM +0100, Hans Petter Selasky wrote: > On Wednesday 04 February 2009, Weongyo Jeong wrote: > > ????????bzero(desc, sizeof(struct uath_tx_desc)); > > ????????desc->msglen = htobe32(sizeof(struct uath_tx_desc)); > > -???????desc->msgid ?= data_idx + 1;????/* don't care about endianness */ > > +???????desc->msgid ?= (sc->sc_msgid++) + 1;????/* don't care about > > endianness */ desc->type ? = htobe32(WDCMSG_FLUSH); > > ????????desc->txqid ?= htobe32(0); > > ????????desc->connid = htobe32(0); > > Why not allocate an mbuf to hold the "descriptor" data. Then you use the > m_next field of the header mbuf to link with the "data" mbuf ? Then you only > need one [mbuf] queue for TX ? You can look at if_ural2.c and if_rum2.c > in /sys/dev/usb2/wlan . Because uath_data+uath_tx_desc is preallocated so you do not have to malloc in the TX path. Grabbing a mbuf could fail due to low memory. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090204160005.GB77595>