Andre Oppermann wrote:
Maxim Konovalov wrote:
On Tue, 29 Aug 2006, 17:15+0200, Andre Oppermann wrote:
John-Mark Gurney wrote:
Randall Stewart wrote this message on Mon, Aug 28, 2006 at 17:04 -0400:
atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 0) {
^
This should be 1 not 0.
Andre:
Without the "fix" SCTP leaks mbufs when
running netpipe.. for some reason my other
tests (utilites) do not do so.. but I think
it has to do with the back-and-forth nature
of netpipe.. it sends and then receives constantly
while most of the other things I play with have a
source and a sink.
Maxim Konovalov wrote:
On Tue, 29 Aug 2006, 17:15+0200, Andre Oppermann wrote:
John-Mark Gurney wrote:
Randall Stewart wrote this message on Mon, Aug 28, 2006 at 17:04 -0400:
atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 0) {
^
This should be 1 not 0.. as apparently fetchadd_int
On Tue, 29 Aug 2006, 17:15+0200, Andre Oppermann wrote:
> John-Mark Gurney wrote:
> > Randall Stewart wrote this message on Mon, Aug 28, 2006 at 17:04 -0400:
> > > atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 0) {
> > ^
> >
> > This should be 1 not 0.. as apparently fetchadd_int return
Randall Stewart wrote this message on Tue, Aug 29, 2006 at 10:18 -0400:
> Ok, I confirmed it...
>
> Changing it to be
>
> atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 1)
>
> Fixes the problem.. no more leaks :-D
And if you are curious XADD is:
The XADD (exchange and add) instruction swaps two o
John-Mark Gurney wrote:
Randall Stewart wrote this message on Mon, Aug 28, 2006 at 17:04 -0400:
atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 0) {
^
This should be 1 not 0.. as apparently fetchadd_int returns the old value
(at
John-Mark:
Ok, I confirmed it...
Changing it to be
atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 1)
Fixes the problem.. no more leaks :-D
R
John-Mark Gurney wrote:
Randall Stewart wrote this message on Mon, Aug 28, 2006 at 17:04 -0400:
atomic_fetchadd_int(m->m_ext.ref_cnt, -1)
John-Mark:
I had read that in the atomic_fetchadd_int() comments.. and
was wondering if that was the case.. I don't have an
X86 assembler reference.. so I did not bother to
see if the asm and comments were in sync... you
are right if this is true.. and I can surely make
SCTP have this occur.. not
Randall Stewart wrote this message on Mon, Aug 28, 2006 at 17:04 -0400:
> atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 0) {
^
This should be 1 not 0.. as apparently fetchadd_int returns the old value
(at least that's what atomic(9)
Hi all:
In 6.1 the function mb_free_ext(struct mbuf *m)
looked like this:
...
void
mb_free_ext(struct mbuf *m)
{
u_int cnt;
int dofree;
/* Account for lazy ref count assign. */
if (m->m_ext.ref_cnt == NULL)
10 matches
Mail list logo