Re: ral(4) leaks mbufs instead of setting oactive

2016-02-29 Thread Richard Procter
On Thu, 11 Feb 2016, Richard Procter wrote: > [...] I found a benign off-by-one error in [my] code that left a > tx descriptor unused. [...] > > I've not tested this tweak as I'm unable to access the hardware for a few > weeks, unfortunately. Now tested, via concurrent $ cat /dev/zero | nc

Re: ral(4) leaks mbufs instead of setting oactive

2016-02-06 Thread Stefan Sperling
On Wed, Feb 03, 2016 at 04:41:34PM +1300, Richard Procter wrote: > > On Tue, 2 Feb 2016, Stefan Sperling wrote: > > > On Sat, Jan 30, 2016 at 10:49:38PM +1300, Richard Procter wrote: > > > - ring->queued--; > > > + atomic_dec_int(>queued); > > > > > - ring->queued +=

Re: ral(4) leaks mbufs instead of setting oactive

2016-02-02 Thread Stefan Sperling
On Sat, Jan 30, 2016 at 10:49:38PM +1300, Richard Procter wrote: > - ring->queued--; > + atomic_dec_int(>queued); > - ring->queued += ntxds; > + atomic_add_int(>queued, ntxds); I don't think these make a difference in the current way of things. Wireless drivers

Re: ral(4) leaks mbufs instead of setting oactive

2016-02-02 Thread Stefan Sperling
On Tue, Feb 02, 2016 at 09:14:06AM +0100, Stefan Sperling wrote: > On Sat, Jan 30, 2016 at 10:49:38PM +1300, Richard Procter wrote: > > + atomic_add_int(>queued, ntxds); > > + /* XXX card may interrupt here and invalidate this guard; the > > You can easily prevent the card from

Re: ral(4) leaks mbufs instead of setting oactive

2016-02-02 Thread Martin Pieuchot
On 02/02/16(Tue) 09:14, Stefan Sperling wrote: > On Sat, Jan 30, 2016 at 10:49:38PM +1300, Richard Procter wrote: > > - ring->queued--; > > + atomic_dec_int(>queued); > > > - ring->queued += ntxds; > > + atomic_add_int(>queued, ntxds); > > I don't think these make a

Re: ral(4) leaks mbufs instead of setting oactive

2016-02-02 Thread Richard Procter
On Tue, 2 Feb 2016, Stefan Sperling wrote: > > On Sat, Jan 30, 2016 at 10:49:38PM +1300, Richard Procter wrote: > > - ring->queued--; > > + atomic_dec_int(>queued); > > > - ring->queued += ntxds; > > + atomic_add_int(>queued, ntxds); > > I don't think these make a

ral(4) leaks mbufs instead of setting oactive

2016-02-01 Thread Richard Procter
>Synopsis: ral(4) leaks mbufs instead of setting oactive >Category: kernel >Environment: System : OpenBSD 5.9 Details : OpenBSD 5.9-beta (GENERIC) #1538: Sun Jan 31 20:01:47 MST 2016 dera...@i386.openbsd.org:/usr/src/sys/