Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Mar 2012 11:38:09 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org, freebsd-wireless@freebsd.org, Bernhard Schmidt <bschmidt@freebsd.org>
Subject:   Re: patches for if_iwi and wlan for WEP mode
Message-ID:  <CAJ-Vmok7gd9f5V1DaYfUPU4ic98TzPTvnJCjOqfV-y21V6xDyQ@mail.gmail.com>
In-Reply-To: <201203081043.44801.jhb@freebsd.org>
References:  <20120306.024212.108736612.iwasaki@jp.FreeBSD.org> <201203072017.44409.bschmidt@freebsd.org> <CAJ-Vmo=T4Muzsgafhfq2QLencWdr37-frpQeczn_U4wx5MhwxA@mail.gmail.com> <201203081043.44801.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8 March 2012 07:43, John Baldwin <jhb@freebsd.org> wrote:

> However, you could do that by having a net80211_ifattach() type thing tha=
t
> sets if_transmit and invokes the driver-provided if_start. =A0I don't thi=
nk
> wireless devices are using multiple transmit queues in such a way that
> if_transmit would be a benefit, and if_start is a simpler model.

THe problem is that the default if_transmit uses IFQ_ENQUEUE and the
_start() versions out there use IFQ_DEQUEUE without necessarily
handling fragments at all.

We end up having m->m_nextpkt NULL'ed upon IFQ_ENQUEUE, thus not only
making a fragment list entirely broken, the fragments themselves are
actually leaked. So we end up running out of mbufs.

The solution I can see working at the moment is creating if_transmit
for each wireless device and correctly handling any fragments in the
head mbuf before calling IFQ_DEQUEUE.


Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmok7gd9f5V1DaYfUPU4ic98TzPTvnJCjOqfV-y21V6xDyQ>