DragonFly kernel List (threaded) for 2008-08
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [netmp] socket accesses
:So, atomic or non-atomic op, if we race here, the mbufs can stay in the sockbuf
:for ever...
The current code does not clean out the sockbuf when setting
SS_CANTRCVMORE. I think data already queued stays in there until read
by userland or until the socket is closed. So it shouldn't matter if
an extra packet or two gets in there while the socket is still open.
:..
:> if (so->so_state & SS_CANTRCVMORE) {
:> soisdisconnected(so);
:> callout_reset(tp->tt_2msl, tcp_maxidle,
:> tcp_timer_2msl, tp);
:> }
:
:And if we race here, we'll never disconnect the socket.
:..
:Aggelos
This code looks like an optimization to me. It shouldn't matter whether
the conditional occurs or not. All it does is shortcut the FIN2 state
because there are no longer any readers that might need data received
during that state.
If it misses the case it would be as if the user shutdown a microsecond
after the remote end initiated a close sequence instead of a microsecond
before.
-Matt
Matthew Dillon
<dillon@backplane.com>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]