Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/netinet/tcp_output.c

[BACK] Up to [FreeBSD] / src / sys / netinet

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.184.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (3 months ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.184.2.1: preferred, colored; next MAIN 1.185: preferred, colored
Changes since revision 1.184.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.187: download - view: text, markup, annotated - select for diffs
Wed Nov 2 20:58:47 2011 UTC (3 months, 1 week ago) by pluknet
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +1 -1 lines
SVN rev 227034 on 2011-11-02 20:58:47Z by pluknet

Restore sysctl names for tcp_sendspace/tcp_recvspace.

They seem to be changed unintentionally in r226437, and there were no
any mentions of renaming in commit log message.

Reported by:	Anton Yuzhaninov <citrin citrin ru>

Revision 1.186: download - view: text, markup, annotated - select for diffs
Sun Oct 16 20:18:39 2011 UTC (3 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +5 -0 lines
SVN rev 226448 on 2011-10-16 20:18:39Z by andre

Move the tcp_sendspace and tcp_recvspace sysctl's from
the middle of tcp_usrreq.c to the top of tcp_output.c
and tcp_input.c respectively next to the socket buffer
autosizing controls.

MFC after:	1 week

Revision 1.185: download - view: text, markup, annotated - select for diffs
Sun Oct 16 20:06:44 2011 UTC (3 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +0 -10 lines
SVN rev 226447 on 2011-10-16 20:06:44Z by andre

Remove the ss_fltsz and ss_fltsz_local sysctl's which have
long been superseded by the RFC3390 initial CWND sizing.

Also remove the remnants of TCP_METRICS_CWND which used the
TCP hostcache to set the initial CWND in a non-RFC compliant
way.

MFC after:	1 week

Revision 1.184.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.184: preferred, colored; next MAIN 1.185: preferred, colored
Changes since revision 1.184: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.184: download - view: text, markup, annotated - select for diffs
Thu Aug 25 09:20:13 2011 UTC (5 months, 2 weeks ago) by bz
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +1 -1 lines
SVN rev 225169 on 2011-08-25 09:20:13Z by bz

Increase the defaults for the maximum socket buffer limit,
and the maximum TCP send and receive buffer limits from 256kB
to 2MB.

For sb_max_adj we need to add the cast as already used in the sysctl
handler to not overflow the type doing the maths.

Note that this is just the defaults.  They will allow more memory
to be consumed per socket/connection if needed but not change the
default "idle" memory consumption.   All values are still tunable
by sysctls.

Suggested by:	gnn
Discussed on:	arch (Mar and Aug 2011)
MFC after:	3 weeks
Approved by:	re (kib)

Revision 1.183: download - view: text, markup, annotated - select for diffs
Tue Jul 5 18:49:55 2011 UTC (7 months, 1 week ago) by cperciva
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +1 -18 lines
SVN rev 223799 on 2011-07-05 18:49:55Z by cperciva

Remove #ifdef notyet code dating back to 4.3BSD Net/2 (and possibly earlier).

I think the benefit of making the code cleaner and easier to understand
outweighs the humour of leaving this intact (or possibly changing it to
#ifdef not_yet_and_probably_never).

MFC after:	2 weeks

Revision 1.141.2.19: download - view: text, markup, annotated - select for diffs
Mon Jun 20 18:08:52 2011 UTC (7 months, 3 weeks ago) by jhb
Branches: RELENG_7
Diff to: previous 1.141.2.18: preferred, colored; branchpoint 1.141: preferred, colored; next MAIN 1.142: preferred, colored
Changes since revision 1.141.2.18: +13 -6 lines
SVN rev 223344 on 2011-06-20 18:08:52Z by jhb

MFC 221346,223049:
Handle a rare edge case with nearly full TCP receive buffers.  If a TCP
buffer fills up causing the remote sender to enter into persist mode, but
there is still room available in the receive buffer when a window probe
arrives (either due to window scaling, or due to the local application
very slowing draining data from the receive buffer), then the single byte
of data in the window probe is accepted.  However, this can cause rcv_nxt
to be greater than rcv_adv.  This condition will only last until the next
ACK packet is pushed out via tcp_output(), and since the previous ACK
advertised a zero window, the ACK should be pushed out while the TCP
pcb is write-locked.  To guarantee this, advance the advertised window
(rcv_adv) even if we advertise a zero window.

During the window while rcv_nxt is greather than rcv_adv, a few places
would compute the remaining receive window via rcv_adv - rcv_nxt.
However, this value was then (uint32_t)-1.  On a 64 bit machine this
could expand to a positive 2^32 - 1 when cast to a long.  In particular,
when calculating the receive window in tcp_output(), the result would be
that the receive window was computed as 2^32 - 1 resulting in advertising
a far larger window to the remote peer than actually existed.

Fix various places that compute the remaining receive window to either
assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the
window as full if rcv_nxt is greather than rcv_adv.

Revision 1.164.2.13: download - view: text, markup, annotated - select for diffs
Mon Jun 20 18:08:34 2011 UTC (7 months, 3 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.164.2.12: preferred, colored; branchpoint 1.164: preferred, colored; next MAIN 1.165: preferred, colored
Changes since revision 1.164.2.12: +13 -6 lines
SVN rev 223343 on 2011-06-20 18:08:34Z by jhb

MFC 221346,223049:
Handle a rare edge case with nearly full TCP receive buffers.  If a TCP
buffer fills up causing the remote sender to enter into persist mode, but
there is still room available in the receive buffer when a window probe
arrives (either due to window scaling, or due to the local application
very slowing draining data from the receive buffer), then the single byte
of data in the window probe is accepted.  However, this can cause rcv_nxt
to be greater than rcv_adv.  This condition will only last until the next
ACK packet is pushed out via tcp_output(), and since the previous ACK
advertised a zero window, the ACK should be pushed out while the TCP
pcb is write-locked.  To guarantee this, advance the advertised window
(rcv_adv) even if we advertise a zero window.

During the window while rcv_nxt is greather than rcv_adv, a few places
would compute the remaining receive window via rcv_adv - rcv_nxt.
However, this value was then (uint32_t)-1.  On a 64 bit machine this
could expand to a positive 2^32 - 1 when cast to a long.  In particular,
when calculating the receive window in tcp_output(), the result would be
that the receive window was computed as 2^32 - 1 resulting in advertising
a far larger window to the remote peer than actually existed.

Fix various places that compute the remaining receive window to either
assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the
window as full if rcv_nxt is greather than rcv_adv.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Mon Jun 20 07:07:18 2011 UTC (7 months, 3 weeks ago) by bz
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +8 -1 lines
SVN rev 223326 on 2011-06-20 07:07:18Z by bz

Fix a KASSERT from r212803 to check the correct length also in case of
IPsec being compiled in and used.  Improve reporting by adding the length
fields to the panic message, so that we would have some immediate debugging
hints.

Discussed with:	jhb

Revision 1.181: download - view: text, markup, annotated - select for diffs
Mon Jun 13 15:38:31 2011 UTC (7 months, 4 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +1 -1 lines
SVN rev 223049 on 2011-06-13 15:38:31Z by jhb

Advance the advertised window (rcv_adv) to the currently received data
(rcv_nxt) if we advertising a zero window.  This can be true when ACK'ing
a window probe whose one byte payload was accepted rather than dropped
because the socket's receive buffer was not completely full, but the
remaining space was smaller than the window scale.

This ensures that window probe ACKs satisfy the assumption made in r221346
and closes a window where rcv_nxt could be greater than rcv_adv.

Tested by:	trasz, pho, trociny
Reviewed by:	silby
MFC after:	1 week

Revision 1.141.2.18: download - view: text, markup, annotated - select for diffs
Fri Jun 10 18:51:33 2011 UTC (8 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.141.2.17: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.17: +8 -0 lines
SVN rev 222937 on 2011-06-10 18:51:33Z by jhb

MFC 220794:
When checking to see if a window update should be sent to the remote peer,
don't force a window update if the window would not actually grow due to
window scaling.  Specifically, if the window scaling factor is larger than
2 * MSS, then after the local reader has drained 2 * MSS bytes from the
socket, a window update can end up advertising the same window.  If this
happens, the supposed window update actually ends up being a duplicate ACK.
This can result in an excessive number of duplicate ACKs when using a
higher maximum socket buffer size.

Revision 1.164.2.12: download - view: text, markup, annotated - select for diffs
Fri Jun 10 18:51:22 2011 UTC (8 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.164.2.11: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.11: +8 -0 lines
SVN rev 222936 on 2011-06-10 18:51:22Z by jhb

MFC 220794:
When checking to see if a window update should be sent to the remote peer,
don't force a window update if the window would not actually grow due to
window scaling.  Specifically, if the window scaling factor is larger than
2 * MSS, then after the local reader has drained 2 * MSS bytes from the
socket, a window update can end up advertising the same window.  If this
happens, the supposed window update actually ends up being a duplicate ACK.
This can result in an excessive number of duplicate ACKs when using a
higher maximum socket buffer size.

Revision 1.141.2.17: download - view: text, markup, annotated - select for diffs
Fri Jun 10 18:47:10 2011 UTC (8 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.141.2.16: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.16: +1 -0 lines
SVN rev 222935 on 2011-06-10 18:47:10Z by jhb

MFC 221209:
TCP reuses t_rxtshift to determine the backoff timer used for both the
persist state and the retransmit timer.  However, the code that implements
"bad retransmit recovery" only checks t_rxtshift to see if an ACK has been
received in during the first retransmit timeout window.  As a result, if
ticks has wrapped over to a negative value and a socket is in the persist
state, it can incorrectly treat an ACK from the remote peer as a
"bad retransmit recovery" and restore saved values such as snd_ssthresh and
snd_cwnd.  However, if the socket has never had a retransmit timeout, then
these saved values will be zero, so snd_ssthresh and snd_cwnd will be set
to 0.

If the socket is in fast recovery (this can be caused by excessive
duplicate ACKs such as those fixed by 220794), then each ACK that arrives
triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd
to be no larger than snd_ssthresh.  In effect, the socket's send window
is permamently stuck at 0 even though the remote peer is advertising a
much larger window and pending data is only sent via TCP window probes
(so one byte every few seconds).

Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that
the various snd_*_prev fields in the pcb are valid and only perform
"bad retransmit recovery" if this flag is set in the pcb.  The flag is set
on the first retransmit timeout that occurs and is cleared on subsequent
retransmit timeouts or when entering the persist state.

Revision 1.164.2.11: download - view: text, markup, annotated - select for diffs
Fri Jun 10 18:46:40 2011 UTC (8 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.164.2.10: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.10: +1 -0 lines
SVN rev 222934 on 2011-06-10 18:46:40Z by jhb

MFC 221209:
TCP reuses t_rxtshift to determine the backoff timer used for both the
persist state and the retransmit timer.  However, the code that implements
"bad retransmit recovery" only checks t_rxtshift to see if an ACK has been
received in during the first retransmit timeout window.  As a result, if
ticks has wrapped over to a negative value and a socket is in the persist
state, it can incorrectly treat an ACK from the remote peer as a
"bad retransmit recovery" and restore saved values such as snd_ssthresh and
snd_cwnd.  However, if the socket has never had a retransmit timeout, then
these saved values will be zero, so snd_ssthresh and snd_cwnd will be set
to 0.

If the socket is in fast recovery (this can be caused by excessive
duplicate ACKs such as those fixed by 220794), then each ACK that arrives
triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd
to be no larger than snd_ssthresh.  In effect, the socket's send window
is permamently stuck at 0 even though the remote peer is advertising a
much larger window and pending data is only sent via TCP window probes
(so one byte every few seconds).

Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that
the various snd_*_prev fields in the pcb are valid and only perform
"bad retransmit recovery" if this flag is set in the pcb.  The flag is set
on the first retransmit timeout that occurs and is cleared on subsequent
retransmit timeouts or when entering the persist state.

Revision 1.164.2.10: download - view: text, markup, annotated - select for diffs
Sat May 28 08:13:39 2011 UTC (8 months, 2 weeks ago) by lstewart
Branches: RELENG_8
Diff to: previous 1.164.2.9: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.9: +28 -0 lines
SVN rev 222408 on 2011-05-28 08:13:39Z by lstewart

MFC r216758,217252:

- Add some helper hook points to the TCP stack. The hooks allow Khelp modules to
  access inbound/outbound events and associated data for established TCP
  connections. The hooks only run if at least one hook function is registered
  for the hook point, ensuring the impact on the stack is effectively nil when
  no TCP Khelp modules are loaded. struct tcp_hhook_data is passed as contextual
  data to any registered Khelp module hook functions.

- Add an OSD (Object Specific Data) pointer to struct tcpcb to allow Khelp
  modules to associate per-connection data with the TCP control block.

- Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect
  to "struct tcpcb" by consuming some of the padding within the struct.

- Bump __FreeBSD_version to 802506.

In collaboration with:	David Hayes <dahayes at swin edu au> and
				Grenville Armitage <garmitage at swin edu au>
Sponsored by:	FreeBSD Foundation
Reviewed by:	bz, others along the way

Revision 1.164.2.9: download - view: text, markup, annotated - select for diffs
Sat May 28 04:40:35 2011 UTC (8 months, 2 weeks ago) by lstewart
Branches: RELENG_8
Diff to: previous 1.164.2.8: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.8: +19 -40 lines
SVN rev 222401 on 2011-05-28 04:40:35Z by lstewart

MFC r215166,215377,215391,215392,215393,215395,216101,216103,216105,216107,
    216749,216760,217748,218167:

- Add a KPI and supporting infrastructure to allow modular congestion control
  algorithms to be used in the net stack. Algorithms can maintain per-connection
  state if required, and connections maintain their own algorithm pointer, which
  allows different connections to concurrently use different algorithms. The
  TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to
  programmatically query or change the congestion control algorithm respectively
  from within an application at runtime.

- Integrate the framework with the TCP stack in as least intrusive a manner as
  possible. Care was also taken to develop the framework in a way that should
  allow integration with other congestion aware transport protocols (e.g.  SCTP)
  in the future. The hope is that we will one day be able to share a single set
  of congestion control algorithm modules between all congestion aware transport
  protocols.

- Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack
  and use it to decouple the meaning of recovery from a congestion event and
  recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based
  congestion control protocols don't generally need to recover from packet loss
  and need a different way to note a congestion recovery episode within the
  stack.

- Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code
  and ensures the stack always uses the appropriate mechanisms for recovering
  from packet loss during a congestion recovery episode.

- Extract the NewReno congestion control algorithm from the TCP stack and
  massage it into module form. NewReno is always built into the kernel and will
  remain the default algorithm for the forseeable future. Implementations of
  additional different algorithms will become available in the near future.

- Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect
  to "struct tcpcb" by consuming some of the padding within the struct.

- Bump __FreeBSD_version to 802504.

In collaboration with:	David Hayes <dahayes at swin edu au> and
				Grenville Armitage <garmitage at swin edu au>
Sponsored by:	Cisco URP, FreeBSD Foundation
Reviewed by:	rpaulo (r215166), bz (r215391,215395,216749,217748)
Tested by:	David Hayes (r215166), trociny (r215377,215391,215392,215395)

Revision 1.180: download - view: text, markup, annotated - select for diffs
Mon May 2 21:05:52 2011 UTC (9 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +12 -5 lines
SVN rev 221346 on 2011-05-02 21:05:52Z by jhb

Handle a rare edge case with nearly full TCP receive buffers.  If a TCP
buffer fills up causing the remote sender to enter into persist mode, but
there is still room available in the receive buffer when a window probe
arrives (either due to window scaling, or due to the local application
very slowing draining data from the receive buffer), then the single byte
of data in the window probe is accepted.  However, this can cause rcv_nxt
to be greater than rcv_adv.  This condition will only last until the next
ACK packet is pushed out via tcp_output(), and since the previous ACK
advertised a zero window, the ACK should be pushed out while the TCP
pcb is write-locked.

During the window while rcv_nxt is greather than rcv_adv, a few places
would compute the remaining receive window via rcv_adv - rcv_nxt.
However, this value was then (uint32_t)-1.  On a 64 bit machine this
could expand to a positive 2^32 - 1 when cast to a long.  In particular,
when calculating the receive window in tcp_output(), the result would be
that the receive window was computed as 2^32 - 1 resulting in advertising
a far larger window to the remote peer than actually existed.

Fix various places that compute the remaining receive window to either
assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the
window as full if rcv_nxt is greather than rcv_adv.

Reviewed by:	bz
MFC after:	1 month

Revision 1.179: download - view: text, markup, annotated - select for diffs
Sat Apr 30 11:21:29 2011 UTC (9 months, 1 week ago) by bz
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +10 -5 lines
SVN rev 221250 on 2011-04-30 11:21:29Z by bz

Make the TCP code compile without INET.  Sort #includes and add #ifdef INETs.
Add some comments at #endifs given more nestedness.  To make the compiler
happy, some default initializations were added in accordance with the style
on the files.

Reviewed by:	gnn
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	4 days

Revision 1.178: download - view: text, markup, annotated - select for diffs
Fri Apr 29 15:40:12 2011 UTC (9 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +1 -0 lines
SVN rev 221209 on 2011-04-29 15:40:12Z by jhb

TCP reuses t_rxtshift to determine the backoff timer used for both the
persist state and the retransmit timer.  However, the code that implements
"bad retransmit recovery" only checks t_rxtshift to see if an ACK has been
received in during the first retransmit timeout window.  As a result, if
ticks has wrapped over to a negative value and a socket is in the persist
state, it can incorrectly treat an ACK from the remote peer as a
"bad retransmit recovery" and restore saved values such as snd_ssthresh and
snd_cwnd.  However, if the socket has never had a retransmit timeout, then
these saved values will be zero, so snd_ssthresh and snd_cwnd will be set
to 0.

If the socket is in fast recovery (this can be caused by excessive
duplicate ACKs such as those fixed by 220794), then each ACK that arrives
triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd
to be no larger than snd_ssthresh.  In effect, the socket's send window
is permamently stuck at 0 even though the remote peer is advertising a
much larger window and pending data is only sent via TCP window probes
(so one byte every few seconds).

Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that
the various snd_*_prev fields in the pcb are valid and only perform
"bad retransmit recovery" if this flag is set in the pcb.  The flag is set
on the first retransmit timeout that occurs and is cleared on subsequent
retransmit timeouts or when entering the persist state.

Reviewed by:	bz
MFC after:	2 weeks

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Apr 18 17:43:16 2011 UTC (9 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +8 -0 lines
SVN rev 220794 on 2011-04-18 17:43:16Z by jhb

When checking to see if a window update should be sent to the remote peer,
don't force a window update if the window would not actually grow due to
window scaling.  Specifically, if the window scaling factor is larger than
2 * MSS, then after the local reader has drained 2 * MSS bytes from the
socket, a window update can end up advertising the same window.  If this
happens, the supposed window update actually ends up being a duplicate ACK.
This can result in an excessive number of duplicate ACKs when using a
higher maximum socket buffer size.

Reviewed by:	bz
MFC after:	1 month

Revision 1.164.2.8: download - view: text, markup, annotated - select for diffs
Tue Jan 4 18:27:00 2011 UTC (13 months ago) by gnn
Branches: RELENG_8
Diff to: previous 1.164.2.7: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.7: +4 -2 lines
SVN rev 216968 on 2011-01-04 18:27:00Z by gnn

MFC: 215434, 215724

Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).

Revision 1.176: download - view: text, markup, annotated - select for diffs
Tue Dec 28 12:13:30 2010 UTC (13 months, 1 week ago) by lstewart
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +28 -0 lines
SVN rev 216758 on 2010-12-28 12:13:30Z by lstewart

- Add some helper hook points to the TCP stack. The hooks allow Khelp modules to
  access inbound/outbound events and associated data for established TCP
  connections. The hooks only run if at least one hook function is registered
  for the hook point, ensuring the impact on the stack is effectively nil when
  no TCP Khelp modules are loaded. struct tcp_hhook_data is passed as contextual
  data to any registered Khelp module hook functions.

- Add an OSD (Object Specific Data) pointer to struct tcpcb to allow Khelp
  modules to associate per-connection data with the TCP control block.

- Bump __FreeBSD_version and add a note to UPDATING regarding to ABI changes
  introduced by this commit and r216753.

In collaboration with:	David Hayes <dahayes at swin edu au> and
				Grenville Armitage <garmitage at swin edu au>
Sponsored by:	FreeBSD Foundation
Reviewed by:	bz, others along the way
MFC after:	3 months

Revision 1.141.2.16.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.141.2.16: preferred, colored; next MAIN 1.141.2.17: preferred, colored
Changes since revision 1.141.2.16: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.164.2.7.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.164.2.7: preferred, colored; next MAIN 1.164.2.8: preferred, colored
Changes since revision 1.164.2.7: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.175: download - view: text, markup, annotated - select for diffs
Thu Dec 2 01:36:00 2010 UTC (14 months, 1 week ago) by lstewart
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +3 -32 lines
SVN rev 216105 on 2010-12-02 01:36:00Z by lstewart

- Reinstantiate the after_idle hook call in tcp_output(), which got lost
  somewhere along the way due to mismerging r211464 in our development tree.

- Capture the essence of r211464 in NewReno's after_idle() hook. We don't
  use V_ss_fltsz/V_ss_fltsz_local yet which needs to be revisited.

Sponsored by:	FreeBSD Foundation
Submitted by:	David Hayes <dahayes at swin edu au>
MFC after:	9 weeks
X-MFC with:	r215166

Revision 1.174: download - view: text, markup, annotated - select for diffs
Wed Nov 17 18:55:12 2010 UTC (14 months, 3 weeks ago) by gnn
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +4 -2 lines
SVN rev 215434 on 2010-11-17 18:55:12Z by gnn

Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).
MFC after:	2 weeks

Revision 1.173: download - view: text, markup, annotated - select for diffs
Fri Nov 12 06:41:55 2010 UTC (14 months, 4 weeks ago) by lstewart
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +16 -8 lines
SVN rev 215166 on 2010-11-12 06:41:55Z by lstewart

This commit marks the first formal contribution of the "Five New TCP Congestion
Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details
about the project are available at: http://caia.swin.edu.au/freebsd/5cc/

- Add a KPI and supporting infrastructure to allow modular congestion control
  algorithms to be used in the net stack. Algorithms can maintain per-connection
  state if required, and connections maintain their own algorithm pointer, which
  allows different connections to concurrently use different algorithms. The
  TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to
  programmatically query or change the congestion control algorithm respectively
  from within an application at runtime.

- Integrate the framework with the TCP stack in as least intrusive a manner as
  possible. Care was also taken to develop the framework in a way that should
  allow integration with other congestion aware transport protocols (e.g. SCTP)
  in the future. The hope is that we will one day be able to share a single set
  of congestion control algorithm modules between all congestion aware transport
  protocols.

- Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack
  and use it to decouple the meaning of recovery from a congestion event and
  recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based
  congestion control protocols don't generally need to recover from packet loss
  and need a different way to note a congestion recovery episode within the
  stack.

- Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code
  and ensures the stack always uses the appropriate mechanisms for recovering
  from packet loss during a congestion recovery episode.

- Extract the NewReno congestion control algorithm from the TCP stack and
  massage it into module form. NewReno is always built into the kernel and will
  remain the default algorithm for the forseeable future. Implementations of
  additional different algorithms will become available in the near future.

- Bump __FreeBSD_version to 900025 and note in UPDATING that rebuilding code
  that relies on the size of "struct tcpcb" is required.

Many thanks go to the Cisco University Research Program Fund at Community
Foundation Silicon Valley and the FreeBSD Foundation. Their support of our work
at the Centre for Advanced Internet Architectures, Swinburne University of
Technology is greatly appreciated.

In collaboration with:	David Hayes <dahayes at swin edu au> and
			Grenville Armitage <garmitage at swin edu au>
Sponsored by:	Cisco URP, FreeBSD Foundation
Reviewed by:	rpaulo
Tested by:	David Hayes (and many others over the years)
MFC after:	3 months

Revision 1.172: download - view: text, markup, annotated - select for diffs
Fri Sep 17 22:05:27 2010 UTC (16 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +49 -33 lines
SVN rev 212803 on 2010-09-17 22:05:27Z by andre

Rearrange the TSO code to make it more readable and to clearly
separate the decision logic, of whether we can do TSO, and the
calculation of the burst length into two distinct parts.

Change the way the TSO burst length calculation is done. While
TSO could do bursts of 65535 bytes that can't be represented in
ip_len together with the IP and TCP header. Account for that and
use IP_MAXPACKET instead of TCP_MAXWIN as base constant (both
have the same value of 64K). When more data is available prevent
less than MSS sized segments from being sent during the current
TSO burst.

Add two more KASSERTs to ensure the integrity of the packets.

Tested by:	Ben Wilber <ben-at-desync com>
MFC after:	10 days

Revision 1.171: download - view: text, markup, annotated - select for diffs
Thu Sep 16 21:06:45 2010 UTC (16 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +0 -1 lines
SVN rev 212765 on 2010-09-16 21:06:45Z by andre

Remove the TCP inflight bandwidth limiter as announced in r211315
to give way for the pluggable congestion control framework.  It is
the task of the congestion control algorithm to set the congestion
window and amount of inflight data without external interference.

In 'struct tcpcb' the variables previously used by the inflight
limiter are renamed to spares to keep the ABI intact and to have
some more space for future extensions.

In 'struct tcp_info' the variable 'tcpi_snd_bwnd' is not removed to
preserve the ABI.  It is always set to 0.

In siftr.c in 'struct pkt_node' the variable 'snd_bwnd' is not removed
to preserve the ABI.  It is always set to 0.

These unused variable in the various structures may be reused in the
future or garbage collected before the next release or at some other
point when an ABI change happens anyway for other reasons.

No MFC is planned.  The inflight bandwidth limiter stays disabled by
default in the other branches but remains available.

Revision 1.141.2.16: download - view: text, markup, annotated - select for diffs
Fri Aug 27 10:16:32 2010 UTC (17 months, 2 weeks ago) by andre
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.141.2.15: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.15: +26 -15 lines
SVN rev 211871 on 2010-08-27 10:16:32Z by andre

MFC r211464:

  If a TCP connection has been idle for one retransmit timeout or more
  it must reset its congestion window back to the initial window.

  RFC3390 has increased the initial window from 1 segment to up to
  4 segments.

  The initial window increase of RFC3390 wasn't reflected into the
  restart window which remained at its original defaults of 4 segments
  for local and 1 segment for all other connections.  Both values are
  controllable through sysctl net.inet.tcp.local_slowstart_flightsize
  and net.inet.tcp.slowstart_flightsize.

  The increase helps TCP's slow start algorithm to open up the congestion
  window much faster.

  Reviewed by:	lstewart
  MFC after:	1 week

Revision 1.164.2.7: download - view: text, markup, annotated - select for diffs
Fri Aug 27 10:15:45 2010 UTC (17 months, 2 weeks ago) by andre
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.164.2.6: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.6: +26 -15 lines
SVN rev 211870 on 2010-08-27 10:15:45Z by andre

MFC r211464:

  If a TCP connection has been idle for one retransmit timeout or more
  it must reset its congestion window back to the initial window.

  RFC3390 has increased the initial window from 1 segment to up to
  4 segments.

  The initial window increase of RFC3390 wasn't reflected into the
  restart window which remained at its original defaults of 4 segments
  for local and 1 segment for all other connections.  Both values are
  controllable through sysctl net.inet.tcp.local_slowstart_flightsize
  and net.inet.tcp.slowstart_flightsize.

  The increase helps TCP's slow start algorithm to open up the congestion
  window much faster.

  Reviewed by:	lstewart
  MFC after:	1 week

Revision 1.141.2.15: download - view: text, markup, annotated - select for diffs
Sun Aug 22 09:02:38 2010 UTC (17 months, 2 weeks ago) by andre
Branches: RELENG_7
Diff to: previous 1.141.2.14: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.14: +3 -1 lines
SVN rev 211603 on 2010-08-22 09:02:38Z by andre

MFC r211333:

  Fix the interaction between 'ICMP fragmentation needed' MTU updates,
  path MTU discovery and the tcp_minmss limiter for very small MTU's.

Revision 1.164.2.6: download - view: text, markup, annotated - select for diffs
Sun Aug 22 09:01:58 2010 UTC (17 months, 2 weeks ago) by andre
Branches: RELENG_8
Diff to: previous 1.164.2.5: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.5: +3 -1 lines
SVN rev 211602 on 2010-08-22 09:01:58Z by andre

MFC r211333:

  Fix the interaction between 'ICMP fragmentation needed' MTU updates,
  path MTU discovery and the tcp_minmss limiter for very small MTU's.

Revision 1.141.2.14: download - view: text, markup, annotated - select for diffs
Sat Aug 21 11:11:32 2010 UTC (17 months, 3 weeks ago) by andre
Branches: RELENG_7
Diff to: previous 1.141.2.13: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.13: +5 -2 lines
SVN rev 211549 on 2010-08-21 11:11:32Z by andre

MFC r211317:

  Reset the internal tso flag in tcp_output() on every iteration
  of sendalot.

Revision 1.164.2.5: download - view: text, markup, annotated - select for diffs
Sat Aug 21 11:10:58 2010 UTC (17 months, 3 weeks ago) by andre
Branches: RELENG_8
Diff to: previous 1.164.2.4: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.4: +5 -2 lines
SVN rev 211548 on 2010-08-21 11:10:58Z by andre

MFC r211317:

  Reset the internal tso flag in tcp_output() on every iteration
  of sendalot.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Aug 18 18:05:54 2010 UTC (17 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +26 -15 lines
SVN rev 211464 on 2010-08-18 18:05:54Z by andre

If a TCP connection has been idle for one retransmit timeout or more
it must reset its congestion window back to the initial window.

RFC3390 has increased the initial window from 1 segment to up to
4 segments.

The initial window increase of RFC3390 wasn't reflected into the
restart window which remained at its original defaults of 4 segments
for local and 1 segment for all other connections.  Both values are
controllable through sysctl net.inet.tcp.local_slowstart_flightsize
and net.inet.tcp.slowstart_flightsize.

The increase helps TCP's slow start algorithm to open up the congestion
window much faster.

Reviewed by:	lstewart
MFC after:	1 week

Revision 1.169: download - view: text, markup, annotated - select for diffs
Sun Aug 15 13:25:18 2010 UTC (17 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +3 -1 lines
SVN rev 211333 on 2010-08-15 13:25:18Z by andre

Fix the interaction between 'ICMP fragmentation needed' MTU updates,
path MTU discovery and the tcp_minmss limiter for very small MTU's.

When the MTU suggested by the gateway via ICMP, or if there isn't
any the next smaller step from ip_next_mtu(), is lower than the
floor enforced by net.inet.tcp.minmss (default 216) the value is
ignored and the default MSS (512) is used instead.  However the
DF flag in the IP header is still set in tcp_output() preventing
fragmentation by the gateway.

Fix this by using tcp_minmss as the MSS and clear the DF flag if
the suggested MTU is too low.  This turns off path MTU dissovery
for the remainder of the session and allows fragmentation to be
done by the gateway.

Only MTU's smaller than 256 are affected.  The smallest official
MTU specified is for AX.25 packet radio at 256 octets.

PR:		kern/146628
Tested by:	Matthew Luckie <mjl-at-luckie org nz>
MFC after:	1 week

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sat Aug 14 21:41:33 2010 UTC (17 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +5 -2 lines
SVN rev 211317 on 2010-08-14 21:41:33Z by andre

When using TSO and sending more than TCP_MAXWIN sendalot is set
and we loop back to 'again'.  If the remainder is less or equal
to one full segment, the TSO flag was not cleared even though
it isn't necessary anymore.  Enabling the TSO flag on a segment
that doesn't require any offloaded segmentation by the NIC may
cause confusion in the driver or hardware.

Reset the internal tso flag in tcp_output() on every iteration
of sendalot.

PR:		kern/132832
Submitted by:	Renaud Lienhart <renaud-at-vmware com>
MFC after:	1 week

Revision 1.164.2.4.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.164.2.4: preferred, colored; next MAIN 1.164.2.5: preferred, colored
Changes since revision 1.164.2.4: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.141.2.13: download - view: text, markup, annotated - select for diffs
Fri May 21 04:48:40 2010 UTC (20 months, 3 weeks ago) by ken
Branches: RELENG_7
Diff to: previous 1.141.2.12: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.12: +1 -1 lines
SVN rev 208368 on 2010-05-21 04:48:40Z by ken

MFC r206844:

Don't clear other flags (e.g. CSUM_TCP) when setting CSUM_TSO.  This was
causing TSO to break for the Xen netfront driver.

Reviewed by:  gibbs, rwatson

Revision 1.164.2.4: download - view: text, markup, annotated - select for diffs
Fri May 21 04:47:22 2010 UTC (20 months, 3 weeks ago) by ken
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.164.2.3: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.3: +1 -1 lines
SVN rev 208367 on 2010-05-21 04:47:22Z by ken

MFC r206844:

Don't clear other flags (e.g. CSUM_TCP) when setting CSUM_TSO.  This was
causing TSO to break for the Xen netfront driver.

Reviewed by:	gibbs, rwatson

Revision 1.164.2.3: download - view: text, markup, annotated - select for diffs
Thu May 6 06:44:19 2010 UTC (21 months ago) by bz
Branches: RELENG_8
Diff to: previous 1.164.2.2: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.2: +12 -9 lines
SVN rev 207695 on 2010-05-06 06:44:19Z by bz

MFC r207369:
  MFP4: @176978-176982, 176984, 176990-176994, 177441

  "Whitspace" churn after the VIMAGE/VNET whirls.

  Remove the need for some "init" functions within the network
  stack, like pim6_init(), icmp_init() or significantly shorten
  others like ip6_init() and nd6_init(), using static initialization
  again where possible and formerly missed.

  Move (most) variables back to the place they used to be before the
  container structs and VIMAGE_GLOABLS (before r185088) and try to
  reduce the diff to stable/7 and earlier as good as possible,
  to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.

  This also removes some header file pollution for putatively
  static global variables.

  Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
  no longer needed.

  Reviewed by:	jhb
  Discussed with:	rwatson
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	CK Software GmbH

Revision 1.167: download - view: text, markup, annotated - select for diffs
Thu Apr 29 11:52:42 2010 UTC (21 months, 1 week ago) by bz
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +12 -9 lines
SVN rev 207369 on 2010-04-29 11:52:42Z by bz

MFP4: @176978-176982, 176984, 176990-176994, 177441

"Whitspace" churn after the VIMAGE/VNET whirls.

Remove the need for some "init" functions within the network
stack, like pim6_init(), icmp_init() or significantly shorten
others like ip6_init() and nd6_init(), using static initialization
again where possible and formerly missed.

Move (most) variables back to the place they used to be before the
container structs and VIMAGE_GLOABLS (before r185088) and try to
reduce the diff to stable/7 and earlier as good as possible,
to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.

This also removes some header file pollution for putatively
static global variables.

Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
no longer needed.

Reviewed by:	jhb
Discussed with:	rwatson
Sponsored by:	The FreeBSD Foundation
Sponsored by:	CK Software GmbH
MFC after:	6 days

Revision 1.166: download - view: text, markup, annotated - select for diffs
Mon Apr 19 15:15:36 2010 UTC (21 months, 3 weeks ago) by ken
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +1 -1 lines
SVN rev 206844 on 2010-04-19 15:15:36Z by ken

Don't clear other flags (e.g. CSUM_TCP) when setting CSUM_TSO.  This was
causing TSO to break for the Xen netfront driver.

Reviewed by:	gibbs, rwatson
MFC after:	7 days

Revision 1.141.2.12.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.141.2.12: preferred, colored; next MAIN 1.141.2.13: preferred, colored
Changes since revision 1.141.2.12: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.112.2.4: download - view: text, markup, annotated - select for diffs
Tue Nov 17 16:18:03 2009 UTC (2 years, 2 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.112.2.3: preferred, colored; branchpoint 1.112: preferred, colored; next MAIN 1.113: preferred, colored
Changes since revision 1.112.2.3: +1 -1 lines
SVN rev 199403 on 2009-11-17 16:18:03Z by jhb

MFC 198990:
Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

Revision 1.141.2.12: download - view: text, markup, annotated - select for diffs
Tue Nov 17 16:17:39 2009 UTC (2 years, 2 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.141.2.11: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.11: +1 -1 lines
SVN rev 199401 on 2009-11-17 16:17:39Z by jhb

MFC 198990:
Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

Revision 1.164.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 17 16:17:11 2009 UTC (2 years, 2 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.164.2.1: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.1: +1 -1 lines
SVN rev 199400 on 2009-11-17 16:17:11Z by jhb

MFC 198990:
Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

Revision 1.165: download - view: text, markup, annotated - select for diffs
Fri Nov 6 16:55:05 2009 UTC (2 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +1 -1 lines
SVN rev 198990 on 2009-11-06 16:55:05Z by jhb

Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

Reviewed by:	bz
MFC after:	1 week

Revision 1.164.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.164.2.1: preferred, colored; next MAIN 1.164.2.2: preferred, colored
Changes since revision 1.164.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.141.2.11: download - view: text, markup, annotated - select for diffs
Tue Aug 25 11:44:17 2009 UTC (2 years, 5 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.141.2.10: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.10: +7 -1 lines
SVN rev 196537 on 2009-08-25 11:44:17Z by bz

MFC r182841:

  Add a second KASSERT checking for len >= 0 in the tcp output path.

  This is different to the first one (as len gets updated between those
  two) and would have caught various edge cases (read bugs) at a well
  defined place I had been debugging the last months instead of
  triggering (random) panics further down the call graph.

Revision 1.164.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.164: download - view: text, markup, annotated - select for diffs
Sat Aug 1 19:26:27 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +1 -1 lines
SVN rev 196019 on 2009-08-01 19:26:27Z by rwatson

Merge the remainder of kern_vimage.c and vimage.h into vnet.c and
vnet.h, we now use jails (rather than vimages) as the abstraction
for virtualization management, and what remained was specific to
virtual network stacks.  Minor cleanups are done in the process,
and comments updated to reflect these changes.

Reviewed by:	bz
Approved by:	re (vimage blanket)

Revision 1.163: download - view: text, markup, annotated - select for diffs
Tue Jul 14 22:48:30 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +36 -38 lines
SVN rev 195699 on 2009-07-14 22:48:30Z by rwatson

Build on Jeff Roberson's linker-set based dynamic per-CPU allocator
(DPCPU), as suggested by Peter Wemm, and implement a new per-virtual
network stack memory allocator.  Modify vnet to use the allocator
instead of monolithic global container structures (vinet, ...).  This
change solves many binary compatibility problems associated with
VIMAGE, and restores ELF symbols for virtualized global variables.

Each virtualized global variable exists as a "reference copy", and also
once per virtual network stack.  Virtualized global variables are
tagged at compile-time, placing the in a special linker set, which is
loaded into a contiguous region of kernel memory.  Virtualized global
variables in the base kernel are linked as normal, but those in modules
are copied and relocated to a reserved portion of the kernel's vnet
region with the help of a the kernel linker.

Virtualized global variables exist in per-vnet memory set up when the
network stack instance is created, and are initialized statically from
the reference copy.  Run-time access occurs via an accessor macro, which
converts from the current vnet and requested symbol to a per-vnet
address.  When "options VIMAGE" is not compiled into the kernel, normal
global ELF symbols will be used instead and indirection is avoided.

This change restores static initialization for network stack global
variables, restores support for non-global symbols and types, eliminates
the need for many subsystem constructors, eliminates large per-subsystem
structures that caused many binary compatibility issues both for
monitoring applications (netstat) and kernel modules, removes the
per-function INIT_VNET_*() macros throughout the stack, eliminates the
need for vnet_symmap ksym(2) munging, and eliminates duplicate
definitions of virtualized globals under VIMAGE_GLOBALS.

Bump __FreeBSD_version and update UPDATING.

Portions submitted by:  bz
Reviewed by:            bz, zec
Discussed with:         gnn, jamie, jeff, jhb, julian, sam
Suggested by:           peter
Approved by:            re (kensmith)

Revision 1.112.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 18 21:24:23 2009 UTC (2 years, 7 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.112.2.2: preferred, colored; branchpoint 1.112: preferred, colored
Changes since revision 1.112.2.2: +1 -1 lines
SVN rev 194463 on 2009-06-18 21:24:23Z by jhb

MFC: Fix overflow edge cases with comparing ticks to t_rcvtime including
fixing the TCP keepalive timer to work properly when ticks overflows from
INT_MAX to INT_MIN.  Note that to preserve the ABI this change just
downcasts t_rcvtime to an int when it is subtracted from ticks rather than
changing the type of t_rcvtime.

Revision 1.141.2.10: download - view: text, markup, annotated - select for diffs
Thu Jun 18 21:17:04 2009 UTC (2 years, 7 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.141.2.9: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.9: +1 -1 lines
SVN rev 194462 on 2009-06-18 21:17:04Z by jhb

MFC: Fix overflow edge cases with comparing ticks to t_rcvtime including
fixing the TCP keepalive timer to work properly when ticks overflows from
INT_MAX to INT_MIN.  Note that to preserve the ABI this change just
downcasts t_rcvtime to an int when it is subtracted from ticks rather than
changing the type of t_rcvtime.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Tue Jun 16 19:00:48 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +1 -1 lines
SVN rev 194305 on 2009-06-16 19:00:48Z by jhb

Trim extra sets of ()'s.

Requested by:	bde

Revision 1.161: download - view: text, markup, annotated - select for diffs
Fri Jun 5 14:55:22 2009 UTC (2 years, 8 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +0 -1 lines
SVN rev 193511 on 2009-06-05 14:55:22Z by rwatson

Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC
and used in a large number of files, but also because an increasing number
of incorrect uses of MAC calls were sneaking in due to copy-and-paste of
MAC-aware code without the associated opt_mac.h include.

Discussed with:	pjd

Revision 1.141.2.9.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.141.2.9: preferred, colored; next MAIN 1.141.2.10: preferred, colored
Changes since revision 1.141.2.9: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.160: download - view: text, markup, annotated - select for diffs
Sat Apr 11 22:07:19 2009 UTC (2 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +16 -16 lines
SVN rev 190948 on 2009-04-11 22:07:19Z by rwatson

Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and
TCPSTAT_INC(), rather than directly manipulating the fields across the
kernel.  This will make it easier to change the implementation of
these statistics, such as using per-CPU versions of the data structures.

MFC after:	3 days

Revision 1.141.2.9: download - view: text, markup, annotated - select for diffs
Sat Mar 21 12:02:11 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.141.2.8: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.8: +1 -1 lines
SVN rev 190198 on 2009-03-21 12:02:11Z by bz

MFC r185371:
  Replace most INP_CHECK_SOCKAF() uses checking if it is an
  IPv6 socket by comparing a constant inp vflag.
  This is expected to help to reduce extra locking.

Revision 1.141.2.8: download - view: text, markup, annotated - select for diffs
Tue Mar 17 20:59:45 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.141.2.7: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.7: +1 -8 lines
SVN rev 189938 on 2009-03-17 20:59:45Z by bz

MFC r183001:
  Implement IPv6 support for TCP MD5 Signature Option (RFC 2385)
  the same way it has been implemented for IPv4.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Tue Dec 2 21:37:28 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +2 -0 lines
SVN rev 185571 on 2008-12-02 21:37:28Z by bz

Rather than using hidden includes (with cicular dependencies),
directly include only the header files needed. This reduces the
unneeded spamming of various headers into lots of files.

For now, this leaves us with very few modules including vnet.h
and thus needing to depend on opt_route.h.

Reviewed by:	brooks, gnn, des, zec, imp
Sponsored by:	The FreeBSD Foundation

Revision 1.158: download - view: text, markup, annotated - select for diffs
Thu Nov 27 13:19:42 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +1 -1 lines
SVN rev 185371 on 2008-11-27 13:19:42Z by bz

Replace most INP_CHECK_SOCKAF() uses checking if it is an
IPv6 socket by comparing a constant inp vflag.
This is expected to help to reduce extra locking.

Suggested by:	rwatson
Reviewed by:	rwatson
MFC after:	6 weeks

Revision 1.141.2.7.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.141.2.7: preferred, colored; next MAIN 1.141.2.8: preferred, colored
Changes since revision 1.141.2.7: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.157: download - view: text, markup, annotated - select for diffs
Wed Nov 19 09:39:34 2008 UTC (3 years, 2 months ago) by zec
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +11 -8 lines
SVN rev 185088 on 2008-11-19 09:39:34Z by zec

Change the initialization methodology for global variables scheduled
for virtualization.

Instead of initializing the affected global variables at instatiation,
assign initial values to them in initializer functions.  As a rule,
initialization at instatiation for such variables should never be
introduced again from now on.  Furthermore, enclose all instantiations
of such global variables in #ifdef VIMAGE_GLOBALS blocks.

Essentialy, this change should have zero functional impact.  In the next
phase of merging network stack virtualization infrastructure from
p4/vimage branch, the new initialization methology will allow us to
switch between using global variables and their counterparts residing in
virtualization containers with minimum code churn, and in the long run
allow us to intialize multiple instances of such container structures.

Discussed at:	devsummit Strassburg
Reviewed by:	bz, julian
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation

Revision 1.156: download - view: text, markup, annotated - select for diffs
Thu Oct 2 15:37:58 2008 UTC (3 years, 4 months ago) by zec
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +23 -16 lines
SVN rev 183550 on 2008-10-02 15:37:58Z by zec

Step 1.5 of importing the network stack virtualization infrastructure
from the vimage project, as per plan established at devsummit 08/08:
http://wiki.freebsd.org/Image/Notes200808DevSummit

Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator
macros, and CURVNET_SET() context setting macros, all currently
resolving to NOPs.

Prepare for virtualization of selected SYSCTL objects by introducing a
family of SYSCTL_V_*() macros, currently resolving to their global
counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT().

Move selected #defines from sys/sys/vimage.h to newly introduced header
files specific to virtualized subsystems (sys/net/vnet.h,
sys/netinet/vinet.h etc.).

All the changes are verified to have zero functional impact at this
point in time by doing MD5 comparision between pre- and post-change
object files(*).

(*) netipsec/keysock.c did not validate depending on compile time options.

Implemented by:	julian, bz, brooks, zec
Reviewed by:	julian, bz, brooks, kris, rwatson, ...
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation

Revision 1.112.2.2.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.112.2.2: preferred, colored; next MAIN 1.112.2.3: preferred, colored
Changes since revision 1.112.2.2: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.155: download - view: text, markup, annotated - select for diffs
Sat Sep 13 17:26:46 2008 UTC (3 years, 4 months ago) by bz
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +1 -8 lines
SVN rev 183001 on 2008-09-13 17:26:46Z by bz

Implement IPv6 support for TCP MD5 Signature Option (RFC 2385)
the same way it has been implemented for IPv4.

Reviewed by:	bms (skimmed)
Tested by:	Nick Hilliard (nick netability.ie) (with more changes)
MFC after:	2 months

Revision 1.154: download - view: text, markup, annotated - select for diffs
Sun Sep 7 11:38:30 2008 UTC (3 years, 5 months ago) by bz
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +7 -1 lines
SVN rev 182841 on 2008-09-07 11:38:30Z by bz

Add a second KASSERT checking for len >= 0 in the tcp output path.

This is different to the first one (as len gets updated between those
two) and would have caught various edge cases (read bugs) at a well
defined place I had been debugging the last months instead of
triggering (random) panics further down the call graph.

MFC after:	2 months

Revision 1.141.2.7: download - view: text, markup, annotated - select for diffs
Mon Aug 18 08:11:48 2008 UTC (3 years, 5 months ago) by rwatson
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.141.2.6: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.6: +1 -1 lines
SVN rev 181822 on 2008-08-18 08:11:48Z by rwatson

Merge r178285, r178318, r178319, r178320, r178321, r178322, r178325,
r178376, r178377, r178378, r178419, r179412, r179414, r180127, r180338,
r180343, r180344, r180346, r180348, r180368, r180422, r180429, r180536,
r180558, r180589, r181364, r181365 from head to stable/7:

Introduce and use rwlocks throughout the inpcbinfo and inpcb infrastructure,
and protocols that depend on that infrastructure, including UDP, TCP, and
IP raw sockets.  Significant parts of this work were reviewed by Bjoern Zeeb,
and tested by Paul Saab, Kris Keneway, and George Neville-Neil, whose
contributions to this work are greatly appreciated.

Tested by:      ps, kris, gnn, Mike Tancsa <mike at sentex dot net>
Reviewed by:    bz, des

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun Aug 17 23:27:27 2008 UTC (3 years, 5 months ago) by bz
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +28 -27 lines
SVN rev 181803 on 2008-08-17 23:27:27Z by bz

Commit step 1 of the vimage project, (network stack)
virtualization work done by Marko Zec (zec@).

This is the first in a series of commits over the course
of the next few weeks.

Mark all uses of global variables to be virtualized
with a V_ prefix.
Use macros to map them back to their global names for
now, so this is a NOP change only.

We hope to have caught at least 85-90% of what is needed
so we do not invalidate a lot of outstanding patches again.

Obtained from:	//depot/projects/vimage-commit2/...
Reviewed by:	brooks, des, ed, mav, julian,
		jamie, kris, rwatson, zec, ...
		(various people I forgot, different versions)
		md5 (with a bit of help)
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
X-MFC after:	never
V_Commit_Message_Reviewed_By:	more people than the patch

Revision 1.152: download - view: text, markup, annotated - select for diffs
Thu Jul 31 15:10:09 2008 UTC (3 years, 6 months ago) by rpaulo
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +43 -0 lines
SVN rev 181056 on 2008-07-31 15:10:09Z by rpaulo

MFp4 (//depot/projects/tcpecn/):

  TCP ECN support. Merge of my GSoC 2006 work for NetBSD.
  TCP ECN is defined in RFC 3168.

Partly reviewed by:	dwmalone, silby
Obtained from:		NetBSD

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue Jul 15 10:32:35 2008 UTC (3 years, 6 months ago) by rpaulo
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +1 -1 lines
SVN rev 180535 on 2008-07-15 10:32:35Z by rpaulo

Fix commment in typo.

M    tcp_output.c

Revision 1.141.2.3.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 19 06:36:10 2008 UTC (3 years, 7 months ago) by cperciva
Branches: RELENG_7_0
Diff to: previous 1.141.2.3: preferred, colored; next MAIN 1.141.2.4: preferred, colored
Changes since revision 1.141.2.3: +19 -3 lines
SVN rev 179871 on 2008-06-19 06:36:10Z by cperciva

Fix errors in the padding of TCP options.

Errata:		FreeBSD-EN-08:02.tcp
Approved by:	so (cperciva)

Revision 1.141.2.6: download - view: text, markup, annotated - select for diffs
Mon May 5 20:59:35 2008 UTC (3 years, 9 months ago) by andre
Branches: RELENG_7
Diff to: previous 1.141.2.5: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.5: +2 -4 lines
MFC of tcp_output.c rev. 1.147+1.148 and tcp.h rev. 1.42:

  Use #defines for TCP options padding after EOL to be consistent.
  Remove now unnecessary comment.

Revision 1.141.2.5: download - view: text, markup, annotated - select for diffs
Mon May 5 20:46:39 2008 UTC (3 years, 9 months ago) by andre
Branches: RELENG_7
Diff to: previous 1.141.2.4: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.4: +11 -1 lines
MFC rev. 1.149: Remove TCP options ordering assumptions in tcp_addoptions().

Revision 1.150: download - view: text, markup, annotated - select for diffs
Thu Apr 17 21:38:16 2008 UTC (3 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +1 -1 lines
Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to
explicitly select write locking for all use of the inpcb mutex.
Update some pcbinfo lock assertions to assert locked rather than
write-locked, although in practice almost all uses of the pcbinfo
rwlock main exclusive, and all instances of inpcb lock acquisition
are exclusive.

This change should introduce (ideally) little functional change.
However, it lays the groundwork for significantly increased
parallelism in the TCP/IP code.

MFC after:	3 months
Tested by:	kris (superset of committered patch)

Revision 1.149: download - view: text, markup, annotated - select for diffs
Mon Apr 7 19:09:23 2008 UTC (3 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +11 -1 lines
Remove TCP options ordering assumptions in tcp_addoptions().  Ordering
was changed in rev. 1.161 of tcp_var.h.  All option now test for sufficient
space in TCP header before getting added.

Reported by:	Mark Atkinson <atkin901-at-yahoo.com>
Tested by:	Mark Atkinson <atkin901-at-yahoo.com>
MFC after:	1 week

Revision 1.148: download - view: text, markup, annotated - select for diffs
Mon Apr 7 18:50:05 2008 UTC (3 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +0 -2 lines
Remove now unnecessary comment.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Mon Apr 7 18:43:59 2008 UTC (3 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +2 -2 lines
Use #defines for TCP options padding after EOL to be consistent.

Reviewed by:	bz

Revision 1.141.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 13 10:09:12 2008 UTC (3 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.141.2.3: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.3: +10 -2 lines
MFC rev. 1.146 tcp_output.c

  Padding after EOL option must be zeros according to RFC793 but
  the NOPs used are 0x01.
  While we could simply pad with EOLs (which are 0x00), rather use an
  explicit 0x00 constant there to not confuse poeple with 'EOL padding'.
  Put in a comment saying just that.

Early MFC requested by:	silby
			because of more people reporting problems on net@

Revision 1.146: download - view: text, markup, annotated - select for diffs
Sun Mar 9 13:26:50 2008 UTC (3 years, 11 months ago) by bz
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +10 -2 lines
Padding after EOL option must be zeros according to RFC793 but
the NOPs used are 0x01.
While we could simply pad with EOLs (which are 0x00), rather use an
explicit 0x00 constant there to not confuse poeple with 'EOL padding'.
Put in a comment saying just that.

Problem discussed on:	src-committers with andre, silby, dwhite as
			follow up to the rev. 1.161 commit of tcp_var.h.
MFC after:		11 days

Revision 1.141.2.3: download - view: text, markup, annotated - select for diffs
Wed Dec 5 10:37:17 2007 UTC (4 years, 2 months ago) by bz
Branches: RELENG_7
CVS tags: RELENG_7_0_BP, RELENG_7_0_0_RELEASE
Branch point for: RELENG_7_0
Diff to: previous 1.141.2.2: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.2: +16 -3 lines
MFC: rev. 1.143 sys/netinet/tcp_output.c

    Make TSO work with IPSEC compiled into the kernel.

    The lookup hurts a bit for connections but had been there anyway
    if IPSEC was compiled in. So moving the lookup up a bit gives us
    TSO support at not extra cost.

Approved by:    re (kensmith)

Revision 1.141.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 2 10:32:49 2007 UTC (4 years, 2 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.141.2.1: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.1: +3 -8 lines
MFC: rev. 1.303 sys/netinet/tcp_subr.c [1]
     rev. 1.135 sys/netinet/tcp_syncache.c
     rev. 1.145 sys/netinet/tcp_output.c

   Unbreak TCP-MD5 signature calculations.

   Submitted by:   Nick Hilliard (see net@) [1]
   Tested by:      Nick Hilliard (see net@)
   Tested by:      tools/regression/netinet/tcpconnect

Approved by:	re (kensmith)

Revision 1.141.2.1: download - view: text, markup, annotated - select for diffs
Sun Dec 2 10:17:30 2007 UTC (4 years, 2 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +1 -1 lines
MFC: rev. 1.144 sys/netinet/tcp_output.c
   Let opt be an array.  Though &opt[0] == opt == &opt, &opt is highly
   confusing and hard to understand so change it to just opt and
   remove the extra cast no longer/not needed.

Approved by:	re (kensmith)

Revision 1.145: download - view: text, markup, annotated - select for diffs
Fri Nov 30 23:46:51 2007 UTC (4 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +3 -8 lines
Centralize and correct computation of TCP-MD5 signature offset within
the packet (tcp header options field).

Reviewed by:	tools/regression/netinet/tcpconnect
MFC after:	3 days
Tested by:	Nick Hilliard (see net@)

Revision 1.144: download - view: text, markup, annotated - select for diffs
Wed Nov 28 13:33:27 2007 UTC (4 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +1 -1 lines
Let opt be an array.  Though &opt[0] == opt == &opt, &opt is highly
confusing and hard to understand so change it to just opt and
remove the extra cast no longer/not needed.

Discussed with: rwatson
MFC after:      3 days

Revision 1.143: download - view: text, markup, annotated - select for diffs
Wed Nov 21 22:30:14 2007 UTC (4 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +16 -3 lines
Make TSO work with IPSEC compiled into the kernel.

The lookup hurts a bit for connections but had been there anyway
if IPSEC was compiled in. So moving the lookup up a bit gives us
TSO support at not extra cost.

PR:		kern/115586
Tested by:	gallatin
Discussed with:	kmacy
MFC after:	2 months

Revision 1.142: download - view: text, markup, annotated - select for diffs
Wed Oct 24 19:03:59 2007 UTC (4 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +1 -1 lines
Merge first in a series of TrustedBSD MAC Framework KPI changes
from Mac OS X Leopard--rationalize naming for entry points to
the following general forms:

  mac_<object>_<method/action>
  mac_<object>_check_<method/action>

The previous naming scheme was inconsistent and mostly
reversed from the new scheme.  Also, make object types more
consistent and remove spaces from object types that contain
multiple parts ("posix_sem" -> "posixsem") to make mechanical
parsing easier.  Introduce a new "netinet" object type for
certain IPv4/IPv6-related methods.  Also simplify, slightly,
some entry point names.

All MAC policy modules will need to be recompiled, and modules
not updates as part of this commit will need to be modified to
conform to the new KPI.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer

Revision 1.141: download - view: text, markup, annotated - select for diffs
Sun Oct 7 20:44:24 2007 UTC (4 years, 4 months ago) by silby
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +3 -1 lines
Add FBSDID to all files in netinet so that people can more
easily include file version information in bug reports.

Approved by:	re (kensmith)

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue Jul 3 12:13:43 2007 UTC (4 years, 7 months ago) by gnn
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +3 -3 lines
Commit the change from FAST_IPSEC to IPSEC.  The FAST_IPSEC
option is now deprecated, as well as the KAME IPsec code.
What was FAST_IPSEC is now IPSEC.

Approved by: re
Sponsored by: Secure Computing

Revision 1.139: download - view: text, markup, annotated - select for diffs
Sun Jul 1 11:38:27 2007 UTC (4 years, 7 months ago) by gnn
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +1 -6 lines
Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes only the kernel files, the rest of the files
will follow in a second commit.

Reviewed by:    bz
Approved by:    re
Supported by:   Secure Computing

Revision 1.138: download - view: text, markup, annotated - select for diffs
Sat Jun 9 21:19:12 2007 UTC (4 years, 8 months ago) by andre
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +10 -4 lines
Make the handling of the tcp window explicit for the SYN_SENT case
in tcp_outout().  This is currently not strictly necessary but paves
the way to simplify the entire SYN options handling quite a bit.
Clarify comment.  No change in effective behavour with this commit.

RFC1323 requires the window field in a SYN (i.e., a <SYN> or
<SYN,ACK>) segment itself never be scaled.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Sat Jun 9 19:39:14 2007 UTC (4 years, 8 months ago) by andre
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +4 -1 lines
Don't send pure window updates when the peer has closed the connection
and won't ever send more data.

Revision 1.112.2.2: download - view: text, markup, annotated - select for diffs
Fri May 25 16:36:39 2007 UTC (4 years, 8 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Branch point for: RELENG_6_4
Diff to: previous 1.112.2.1: preferred, colored; branchpoint 1.112: preferred, colored
Changes since revision 1.112.2.1: +1 -1 lines
MFC: Fix statistical accounting for bytes and packets during sack
retransmits.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Fri May 18 19:56:24 2007 UTC (4 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +1 -1 lines
Fix statistical accounting for bytes and packets during sack retransmits.

MFC after:	1 week
Submitted by:	mohans

Revision 1.135: download - view: text, markup, annotated - select for diffs
Thu May 10 23:11:29 2007 UTC (4 years, 9 months ago) by andre
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +1 -1 lines
Fix an incorrect replace of a timer reference made during the TCP timer
rewrite in rev. 1.132.  This unmasked yet another bug that causes certain
connections to get indefinately stuck in LAST_ACK state.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sun May 6 15:56:31 2007 UTC (4 years, 9 months ago) by andre
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +6 -4 lines
Use existing TF_SACK_PERMIT flag in struct tcpcb t_flags field instead of
a decdicated sack_enable int for this bool.  Change all users accordingly.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Fri Apr 20 15:08:09 2007 UTC (4 years, 9 months ago) by andre
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +4 -4 lines
o Remove unused and redundant TCP option definitions
o Replace usage of MAX_TCPOPTLEN with the correctly constructed and
  derived MAX_TCPOPTLEN

Revision 1.132: download - view: text, markup, annotated - select for diffs
Wed Apr 11 09:45:16 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +25 -28 lines
Change the TCP timer system from using the callout system five times
directly to a merged model where only one callout, the next to fire,
is registered.

Instead of callout_reset(9) and callout_stop(9) the new function
tcp_timer_activate() is used which then internally manages the callout.

The single new callout is a mutex callout on inpcb simplifying the
locking a bit.

tcp_timer() is the called function which handles all race conditions
in one place and then dispatches the individual timer functions.

Reviewed by:	rwatson (earlier version)

Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Apr 4 14:44:15 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +0 -1 lines
Retire unused TCP_SACK_DEBUG.

Revision 1.112.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 22 10:55:13 2007 UTC (4 years, 10 months ago) by glebius
Branches: RELENG_6
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +24 -26 lines
Carefully merge revs 1.123, 1.124, omitting the 1.120 change. This
should fix resets of the long living TCP connections with
EHOSTDOWN message.

PR:		100172
Submitted by:	"Andrew - Supernews" <andrew supernews.net>

Revision 1.130: download - view: text, markup, annotated - select for diffs
Wed Mar 21 19:37:55 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +1 -2 lines
ANSIfy function declarations and remove register keywords for variables.
Consistently apply style to all function declarations.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Mar 21 19:04:07 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +1 -1 lines
Subtract optlen in the maximum length check for TSO and finally avoid
slightly oversized TSO mbuf chains.

Submitted by:	kmacy

Revision 1.128: download - view: text, markup, annotated - select for diffs
Mon Mar 19 18:42:27 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +2 -2 lines
Match up SYSCTL_INT declarations in style.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Mar 19 18:35:13 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +13 -3 lines
Maintain a pointer and offset pair into the socket buffer mbuf chain to
avoid traversal of the entire socket buffer for larger offsets on stream
sockets.

Adjust tcp_output() make use of it.

Tested by:	gallatin

Revision 1.126: download - view: text, markup, annotated - select for diffs
Thu Mar 15 15:59:28 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +199 -146 lines
Consolidate insertion of TCP options into a segment from within tcp_output()
and syncache_respond() into its own generic function tcp_addoptions().

tcp_addoptions() is alignment agnostic and does optimal packing in all cases.

In struct tcpopt rename to_requested_s_scale to just to_wscale.

Add a comment with quote from RFC1323: "The Window field in a SYN (i.e.,
a <SYN> or <SYN,ACK>) segment itself is never scaled."

Reviewed by:	silby, mohans, julian
Sponsored by:	TCP/IP Optimization Fundraise 2005

Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Mar 1 13:12:09 2007 UTC (4 years, 11 months ago) by andre
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +3 -2 lines
Prevent TSO mbuf chain from overflowing a few bytes by subtracting the
TCP options size before the TSO total length calculation.

Bug found by:	kmacy

Revision 1.124: download - view: text, markup, annotated - select for diffs
Wed Feb 28 12:47:49 2007 UTC (4 years, 11 months ago) by glebius
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -0 lines
Add EHOSTDOWN and ENETUNREACH to the list of soft errors, that shouldn't
be returned up to the caller.

PR:		100172
Submitted by:	"Andrew - Supernews" <andrew supernews.net>
Reviewed by:	rwatson, bms

Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Feb 28 12:41:49 2007 UTC (4 years, 11 months ago) by glebius
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +26 -30 lines
Toss the code, that handles errors from ip_output(), to make it more
readable:
- Merge two embedded if() into one.
- Introduce switch() block to handle different kinds of errors.

Reviewed by:	rwatson, bms

Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Feb 1 18:32:13 2007 UTC (5 years ago) by andre
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +70 -4 lines
Auto sizing TCP socket buffers.

Normally the socket buffers are static (either derived from global
defaults or set with setsockopt) and do not adapt to real network
conditions. Two things happen: a) your socket buffers are too small
and you can't reach the full potential of the network between both
hosts; b) your socket buffers are too big and you waste a lot of
kernel memory for data just sitting around.

With automatic TCP send and receive socket buffers we can start with a
small buffer and quickly grow it in parallel with the TCP congestion
window to match real network conditions.

FreeBSD has a default 32K send socket buffer. This supports a maximal
transfer rate of only slightly more than 2Mbit/s on a 100ms RTT
trans-continental link. Or at 200ms just above 1Mbit/s. With TCP send
buffer auto scaling and the default values below it supports 20Mbit/s
at 100ms and 10Mbit/s at 200ms. That's an improvement of factor 10, or
1000%. For the receive side it looks slightly better with a default of
64K buffer size.

New sysctls are:
  net.inet.tcp.sendbuf_auto=1 (enabled)
  net.inet.tcp.sendbuf_inc=8192 (8K, step size)
  net.inet.tcp.sendbuf_max=262144 (256K, growth limit)
  net.inet.tcp.recvbuf_auto=1 (enabled)
  net.inet.tcp.recvbuf_inc=16384 (16K, step size)
  net.inet.tcp.recvbuf_max=262144 (256K, growth limit)

Tested by:	many (on HEAD and RELENG_6)
Approved by:	re
MFC after:	1 month

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun Oct 22 11:52:16 2006 UTC (5 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -1 lines
Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h
begun with a repo-copy of mac.h to mac_framework.h.  sys/mac.h now
contains the userspace and user<->kernel API and definitions, with all
in-kernel interfaces moved to mac_framework.h, which is now included
across most of the kernel instead.

This change is the first step in a larger cleanup and sweep of MAC
Framework interfaces in the kernel, and will not be MFC'd.

Obtained from:	TrustedBSD Project
Sponsored by:	SPARTA

Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Sep 28 18:02:46 2006 UTC (5 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +15 -2 lines
When tcp_output() receives an error upon sending a packet it reverts parts
of its internal state to ignore the failed send and try again a bit later.
If the error is EPERM the packet got blocked by the local firewall and the
revert may cause the session to get stuck and retry indefinitely.  This way
we treat it like a packet loss and let the retransmit timer and timeouts
do their work over time.

The correct behavior is to drop a connection that gets an EPERM error.
However this _may_ introduce some POLA problems and a two commit approach
was chosen.

Discussed with:	glebius
PR:		kern/25986
PR:		kern/102653

Revision 1.119: download - view: text, markup, annotated - select for diffs
Thu Sep 28 13:59:26 2006 UTC (5 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +1 -1 lines
When doing TSO correctly do the check to prevent a maximum sized IP packet
from overflowing.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Fri Sep 15 16:08:09 2006 UTC (5 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +7 -5 lines
When doing TSO subtract hdrlen from TCP_MAXWIN to prevent ip->ip_len
from wrapping when we generate a maximally sized packet for later
segmentation.

Noticed by:	gallatin
Sponsored by:	TCP/IP Optimization Fundraise 2005

Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed Sep 13 13:08:27 2006 UTC (5 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +1 -1 lines
Rewrite of TCP syncookies to remove locking requirements and to enhance
functionality:

 - Remove a rwlock aquisition/release per generated syncookie.  Locking
   is now integrated with the bucket row locking of syncache itself and
   syncookies no longer add any additional lock overhead.
 - Syncookie secrets are different for and stored per syncache buck row.
   Secrets expire after 16 seconds and are reseeded on-demand.
 - The computational overhead for syncookie generation and verification
   is one MD5 hash computation as before.
 - Syncache can be turned off and run with syncookies only by setting the
   sysctl net.inet.tcp.syncookies_only=1.

This implementation extends the orginal idea and first implementation
of FreeBSD by using not only the initial sequence number field to store
information but also the timestamp field if present.  This way we can
keep track of the entire state we need to know to recreate the session in
its original form.  Almost all TCP speakers implement RFC1323 timestamps
these days.  For those that do not we still have to live with the known
shortcomings of the ISN only SYN cookies.  The use of the timestamp field
causes the timestamps to be randomized if syncookies are enabled.

The idea of SYN cookies is to encode and include all necessary information
about the connection setup state within the SYN-ACK we send back and thus
to get along without keeping any local state until the ACK to the SYN-ACK
arrives (if ever).  Everything we need to know should be available from
the information we encoded in the SYN-ACK.

A detailed description of the inner working of the syncookies mechanism
is included in the comments in tcp_syncache.c.

Reviewed by:	silby (slightly earlier version)
Sponsored by:	TCP/IP Optimization Fundraise 2005

Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Sep 7 12:53:01 2006 UTC (5 years, 5 months ago) by andre
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +73 -15 lines
Second step of TSO (TCP segmentation offload) support in our network stack.

TSO is only used if we are in a pure bulk sending state.  The presence of
TCP-MD5, SACK retransmits, SACK advertizements, IPSEC and IP options prevent
using TSO.  With TSO the TCP header is the same (except for the sequence number)
for all generated packets.  This makes it impossible to transmit any options
which vary per generated segment or packet.

The length of TSO bursts is limited to TCP_MAXWIN.

The sysctl net.inet.tcp.tso globally controls the use of TSO and is enabled.

TSO enabled sends originating from tcp_output() have the CSUM_TCP and CSUM_TSO
flags set, m_pkthdr.csum_data filled with the header pseudo-checksum and
m_pkthdr.tso_segsz set to the segment size (net payload size, not counting
IP+TCP headers or TCP options).

IPv6 currently lacks a pseudo-header checksum function and thus doesn't support
TSO yet.

Tested by:	Jack Vogel <jfvogel-at-gmail.com>
Sponsored by:	TCP/IP Optimization Fundraise 2005

Revision 1.115: download - view: text, markup, annotated - select for diffs
Thu Feb 23 21:14:34 2006 UTC (5 years, 11 months ago) by qingli
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +2 -1 lines
This patch fixes the problem where the current TCP code can not handle
simultaneous open. Both the bug and the patch were verified using the
ANVL test suite.

PR:		kern/74935
Submitted by:	qingli (before I became committer)
Reviewed by:	andre
MFC after:	5 days

Revision 1.114: download - view: text, markup, annotated - select for diffs
Fri Nov 18 20:12:39 2005 UTC (6 years, 2 months ago) by andre
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +1 -0 lines
Consolidate all IP Options handling functions into ip_options.[ch] and
include ip_options.h into all files making use of IP Options functions.

From ip_input.c rev 1.306:
  ip_dooptions(struct mbuf *m, int pass)
  save_rte(m, option, dst)
  ip_srcroute(m0)
  ip_stripoptions(m, mopt)

From ip_output.c rev 1.249:
  ip_insertoptions(m, opt, phlen)
  ip_optcopy(ip, jp)
  ip_pcbopts(struct inpcb *inp, int optname, struct mbuf *m)

No functional changes in this commit.

Discussed with:	rwatson
Sponsored by:	TCP/IP Optimization Fundraise 2005

Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Nov 2 13:46:31 2005 UTC (6 years, 3 months ago) by andre
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +2 -2 lines
Retire MT_HEADER mbuf type and change its users to use MT_DATA.

Having an additional MT_HEADER mbuf type is superfluous and redundant
as nothing depends on it.  It only adds a layer of confusion.  The
distinction between header mbuf's and data mbuf's is solely done
through the m->m_flags M_PKTHDR flag.

Non-native code is not changed in this commit.  For compatibility
MT_HEADER is mapped to MT_DATA.

Sponsored by:	TCP/IP Optimization Fundraise 2005

Revision 1.112: download - view: text, markup, annotated - select for diffs
Sat May 21 00:38:29 2005 UTC (6 years, 8 months ago) by ps
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +8 -6 lines
Replace t_force with a t_flag (TF_FORCEDATA).

Submitted by:   Raja Mukerji.
Reviewed by:    Mohan, Silby, Andre Opperman.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Wed May 11 21:37:42 2005 UTC (6 years, 9 months ago) by ps
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +7 -2 lines
When looking for the next hole to retransmit from the scoreboard,
or to compute the total retransmitted bytes in this sack recovery
episode, the scoreboard is traversed. While in sack recovery, this
traversal occurs on every call to tcp_output(), every dupack and
every partial ack. The scoreboard could potentially get quite large,
making this traversal expensive.

This change optimizes this by storing hints (for the next hole to
retransmit and the total retransmitted bytes in this sack recovery
episode) reducing the complexity to find these values from O(n) to
constant time.

The debug code that sanity checks the hints against the computed
value will be removed eventually.

Submitted by:   Mohan Srinivasan, Noritoshi Demizu, Raja Mukerji.

Revision 1.100.2.7: download - view: text, markup, annotated - select for diffs
Wed May 4 13:59:26 2005 UTC (6 years, 9 months ago) by andre
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.100.2.6: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.2.6: +1 -1 lines
MFC:
  tcp_output.c rev 1.109, tcp_subr.c rev 1.222, tcp_var.h rev 1.120.

  Ignore ICMP Source Quench messages for TCP sessions.  Source Quench is
  ineffective, depreciated and can be abused to degrade the performance
  of active TCP sessions if spoofed.

  Replace a bogus call to tcp_quench() in tcp_output() with the direct
  equivalent tcpcb variable assignment.

  Security:	draft-gont-tcpm-icmp-attacks-03.txt Section 7.1

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu Apr 21 20:26:07 2005 UTC (6 years, 9 months ago) by ps
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +84 -45 lines
Fix for interaction problems between TCP SACK and TCP Signature.
If TCP Signatures are enabled, the maximum allowed sack blocks aren't
going to fit. The fix is to compute how many sack blocks fit and tack
these on last. Also on SYNs, defer padding until after the SACK
PERMITTED option has been added.

Found by:	Mohan Srinivasan.
Submitted by:	Mohan Srinivasan, Noritoshi Demizu.
Reviewed by:	Raja Mukerji.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Thu Apr 21 12:37:12 2005 UTC (6 years, 9 months ago) by andre
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +1 -1 lines
Ignore ICMP Source Quench messages for TCP sessions.  Source Quench is
ineffective, depreciated and can be abused to degrade the performance
of active TCP sessions if spoofed.

Replace a bogus call to tcp_quench() in tcp_output() with the direct
equivalent tcpcb variable assignment.

Security:	draft-gont-tcpm-icmp-attacks-03.txt Section 7.1
MFC after:	3 days

Revision 1.100.2.6: download - view: text, markup, annotated - select for diffs
Wed Feb 9 20:36:51 2005 UTC (7 years ago) by ps
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.100.2.5: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.5: +16 -6 lines
MFC:

revision 1.108
date: 2005/01/12 21:40:51;  author: ps;  state: Exp;  lines: +16 -6
Fix a TCP SACK related crash resulting from incorrect computation
of len in tcp_output(), in the case where the FIN has already been
transmitted. The mis-computation of len is because of a gcc
optimization issue, which this change works around.

Submitted by:   Mohan Srinivasan

Revision 1.100.2.5: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:26:36 2005 UTC (7 years ago) by imp
Branches: RELENG_5
Diff to: previous 1.100.2.4: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.4: +1 -1 lines
MFC: /*- and related license changes

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Jan 12 21:40:51 2005 UTC (7 years ago) by ps
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +16 -6 lines
Fix a TCP SACK related crash resulting from incorrect computation
of len in tcp_output(), in the case where the FIN has already been
transmitted. The mis-computation of len is because of a gcc
optimization issue, which this change works around.

Submitted by:	Mohan Srinivasan

Revision 1.107: download - view: text, markup, annotated - select for diffs
Fri Jan 7 01:45:45 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +1 -1 lines
/* -> /*- for license, minor formatting changes

Revision 1.100.2.4: download - view: text, markup, annotated - select for diffs
Mon Dec 6 17:13:20 2004 UTC (7 years, 2 months ago) by ps
Branches: RELENG_5
Diff to: previous 1.100.2.3: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.3: +4 -2 lines
MFC: rev 1.106
Fixes a bug in SACK causing us to send data beyond the receive window.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Mon Nov 29 18:47:27 2004 UTC (7 years, 2 months ago) by ps
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +4 -2 lines
Fixes a bug in SACK causing us to send data beyond the receive window.

Found by: Pawel Worach and Daniel Hartmeier
Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com

Revision 1.100.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 8 03:22:51 2004 UTC (7 years, 3 months ago) by ps
Branches: RELENG_5
Diff to: previous 1.100.2.2: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.2: +40 -26 lines
MFC:
- Estimate the amount of data in flight in sack recovery and use it
  to control the packets injected while in sack recovery (for both
  retransmissions and new data).
- Cleanups to the sack codepaths in tcp_output.c and tcp_sack.c.
- Add a new sysctl (net.inet.tcp.sack.initburst) that controls the
  number of sack retransmissions done upon initiation of sack recovery.

Submitted by:   Mohan Srinivasan <mohans@yahoo-inc.com>

Revision 1.105: download - view: text, markup, annotated - select for diffs
Tue Nov 2 22:22:21 2004 UTC (7 years, 3 months ago) by andre
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -82 lines
Remove RFC1644 T/TCP support from the TCP side of the network stack.

A complete rationale and discussion is given in this message
and the resulting discussion:

 http://docs.freebsd.org/cgi/mid.cgi?4177C8AD.6060706

Note that this commit removes only the functional part of T/TCP
from the tcp_* related functions in the kernel.  Other features
introduced with RFC1644 are left intact (socket layer changes,
sendmsg(2) on connection oriented protocols)  and are meant to
be reused by a simpler and less intrusive reimplemention of the
previous T/TCP functionality.

Discussed on:	-arch

Revision 1.100.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sat Oct 30 20:50:06 2004 UTC (7 years, 3 months ago) by rwatson
Branches: RELENG_5_3
CVS tags: RELENG_5_3_0_RELEASE
Diff to: previous 1.100.2.1: preferred, colored; next MAIN 1.100.2.2: preferred, colored
Changes since revision 1.100.2.1: +2 -2 lines
Merge tcp_output:1.104 from HEAD to RELENG_5_3:

  date: 2004/10/30 12:02:50;  author: rwatson;  state: Exp;  lines: +2 -2
  Correct a bug in TCP SACK that could result in wedging of the TCP stack
  under high load: only set function state to loop and continuing sending
  if there is no data left to send.

  RELENG_5_3 candidate.

  Feet provided:  Peter Losher <Peter underscore Losher at isc dot org>
  Diagnosed by:   Aniel Hartmeier <daniel at benzedrine dot cx>
  Submitted by:   mohan <mohans at yahoo-inc dot com>

Approved by:	re (kensmith)

Revision 1.100.2.2: download - view: text, markup, annotated - select for diffs
Sat Oct 30 15:38:56 2004 UTC (7 years, 3 months ago) by rwatson
Branches: RELENG_5
Diff to: previous 1.100.2.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.1: +2 -2 lines
Merge tcp_output.c:1.104 from HEAD to RELENG_5:

  date: 2004/10/30 12:02:50;  author: rwatson;  state: Exp;  lines: +2 -2
  Correct a bug in TCP SACK that could result in wedging of the TCP stack
  under high load: only set function state to loop and continuing sending
  if there is no data left to send.

  RELENG_5_3 candidate.

  Feet provided:  Peter Losher <Peter underscore Losher at isc dot org>
  Diagnosed by:   Aniel Hartmeier <daniel at benzedrine dot cx>
  Submitted by:   mohan <mohans at yahoo-inc dot com>

Approved by:	re (kensmith)

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sat Oct 30 12:02:50 2004 UTC (7 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -2 lines
Correct a bug in TCP SACK that could result in wedging of the TCP stack
under high load: only set function state to loop and continuing sending
if there is no data left to send.

RELENG_5_3 candidate.

Feet provided:	Peter Losher <Peter underscore Losher at isc dot org>
Diagnosed by:	Aniel Hartmeier <daniel at benzedrine dot cx>
Submitted by:	mohan <mohans at yahoo-inc dot com>

Revision 1.100.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 12 17:36:45 2004 UTC (7 years, 4 months ago) by rwatson
Branches: RELENG_5
CVS tags: RELENG_5_3_BP
Branch point for: RELENG_5_3
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +14 -2 lines
Merge tcp_output.c:1.103 from HEAD to RELENG_5:

  date: 2004/10/09 16:48:51;  author: rwatson;  state: Exp;  lines: +14 -2
  Acquire the send socket buffer lock around tcp_output() activities
  reaching into the socket buffer.  This prevents a number of potential
  races, including dereferencing of sb_mb while unlocked leading to
  a NULL pointer deref (how I found it).  Potentially this might also
  explain other "odd" TCP behavior on SMP boxes (although  haven't
  seen it reported).

Approved by:	re (kensmith)

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Oct 9 16:48:51 2004 UTC (7 years, 4 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +14 -2 lines
Acquire the send socket buffer lock around tcp_output() activities
reaching into the socket buffer.  This prevents a number of potential
races, including dereferencing of sb_mb while unlocked leading to
a NULL pointer deref (how I found it).  Potentially this might also
explain other "odd" TCP behavior on SMP boxes (although  haven't
seen it reported).

RELENG_5 candidate.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Oct 5 18:36:24 2004 UTC (7 years, 4 months ago) by ps
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +40 -26 lines
- Estimate the amount of data in flight in sack recovery and use it
  to control the packets injected while in sack recovery (for both
  retransmissions and new data).
- Cleanups to the sack codepaths in tcp_output.c and tcp_sack.c.
- Add a new sysctl (net.inet.tcp.sack.initburst) that controls the
  number of sack retransmissions done upon initiation of sack recovery.

Submitted by:	Mohan Srinivasan <mohans@yahoo-inc.com>

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Sep 5 02:34:12 2004 UTC (7 years, 5 months ago) by jmg
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +4 -3 lines
fix up socket/ip layer violation...  don't assume/know that
SO_DONTROUTE == IP_ROUTETOIF and SO_BROADCAST == IP_ALLOWBROADCAST...

Revision 1.100: download - view: text, markup, annotated - select for diffs
Mon Aug 16 18:32:07 2004 UTC (7 years, 5 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_5_BP
Branch point for: RELENG_5
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +71 -71 lines
White space cleanup for netinet before branch:

- Trailing tab/space cleanup
- Remove spurious spaces between or before tabs

This change avoids touching files that Andre likely has in his working
set for PFIL hooks changes for IPFW/DUMMYNET.

Approved by:	re (scottl)
Submitted by:	Xin LI <delphij@frontfree.net>

Revision 1.99: download - view: text, markup, annotated - select for diffs
Wed Jul 28 02:15:14 2004 UTC (7 years, 6 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +13 -4 lines
Fix a bug in the sack code that was causing data to be retransmitted
with the FIN bit set for all segments, if a FIN has already been sent before.
The fix will allow the FIN bit to be set for only the last segment, in case
it has to be retransmitted.

Fix another bug that would have caused snd_nxt to be pulled by len if
there was an error from ip_output. snd_nxt should not be touched
during sack retransmissions.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Mon Jul 26 23:41:12 2004 UTC (7 years, 6 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +1 -1 lines
Fix for a SACK bug where the very last segment retransmitted
from the SACK scoreboard could result in the next (untransmitted)
segment to be skipped.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Jul 19 22:37:33 2004 UTC (7 years, 6 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +1 -1 lines
Let IN_FASTREOCOVERY macro decide if we are in recovery mode.

Nuke sackhole_limit for now. We need to add it back to limit the total
number of sack blocks in the system.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon Jul 19 22:06:01 2004 UTC (7 years, 6 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +29 -8 lines
Fix a potential panic in the SACK code that was causing
1) data to be sent to the right of snd_recover.
2) send more data then whats in the send buffer.

The fix is to postpone sack retransmit to a subsequent recovery episode
if the current retransmit pointer is beyond snd_recover.

Thanks to Mohan Srinivasan for helping fix the bug.

Submitted by:Daniel Lang

Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Jun 23 21:04:37 2004 UTC (7 years, 7 months ago) by ps
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +115 -3 lines
Add support for TCP Selective Acknowledgements.  The work for this
originated on RELENG_4 and was ported to -CURRENT.

The scoreboarding code was obtained from OpenBSD, and many
of the remaining changes were inspired by OpenBSD, but not
taken directly from there.

You can enable/disable sack using net.inet.tcp.do_sack. You can
also limit the number of sack holes that all senders can have in
the scoreboard with net.inet.tcp.sackhole_limit.

Reviewed by:	gnn
Obtained from:	Yahoo! (Mohan Srinivasan, Jayanth Vijayaraghavan)

Revision 1.94: download - view: text, markup, annotated - select for diffs
Fri Jun 18 09:53:58 2004 UTC (7 years, 7 months ago) by bms
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +1 -1 lines
Appease GCC.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Fri Jun 18 03:31:07 2004 UTC (7 years, 7 months ago) by bms
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +11 -2 lines
If SO_DEBUG is enabled for a TCP socket, and a received segment is
encapsulated within an IPv6 datagram, do not abuse the 'ipov' pointer
when registering trace records.  'ipov' is specific to IPv4, and
will therefore be uninitialized.

[This fandango is only necessary in the first place because of our
host-byte-order IP field pessimization.]

PR:		kern/60856
Submitted by:	Galois Zheng

Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Jun 18 02:47:59 2004 UTC (7 years, 7 months ago) by bms
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +1 -1 lines
Don't set FIN on a retransmitted segment after a FIN has been sent,
unless the segment really contains the last of the data for the stream.

PR:		kern/34619
Obtained from:	OpenBSD (tcp_output.c rev 1.47)
Noticed by:	Joseph Ishac
Reviewed by:	George Neville-Neil

Revision 1.91: download - view: text, markup, annotated - select for diffs
Tue May 4 02:11:47 2004 UTC (7 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -1 lines
Switch to using the inpcb MAC label instead of socket MAC label when
labeling new mbufs created from sockets/inpcbs in IPv4.  This helps avoid
the need for socket layer locking in the lower level network paths
where inpcb locks are already frequently held where needed.  In
particular:

- Use the inpcb for label instead of socket in raw_append().
- Use the inpcb for label instead of socket in tcp_output().
- Use the inpcb for label instead of socket in tcp_respond().
- Use the inpcb for label instead of socket in tcp_twrespond().
- Use the inpcb for label instead of socket in syncache_respond().

While here, modify tcp_respond() to avoid assigning NULL to a stack
variable and centralize assertions about the inpcb when inp is
assigned.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research

Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Apr 7 20:46:13 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +0 -4 lines
Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson

Revision 1.39.2.21: download - view: text, markup, annotated - select for diffs
Sat Feb 14 22:23:23 2004 UTC (7 years, 11 months ago) by bms
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.39.2.20: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.20: +39 -0 lines
MFC: Import of TCP-MD5 (RFC2385) support.

Sponsored by:   sentex.net

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:21:45 2004 UTC (7 years, 11 months ago) by bms
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3 lines
Brucification.

Submitted by:	bde

Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Feb 12 20:12:48 2004 UTC (7 years, 11 months ago) by bms
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +4 -6 lines
style(9) pass; whitespace and comments.

Submitted by:	njl

Revision 1.87: download - view: text, markup, annotated - select for diffs
Wed Feb 11 09:46:54 2004 UTC (8 years ago) by bms
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +2 -0 lines
Fix a typo; left out preprocessor conditional for sigoff variable, which
is only used by TCP_SIGNATURE code.

Noticed by:	Roop Nanuwa

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Feb 11 04:26:02 2004 UTC (8 years ago) by bms
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +37 -0 lines
Initial import of RFC 2385 (TCP-MD5) digest support.

This is the first of two commits; bringing in the kernel support first.
This can be enabled by compiling a kernel with options TCP_SIGNATURE
and FAST_IPSEC.

For the uninitiated, this is a TCP option which provides for a means of
authenticating TCP sessions which came into being before IPSEC. It is
still relevant today, however, as it is used by many commercial router
vendors, particularly with BGP, and as such has become a requirement for
interconnect at many major Internet points of presence.

Several parts of the TCP and IP headers, including the segment payload,
are digested with MD5, including a shared secret. The PF_KEY interface
is used to manage the secrets using security associations in the SADB.

There is a limitation here in that as there is no way to map a TCP flow
per-port back to an SPI without polluting tcpcb or using the SPD; the
code to do the latter is unstable at this time. Therefore this code only
supports per-host keying granularity.

Whilst FAST_IPSEC is mutually exclusive with KAME IPSEC (and thus IPv6),
TCP_SIGNATURE applies only to IPv4. For the vast majority of prospective
users of this feature, this will not pose any problem.

This implementation is output-only; that is, the option is honoured when
responding to a host initiating a TCP session, but no effort is made
[yet] to authenticate inbound traffic. This is, however, sufficient to
interwork with Cisco equipment.

Tested with a Cisco 2501 running IOS 12.0(27), and Quagga 0.96.4 with
local patches. Patches for tcpdump to validate TCP-MD5 sessions are also
available from me upon request.

Sponsored by:	sentex.net

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Feb 3 18:20:55 2004 UTC (8 years ago) by ume
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +0 -7 lines
pass pcb rather than so. it is expected that per socket policy
works again.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Jan 22 23:22:14 2004 UTC (8 years ago) by andre
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +22 -21 lines
Split the overloaded variable 'win' into two for their specific purposes:
recwin and sendwin.  This removes a big source of confusion and makes
following the code much easier.

Reviewed by:	sam (mentor)
Obtained from:	DragonFlyBSD rev 1.6 (hsu)

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Nov 20 20:07:38 2003 UTC (8 years, 2 months ago) by andre
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +17 -27 lines
Introduce tcp_hostcache and remove the tcp specific metrics from
the routing table.  Move all usage and references in the tcp stack
from the routing table metrics to the tcp hostcache.

It caches measured parameters of past tcp sessions to provide better
initial start values for following connections from or to the same
source or destination.  Depending on the network parameters to/from
the remote host this can lead to significant speedups for new tcp
connections after the first one because they inherit and shortcut
the learning curve.

tcp_hostcache is designed for multiple concurrent access in SMP
environments with high contention and is hash indexed by remote
ip address.

It removes significant locking requirements from the tcp stack with
regard to the routing table.

Reviewed by:	sam (mentor), bms
Reviewed by:	-net, -current, core@kame.net (IPv6 parts)
Approved by:	re (scottl)

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sat Nov 8 22:55:52 2003 UTC (8 years, 3 months ago) by sam
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +1 -3 lines
replace mtx_assert by INP_LOCK_ASSERT

Supported by:	FreeBSD Foundation

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sat Nov 8 00:34:34 2003 UTC (8 years, 3 months ago) by sam
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +1 -1 lines
unbreak compilation of FAST_IPSEC

Supported by:	FreeBSD Foundation

Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Nov 4 16:02:01 2003 UTC (8 years, 3 months ago) by ume
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +7 -0 lines
- cleanup SP refcnt issue.
- share policy-on-socket for listening socket.
- don't copy policy-on-socket at all.  secpolicy no longer contain
  spidx, which saves a lot of memory.
- deep-copy pcb policy if it is an ipsec policy.  assign ID field to
  all SPD entries.  make it possible for racoon to grab SPD entry on
  pcb.
- fixed the order of searching SA table for packets.
- fixed to get a security association header.  a mode is always needed
  to compare them.
- fixed that the incorrect time was set to
  sadb_comb_{hard|soft}_usetime.
- disallow port spec for tunnel mode policy (as we don't reassemble).
- an user can define a policy-id.
- clear enc/auth key before freeing.
- fixed that the kernel crashed when key_spdacquire() was called
  because key_spdacquire() had been implemented imcopletely.
- preparation for 64bit sequence number.
- maintain ordered list of SA, based on SA id.
- cleanup secasvar management; refcnt is key.c responsibility;
  alloc/free is keydb.c responsibility.
- cleanup, avoid double-loop.
- use hash for spi-based lookup.
- mark persistent SP "persistent".
  XXX in theory refcnt should do the right thing, however, we have
  "spdflush" which would touch all SPs.  another solution would be to
  de-register persistent SPs from sptree.
- u_short -> u_int16_t
- reduce kernel stack usage by auto variable secasindex.
- clarify function name confusion.  ipsec_*_policy ->
  ipsec_*_pcbpolicy.
- avoid variable name confusion.
  (struct inpcbpolicy *)pcb_sp, spp (struct secpolicy **), sp (struct
  secpolicy *)
- count number of ipsec encapsulations on ipsec4_output, so that we
  can tell ip_output() how to handle the packet further.
- When the value of the ul_proto is ICMP or ICMPV6, the port field in
  "src" of the spidx specifies ICMP type, and the port field in "dst"
  of the spidx specifies ICMP code.
- avoid from applying IPsec transport mode to the packets when the
  kernel forwards the packets.

Tested by:	nork
Obtained from:	KAME

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Aug 13 08:50:42 2003 UTC (8 years, 6 months ago) by harti
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -1 lines
The tcp_trace call needs the length of the header. Unfortunately the
code has rotten a bit so that the header length is not correct at
the point when tcp_trace is called. Temporarily compute the correct
value before the call and restore the old value after. This makes
ports/benchmarks/dbs to almost work.

This is a NOP unless you compile with TCPDEBUG.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Feb 19 22:18:05 2003 UTC (8 years, 11 months ago) by jlemon
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +4 -9 lines
Convert tcp_fillheaders(tp, ...) -> tcpip_fillheaders(inp, ...) so the
routine does not require a tcpcb to operate.  Since we no longer keep
template mbufs around, move pseudo checksum out of this routine, and
merge it with the length update.

Sponsored by: DARPA, NAI Labs

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Feb 19 21:18:23 2003 UTC (8 years, 11 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +4 -3 lines
Clean up delayed acks and T/TCP interactions:
   - delay acks for T/TCP regardless of delack setting
   - fix bug where a single pass through tcp_input might not delay acks
   - use callout_active() instead of callout_pending()

Sponsored by: DARPA, NAI Labs

Revision 1.76: download - view: text, markup, annotated - select for diffs
Wed Feb 19 05:47:34 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3 lines
Back out M_* changes, per decision of the TRB.

Approved by: trb

Revision 1.39.2.20: download - view: text, markup, annotated - select for diffs
Wed Jan 29 22:45:36 2003 UTC (9 years ago) by hsu
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8
Diff to: previous 1.39.2.19: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.19: +3 -6 lines
Merge rev 1.74 from current:  Optimize away call to bzero()
in the common case by directly checking if a connection has
any cached TAO information.

Revision 1.39.2.19: download - view: text, markup, annotated - select for diffs
Fri Jan 24 05:11:34 2003 UTC (9 years ago) by sam
Branches: RELENG_4
Diff to: previous 1.39.2.18: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.18: +5 -0 lines
MFC: Fast IPsec

"Fast IPsec": this is an experimental IPsec implementation that is derived
from the KAME IPsec implementation, but with heavy borrowing and influence
of openbsd.  A key feature of this implementation is that it uses the kernel
crypto framework to do all crypto work so when h/w crypto support is present
IPsec operation is automatically accelerated.  Otherwise the protocol
implementations are rather differet while the SADB and policy management
code is very similar to KAME (for the moment).

Note that this implementation is enabled with a FAST_IPSEC option.  With this
you get all protocols; i.e. there is no FAST_IPSEC_ESP option.

FAST_IPSEC and IPSEC are mutually exclusive; you cannot build both into a
single system.

This software is well tested with IPv4 but should be considered very
experimental (i.e. do not deploy in production environments).  This software
does NOT currently support IPv6.  In fact do not configure FAST_IPSEC and
INET6 in the same system.

Supported by:	Vernier Networks

Revision 1.39.2.18: download - view: text, markup, annotated - select for diffs
Thu Jan 23 21:06:46 2003 UTC (9 years ago) by sam
Branches: RELENG_4
Diff to: previous 1.39.2.17: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.17: +3 -12 lines
MFC: m_tag support

Replace aux mbufs with packet tags:

  o instead of a list of mbufs use a list of m_tag structures a la openbsd
  o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit
    ABI/module number cookie
  o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and
    use this in defining openbsd-compatible m_tag_find and m_tag_get routines
  o rewrite KAME use of aux mbufs in terms of packet tags
  o eliminate the most heavily used aux mbufs by adding an additional struct
    inpcb parameter to ip_output and ip6_output to allow the IPsec code to
    locate the security policy to apply to outbound packets
  o bump __FreeBSD_version so code can be conditionalized
  o fixup ipfilter's call to ip_output based on __FreeBSD_version

Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Jan 21 08:56:04 2003 UTC (9 years ago) by alfred
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
Remove M_TRYWAIT/M_WAITOK/M_WAIT.  Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Jan 18 19:03:26 2003 UTC (9 years ago) by hsu
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -6 lines
Optimize away call to bzero() in the common case by directly checking
if a connection has any cached TAO information.

Revision 1.39.2.17: download - view: text, markup, annotated - select for diffs
Wed Oct 16 19:25:26 2002 UTC (9 years, 3 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.39.2.16: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.16: +38 -8 lines
MFC 1.70 and 1.73.  Deal with SYN and FIN in a PERSIST case.  The SYN
situation is not likely to ever occur but the FIN situation might,
resulting in an incorrect snd_max.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Oct 16 19:16:33 2002 UTC (9 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +1 -1 lines
Fix oops in my last commit, I was calculating a new length but then not
using it.  (The code is already correct in -stable).

Found by: silby

Revision 1.72: download - view: text, markup, annotated - select for diffs
Wed Oct 16 02:25:04 2002 UTC (9 years, 3 months ago) by sam
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +5 -0 lines
Tie new "Fast IPsec" code into the build.  This involves the usual
configuration stuff as well as conditional code in the IPv4 and IPv6
areas.  Everything is conditional on FAST_IPSEC which is mutually
exclusive with IPSEC (KAME IPsec implmentation).

As noted previously, don't use FAST_IPSEC with INET6 at the moment.

Reviewed by:	KAME, rwatson
Approved by:	silence
Supported by:	Vernier Networks

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Oct 16 01:54:45 2002 UTC (9 years, 3 months ago) by sam
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -12 lines
Replace aux mbufs with packet tags:

o instead of a list of mbufs use a list of m_tag structures a la openbsd
o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit
  ABI/module number cookie
o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and
  use this in defining openbsd-compatible m_tag_find and m_tag_get routines
o rewrite KAME use of aux mbufs in terms of packet tags
o eliminate the most heavily used aux mbufs by adding an additional struct
  inpcb parameter to ip_output and ip6_output to allow the IPsec code to
  locate the security policy to apply to outbound packets
o bump __FreeBSD_version so code can be conditionalized
o fixup ipfilter's call to ip_output based on __FreeBSD_version

Reviewed by:	julian, luigi (silent), -arch, -net, darren
Approved by:	julian, silence from everyone else
Obtained from:	openbsd (mostly)
MFC after:	1 month

Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Oct 10 19:21:50 2002 UTC (9 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +36 -6 lines
Update various comments mainly related to retransmit/FIN that I
documented while working on a previous bug.

Fix a PERSIST bug.  Properly account for a FIN sent during a PERSIST.

MFC after:	7 days

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Sep 17 03:19:43 2002 UTC (9 years, 4 months ago) by jennifer
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -0 lines
Tempary fix for inet6. The final fix is to change in6_pcbnotify to take pcbinfo instead
of pcbhead. It is on the way.

Revision 1.39.2.16: download - view: text, markup, annotated - select for diffs
Sat Aug 24 18:40:26 2002 UTC (9 years, 5 months ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7
Diff to: previous 1.39.2.15: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.15: +1 -0 lines
MFC the TCP bandwidth-based window limiting code.  Default operation is
to not limit the window (feature disabled).  Setting
net.inet.tcp.inflight_enable to 1 will enable the feature.

Differences from current:  debugging defaults to off, and the window
minimum is set to a production value of 6144 bytes rather then a debugging
value of 1024 bytes.  See 'man tcp' and 'man tuning' for more information.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Aug 17 18:26:01 2002 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +1 -0 lines
Implement TCP bandwidth delay product window limiting, similar to (but
not meant to duplicate) TCP/Vegas.  Add four sysctls and default the
implementation to 'off'.

net.inet.tcp.inflight_enable	enable algorithm (defaults to 0=off)
net.inet.tcp.inflight_debug	debugging (defaults to 1=on)
net.inet.tcp.inflight_min	minimum window limit
net.inet.tcp.inflight_max	maximum window limit

MFC after:	1 week

Revision 1.67: download - view: text, markup, annotated - select for diffs
Mon Aug 12 03:22:46 2002 UTC (9 years, 6 months ago) by jennifer
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -0 lines
Assert that the inpcb lock is held when calling tcp_output().

Approved by:	hsu

Revision 1.66: download - view: text, markup, annotated - select for diffs
Wed Jul 31 19:06:49 2002 UTC (9 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -0 lines
Introduce support for Mandatory Access Control and extensible
kernel access control.

Instrument the TCP socket code for packet generation and delivery:
label outgoing mbufs with the label of the socket, and check socket and
mbuf labels before permitting delivery to a socket.  Assign labels
to newly accepted connections when the syncache/cookie code has done
its business.  Also set peer labels as convenient.  Currently,
MAC policies cannot influence the PCB matching algorithm, so cannot
implement polyinstantiation.  Note that there is at least one case
where a PCB is not available due to the TCP packet not being associated
with any socket, so we don't label in that case, but need to handle
it in a special manner.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs

Revision 1.39.2.15: download - view: text, markup, annotated - select for diffs
Sat Jul 13 05:45:56 2002 UTC (9 years, 7 months ago) by darrenr
Branches: RELENG_4
Diff to: previous 1.39.2.14: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.14: +1 -1 lines
In -current, path_mtu_discovery is already global.  Make it the same here.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun Jun 23 21:25:36 2002 UTC (9 years, 7 months ago) by luigi
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +19 -31 lines
Slightly restructure the #ifdef INET6 sections to make the code
more readable.

Remove the six "register" attributes from variables tcp_output(), the
compiler surely knows well how to allocate them.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Jun 14 03:08:05 2002 UTC (9 years, 8 months ago) by silby
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -1 lines
Re-commit w/fix:

  Ensure that the syn cache's syn-ack packets contain the same
  ip_tos, ip_ttl, and DF bits as all other tcp packets.

  PR:             39141
  MFC after:      2 weeks

This time, make sure that ipv4 specific code (aka all of the above)
is only run in the ipv4 case.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Jun 14 02:43:20 2002 UTC (9 years, 8 months ago) by silby
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -1 lines
Back out ip_tos/ip_ttl/DF "fix", it just panic'd my box. :)

Pointy-hat to:	silby

Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Jun 14 02:36:33 2002 UTC (9 years, 8 months ago) by silby
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -1 lines
Ensure that the syn cache's syn-ack packets contain the same
ip_tos, ip_ttl, and DF bits as all other tcp packets.

PR:		39141
MFC after:	2 weeks

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri May 31 11:52:32 2002 UTC (9 years, 8 months ago) by tanimura
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -14 lines
Back out my lats commit of locking down a socket, it conflicts with hsu's work.

Requested by:	hsu

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon May 20 05:41:05 2002 UTC (9 years, 8 months ago) by tanimura
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +14 -3 lines
Lock down a socket, milestone 1.

o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a
  socket buffer. The mutex in the receive buffer also protects the data
  in struct socket.

o Determine the lock strategy for each members in struct socket.

o Lock down the following members:

  - so_count
  - so_options
  - so_linger
  - so_state

o Remove *_locked() socket APIs.  Make the following socket APIs
  touching the members above now require a locked socket:

 - sodisconnect()
 - soisconnected()
 - soisconnecting()
 - soisdisconnected()
 - soisdisconnecting()
 - sofree()
 - soref()
 - sorele()
 - sorwakeup()
 - sotryfree()
 - sowakeup()
 - sowwakeup()

Reviewed by:	alfred

Revision 1.39.2.14: download - view: text, markup, annotated - select for diffs
Mon Dec 17 22:58:52 2001 UTC (10 years, 1 month ago) by silby
Branches: RELENG_4
CVS tags: RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5
Diff to: previous 1.39.2.13: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.13: +1 -1 lines
MFC rev 1.59

  Reduce the local network slowstart flightsize from infinity to 4 packets.

  Now that we've increased the size of our send / receive buffers, bursting
  an entire window onto the network may cause congestion.  As a result,
  we will slow start beginning with a flightsize of 4 packets.

  Problem reported by: Thomas Zenker <thz@Lennartz-electronic.de>

Revision 1.39.2.13: download - view: text, markup, annotated - select for diffs
Fri Dec 14 20:19:14 2001 UTC (10 years, 1 month ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.39.2.12: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.12: +10 -3 lines
MFC: r1.53,r1.54,r1.57; TF_LASTIDLE, syncache support, compiler cleanup.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Dec 14 18:26:52 2001 UTC (10 years, 1 month ago) by silby
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -1 lines
Reduce the local network slowstart flightsize from infinity to 4 packets.

Now that we've increased the size of our send / receive buffers, bursting
an entire window onto the network may cause congestion.  As a result,
we will slow start beginning with a flightsize of 4 packets.

Problem reported by: Thomas Zenker <thz@Lennartz-electronic.de>

MFC after:	3 days

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Dec 13 04:02:31 2001 UTC (10 years, 2 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +8 -8 lines
Fix up tabs from cut&n&paste.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Mon Dec 10 08:09:48 2001 UTC (10 years, 2 months ago) by obrien
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +1 -1 lines
Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.

Revision 1.39.2.12: download - view: text, markup, annotated - select for diffs
Sun Dec 2 19:23:39 2001 UTC (10 years, 2 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.39.2.11: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.11: +40 -14 lines
quick MFC of mainly tcp_input.c 1.144 and tcp_output.c 1.56.  Propogate
TCP_NODELAY to accept()ed sockets and fix a transmitter stall 0-window bug
in TCP.  This brings FreeBSD's tbench performance up to approximately the
same as Linux and should thus also have a big effect on samba performance.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sun Dec 2 08:49:29 2001 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +40 -14 lines
Fix a bug with transmitter restart after receiving a 0 window.  The
receiver was not sending an immediate ack with delayed acks turned on
when the input buffer is drained, preventing the transmitter from
restarting immediately.

Propogate the TCP_NODELAY option to accept()ed sockets.  (Helps tbench and
is a good idea anyway).

Some cleanup.  Identify additonal issues in comments.

MFC after:	1 day

Revision 1.39.2.11: download - view: text, markup, annotated - select for diffs
Fri Nov 30 21:34:28 2001 UTC (10 years, 2 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.39.2.10: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.10: +11 -1 lines
MFC 1.55 - the transmit burst limit for newreno completely breaks TCP's
performance if the receive side is using delayed acks.  Temporarily remove
it.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Nov 30 21:33:39 2001 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +10 -0 lines
The transmit burst limit for newreno completely breaks TCP's performance
if the receive side is using delayed acks.  Temporarily remove it.

MFC after:	0 days

Revision 1.54: download - view: text, markup, annotated - select for diffs
Thu Nov 22 04:50:43 2001 UTC (10 years, 2 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -2 lines
Introduce a syncache, which enables FreeBSD to withstand a SYN flood
DoS in an improved fashion over the existing code.

Reviewed by: silby  (in a previous iteration)
Sponsored by: DARPA, NAI Labs

Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Oct 5 21:33:38 2001 UTC (10 years, 4 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +9 -2 lines
Add a flag TF_LASTIDLE, that forces a previously idle connection
to send all its data, especially when the data is less than one MSS.
This fixes an issue where the stack was delaying the sending
of data, eventhough there was enough window to send all the data and
the sending of data was emptying the socket buffer.

Problem found by Yoshihiro Tsuchiya (tsuchiya@flab.fujitsu.co.jp)

Submitted by: Jayanth Vijayaraghavan

Revision 1.39.2.10: download - view: text, markup, annotated - select for diffs
Sat Jul 7 04:30:38 2001 UTC (10 years, 7 months ago) by silby
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.39.2.9: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.9: +3 -11 lines
MFC of tcp template removal + jlemon's patch to improve header
generation performance.

Revision 1.39.2.9: download - view: text, markup, annotated - select for diffs
Tue Jul 3 11:01:47 2001 UTC (10 years, 7 months ago) by ume
Branches: RELENG_4
Diff to: previous 1.39.2.8: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.8: +7 -3 lines
MFC: Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

	etc/defaults/rc.conf:			1.111
	etc/rc.network:				1.98
	etc/rc.network6:			1.20
	lib/libipsec/ipsec_set_policy.3:	1.8
	lib/libipsec/ipsec_strerror.3:		1.7
	lib/libipsec/ipsec_strerror.c:		1.3
	lib/libipsec/ipsec_strerror.h:		1.3
	lib/libipsec/libpfkey.h:		1.2
	lib/libipsec/pfkey.c:			1.3
	lib/libipsec/pfkey_dump.c:		1.3
	lib/libipsec/policy_token.l:		1.5
	lib/libipsec/test-policy.c:		1.4
	sbin/ifconfig/ifconfig.8:		1.42
	sbin/ifconfig/ifconfig.c:		1.63
	sbin/ping6/ping6.8:			1.10
	sbin/ping6/ping6.c:			1.9
	sbin/route/route.c:			1.48, 1.50
	sbin/rtsol/Makefile:			1.4
	share/doc/IPv6/IMPLEMENTATION:		1.3
	share/examples/IPv6/USAGE:		1.3
	share/man/man4/faith.4:			1.10
	share/man/man4/gif.4:			1.9
	share/man/man4/inet6.4:			1.8
	share/man/man4/ip6.4:			1.8
	share/man/man4/ipsec.4:			1.9
	share/man/man4/kame.4:			1.8
	share/man/man4/stf.4:			1.8
	sys/conf/files:				1.534
	sys/crypto/md5.c:			1.4
	sys/crypto/sha1.c:			1.7
	sys/crypto/blowfish/bf_enc.c:		1.4
	sys/crypto/blowfish/bf_locl.h:		1.4
	sys/crypto/blowfish/bf_skey.c:		1.4
	sys/crypto/blowfish/blowfish.h:		1.4
	sys/crypto/cast128/cast128.c:		1.4
	sys/crypto/cast128/cast128.h:		1.4
	sys/crypto/des/des.h:			1.4
	sys/crypto/des/des_ecb.c:		1.4
	sys/crypto/des/des_locl.h:		1.5
	sys/crypto/des/des_setkey.c:		1.4
	sys/crypto/rijndael/boxes-fst.dat:	1.2
	sys/crypto/rijndael/rijndael-alg-fst.c:	1.2, 1.3
	sys/crypto/rijndael/rijndael-alg-fst.h:	1.2
	sys/crypto/rijndael/rijndael-api-fst.c:	1.2
	sys/crypto/rijndael/rijndael-api-fst.h:	1.2
	sys/crypto/rijndael/rijndael_local.h:	1.3
	sys/kern/uipc_domain.c:			1.24
	sys/kern/uipc_mbuf.c:			1.82
	sys/kern/uipc_mbuf2.c:			1.8
	sys/net/if.c:				1.109
	sys/net/if_faith.c:			1.4, 1.5
	sys/net/if_gif.c:			1.10
	sys/net/if_gif.h:			1.4
	sys/net/if_loop.c:			1.61
	sys/net/if_sppp.h:			1.17
	sys/net/if_spppsubr.c:			1.68, 1.69
	sys/net/net_osdep.c:			1.4
	sys/net/net_osdep.h:			1.5
	sys/net/pfkeyv2.h:			1.6
	sys/net/ppp_defs.h:			1.7
	sys/net/rtsock.c:			1.52
	sys/netinet/icmp6.h:			1.4
	sys/netinet/in.c:			1.54
	sys/netinet/in_gif.c:			1.10
	sys/netinet/in_pcb.c:			1.84
	sys/netinet/in_pcb.h:			1.38
	sys/netinet/in_proto.c:			1.56
	sys/netinet/ip6.h:			1.5
	sys/netinet/ip_ecn.c:			1.4
	sys/netinet/ip_ecn.h:			1.4
	sys/netinet/ip_encap.c:			1.4
	sys/netinet/ip_icmp.c:			1.57
	sys/netinet/ip_input.c:			1.171
	sys/netinet/ip_output.c:		1.126
	sys/netinet/ip_var.h:			1.56
	sys/netinet/raw_ip.c:			1.78
	sys/netinet/tcp_input.c:		1.132
	sys/netinet/tcp_output.c:		1.50
	sys/netinet/tcp_subr.c:			1.103
	sys/netinet/tcp_usrreq.c:		1.60
	sys/netinet/udp_usrreq.c:		1.89
	sys/netinet6/ah.h:			1.5
	sys/netinet6/ah6.h:			1.4
	sys/netinet6/ah_core.c:			1.8
	sys/netinet6/ah_input.c:		1.7
	sys/netinet6/ah_output.c:		1.7
	sys/netinet6/dest6.c:			1.6
	sys/netinet6/esp.h:			1.4
	sys/netinet6/esp6.h:			1.4
	sys/netinet6/esp_core.c:		1.5
	sys/netinet6/esp_input.c:		1.7
	sys/netinet6/esp_output.c:		1.5
	sys/netinet6/frag6.c:			1.8
	sys/netinet6/icmp6.c:			1.11
	sys/netinet6/in6.c:			1.12
	sys/netinet6/in6.h:			1.13
	sys/netinet6/in6_cksum.c:		1.4
	sys/netinet6/in6_gif.c:			1.5
	sys/netinet6/in6_ifattach.c:		1.6
	sys/netinet6/in6_ifattach.h:		1.3
	sys/netinet6/in6_pcb.c:			1.15
	sys/netinet6/in6_pcb.h:			1.4
	sys/netinet6/in6_prefix.c:		1.7
	sys/netinet6/in6_prefix.h:		1.5
	sys/netinet6/in6_proto.c:		1.14
	sys/netinet6/in6_rmx.c:			1.4
	sys/netinet6/in6_src.c:			1.4
	sys/netinet6/in6_var.h:			1.8
	sys/netinet6/ip6_ecn.h:			1.4
	sys/netinet6/ip6_forward.c:		1.11
	sys/netinet6/ip6_fw.c:			1.11
	sys/netinet6/ip6_fw.h:			1.11
	sys/netinet6/ip6_input.c:		1.27
	sys/netinet6/ip6_mroute.c:		1.7
	sys/netinet6/ip6_mroute.h:		1.4
	sys/netinet6/ip6_output.c:		1.25
	sys/netinet6/ip6_var.h:			1.7
	sys/netinet6/ip6protosw.h:		1.6
	sys/netinet6/ipcomp.h:			1.2
	sys/netinet6/ipcomp6.h:			1.2
	sys/netinet6/ipcomp_core.c:		1.2
	sys/netinet6/ipcomp_input.c:		1.2
	sys/netinet6/ipcomp_output.c:		1.2
	sys/netinet6/ipsec.c:			1.12
	sys/netinet6/ipsec.h:			1.8
	sys/netinet6/ipsec6.h:			1.5
	sys/netinet6/mld6.c:			1.7
	sys/netinet6/nd6.c:			1.9
	sys/netinet6/nd6.h:			1.7
	sys/netinet6/nd6_nbr.c:			1.9
	sys/netinet6/nd6_rtr.c:			1.7, 1.8
	sys/netinet6/raw_ip6.c:			1.11
	sys/netinet6/route6.c:			1.4
	sys/netinet6/scope6.c:			1.2
	sys/netinet6/udp6_output.c:		1.3
	sys/netinet6/udp6_usrreq.c:		1.15
	sys/netkey/key.c:			1.25
	sys/netkey/key.h:			1.7
	sys/netkey/key_debug.c:			1.14
	sys/netkey/key_debug.h:			1.7
	sys/netkey/key_var.h:			1.4
	sys/netkey/keydb.h:			1.6
	sys/netkey/keysock.c:			1.6
	sys/netsmb/smb_crypt.c:			1.2
	sys/sys/mbuf.h:				1.79, 1.80
	sys/sys/protosw.h:			1.33
	sys/sys/socket.h:			1.54, 1.56
	sys/sys/sockio.h:			1.17
	usr.bin/netstat/inet.c:			1.42
	usr.bin/netstat/inet6.c:		1.10
	usr.bin/netstat/ipsec.c:		1.2
	usr.bin/netstat/main.c:			1.40
	usr.bin/netstat/mroute6.c:		1.5
	usr.bin/netstat/netstat.1:		1.29
	usr.bin/netstat/netstat.h:		1.21
	usr.bin/netstat/route.c:		1.50, 1.51, 1.55
	usr.sbin/faithd/Makefile:		1.6
	usr.sbin/faithd/README:			1.4
	usr.sbin/faithd/faithd.8:		1.9
	usr.sbin/faithd/faithd.c:		1.7
	usr.sbin/faithd/faithd.h:		1.3
	usr.sbin/faithd/ftp.c:			1.5
	usr.sbin/faithd/rsh.c:			1.5
	usr.sbin/faithd/tcp.c:			1.3
	usr.sbin/gifconfig/gifconfig.8:		1.6
	usr.sbin/gifconfig/gifconfig.c:		1.4
	usr.sbin/ifmcstat/ifmcstat.8:		1.3
	usr.sbin/ifmcstat/ifmcstat.c:		1.7
	usr.sbin/mld6query/mld6.c:		1.2
	usr.sbin/mld6query/mld6query.8:		1.2
	usr.sbin/ndp/ndp.8:			1.6
	usr.sbin/ndp/ndp.c:			1.6
	usr.sbin/prefix/Makefile:		1.4
	usr.sbin/rip6query/rip6query.8:		1.4
	usr.sbin/rip6query/rip6query.c:		1.5
	usr.sbin/route6d/route6d.8:		1.6
	usr.sbin/route6d/route6d.c:		1.9
	usr.sbin/route6d/route6d.h:		1.3
	usr.sbin/rrenumd/lexer.l:		1.3
	usr.sbin/rrenumd/parser.y:		1.3
	usr.sbin/rrenumd/rrenumd.8:		1.6
	usr.sbin/rrenumd/rrenumd.c:		1.4
	usr.sbin/rrenumd/rrenumd.conf.5:	1.10
	usr.sbin/rrenumd/rrenumd.h:		1.3
	usr.sbin/rtadvd/advcap.c:		1.4
	usr.sbin/rtadvd/advcap.h:		1.4
	usr.sbin/rtadvd/config.c:		1.7
	usr.sbin/rtadvd/config.h:		1.4
	usr.sbin/rtadvd/dump.c:			1.3
	usr.sbin/rtadvd/dump.h:			1.3
	usr.sbin/rtadvd/if.c:			1.6
	usr.sbin/rtadvd/if.h:			1.4
	usr.sbin/rtadvd/pathnames.h:		1.5
	usr.sbin/rtadvd/rrenum.c:		1.5
	usr.sbin/rtadvd/rrenum.h:		1.4
	usr.sbin/rtadvd/rtadvd.8:		1.8
	usr.sbin/rtadvd/rtadvd.c:		1.6
	usr.sbin/rtadvd/rtadvd.conf.5:		1.6
	usr.sbin/rtadvd/rtadvd.h:		1.4
	usr.sbin/rtadvd/timer.c:		1.4
	usr.sbin/rtadvd/timer.h:		1.4
	usr.sbin/rtsold/Makefile:		1.6
	usr.sbin/rtsold/dump.c:			1.4
	usr.sbin/rtsold/if.c:			1.5
	usr.sbin/rtsold/probe.c:		1.5
	usr.sbin/rtsold/rtsol.c:		1.4
	usr.sbin/rtsold/rtsold.8:		1.5
	usr.sbin/rtsold/rtsold.c:		1.4
	usr.sbin/rtsold/rtsold.h:		1.4
	usr.sbin/setkey/parse.y:		1.3
	usr.sbin/setkey/scriptdump.pl:		1.3
	usr.sbin/setkey/setkey.8:		1.14
	usr.sbin/setkey/setkey.c:		1.3
	usr.sbin/setkey/token.l:		1.5
	usr.sbin/traceroute6/traceroute6.8:	1.7
	usr.sbin/traceroute6/traceroute6.c:	1.8

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Jun 23 03:21:46 2001 UTC (10 years, 7 months ago) by silby
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2, KSE_MILESTONE_2
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -11 lines
Eliminate the allocation of a tcp template structure for each
connection.  The information contained in a tcptemp can be
reconstructed from a tcpcb when needed.

Previously, tcp templates required the allocation of one
mbuf per connection.  On large systems, this change should
free up a large number of mbufs.

Reviewed by:	bmilekic, jlemon, ru
MFC after: 2 weeks

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Jun 11 19:16:06 2001 UTC (10 years, 8 months ago) by ume
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -1 lines
This is force commit to mention about previous commit.

- make sure to check MGET failure during IPsec m_aux operations.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Jun 11 12:39:01 2001 UTC (10 years, 8 months ago) by ume
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +7 -3 lines
Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue May 1 08:13:12 2001 UTC (10 years, 9 months ago) by markm
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -3 lines
Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)

Revision 1.39.2.8: download - view: text, markup, annotated - select for diffs
Mon Mar 5 13:09:03 2001 UTC (10 years, 11 months ago) by obrien
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3
Diff to: previous 1.39.2.7: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.7: +1 -3 lines
MFC:
Convert all users of fldoff() to offsetof().  fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>

Revision 1.39.2.7: download - view: text, markup, annotated - select for diffs
Thu Mar 1 22:08:42 2001 UTC (10 years, 11 months ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.39.2.6: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.6: +6 -2 lines
MFC: TCP New Reno algorithm

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Oct 27 11:45:41 2000 UTC (11 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +1 -3 lines
Convert all users of fldoff() to offsetof().  fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>

Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>

Remove myriad of local offsetof() definitions.

Remove includes of <stddef.h> in kernel code.

NB: Kernelcode should *never* include from /usr/include !

Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.

Deprecate <struct.h> with a warning.  The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.

Paritials reviews by:   various.
Significant brucifications by:  bde

Revision 1.39.2.6: download - view: text, markup, annotated - select for diffs
Wed Sep 13 04:27:06 2000 UTC (11 years, 5 months ago) by archie
Branches: RELENG_4
CVS tags: RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE
Diff to: previous 1.39.2.5: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.5: +3 -4 lines
MFC: (rev. 1.47) no snd_nxt rollback optimization for SYN packets

Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Sep 11 19:11:33 2000 UTC (11 years, 5 months ago) by archie
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -4 lines
Don't do snd_nxt rollback optimization (rev. 1.46) for SYN packets.
It causes a panic when/if snd_una is incremented elsewhere (this
is a conservative change, because originally no rollback occurred
for any packets at all).

Submitted by:	Vivek Sadananda Pai <vivek@imimic.com>

Revision 1.39.2.5: download - view: text, markup, annotated - select for diffs
Tue Aug 15 01:31:15 2000 UTC (11 years, 5 months ago) by archie
Branches: RELENG_4
Diff to: previous 1.39.2.4: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.4: +16 -1 lines
MFC: (rev. 1.46) improved performance when ip_output() returns an error.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Aug 3 23:23:36 2000 UTC (11 years, 6 months ago) by archie
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +16 -1 lines
Improve performance in the case where ip_output() returns an error.
When this happens, we know for sure that the packet data was not
received by the peer. Therefore, back out any advancing of the
transmit sequence number so that we send the same data the next
time we transmit a packet, avoiding a guaranteed missed packet and
its resulting TCP transmit slowdown.

In most systems ip_output() probably never returns an error, and
so this problem is never seen. However, it is more likely to occur
with device drivers having short output queues (causing ENOBUFS to
be returned when they are full), not to mention low memory situations.

Moreover, because of this problem writers of slow devices were
required to make an unfortunate choice between (a) having a relatively
short output queue (with low latency but low TCP bandwidth because
of this problem) or (b) a long output queue (with high latency and
high TCP bandwidth). In my particular application (ISDN) it took
an output queue equal to ~5 seconds of transmission to avoid ENOBUFS.
A more reasonable output queue of 0.5 seconds resulted in only about
50% TCP throughput. With this patch full throughput was restored in
the latter case.

Reviewed by:	freebsd-net

Revision 1.39.2.4: download - view: text, markup, annotated - select for diffs
Sat Jul 15 07:14:31 2000 UTC (11 years, 6 months ago) by kris
Branches: RELENG_4
CVS tags: RELENG_4_1_0_RELEASE
Diff to: previous 1.39.2.3: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.3: +25 -18 lines
MFC: Merge KAME 2000/07/01 code.

Revision 1.39.2.3: download - view: text, markup, annotated - select for diffs
Thu Jul 13 07:45:50 2000 UTC (11 years, 7 months ago) by dg
Branches: RELENG_4
Diff to: previous 1.39.2.2: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.2: +3 -3 lines
Merged undocumented bug fix from rev 1.41: Fix for timer race that can
cause a panic.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Jul 12 22:00:46 2000 UTC (11 years, 7 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -2 lines
re-enable the tcp newreno code.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Jul 4 16:35:05 2000 UTC (11 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +25 -18 lines
sync with kame tree as of july00.  tons of bug fixes/improvements.

API changes:
- additional IPv6 ioctls
- IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8).
  (also syntax change)

Revision 1.32.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 8 15:37:39 2000 UTC (11 years, 8 months ago) by jlemon
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE
Diff to: previous 1.32.2.2: preferred, colored; branchpoint 1.32: preferred, colored; next MAIN 1.33: preferred, colored
Changes since revision 1.32.2.2: +4 -1 lines
MFC: r1.34, LAST_ACK problem.  (slightly different patch)
Submitted by:	Mike Silbersack <silby@silby.com>

Revision 1.39.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 8 15:33:55 2000 UTC (11 years, 8 months ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.39.2.1: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.1: +5 -1 lines
MFC: r1.43, fix for connections hanging in LAST_ACK state.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Jun 2 17:38:45 2000 UTC (11 years, 8 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +5 -1 lines
When attempting to transmit a packet, if the system fails to allocate
a mbuf, it may return without setting any timers.  If no more data is
scheduled to be transmitted (this was a FIN) the system will sit in
LAST_ACK state forever.

Thus, when mbuf allocation fails, set the retransmit timer if neither
the retransmit or persist timer is already pending.

Problem discovered by:  Mike Silbersack (silby@silby.com)
Pushed for a fix by:    Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:            jayanth

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu May 11 22:28:28 2000 UTC (11 years, 9 months ago) by jayanth
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -2 lines
Temporarily turn off the newreno flag until we can track down the known
data corruption problem.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat May 6 03:31:09 2000 UTC (11 years, 9 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +8 -4 lines
Implement TCP NewReno, as documented in RFC 2582.  This allows
better recovery for multiple packet losses in a single window.
The algorithm can be toggled via the sysctl net.inet.tcp.newreno,
which defaults to "on".

Submitted by:  Jayanth Vijayaraghavan <jayanth@yahoo-inc.com>

Revision 1.39.2.1: download - view: text, markup, annotated - select for diffs
Fri May 5 13:36:53 2000 UTC (11 years, 9 months ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +12 -9 lines
MFC: delayed checksum work.  This also brings the mbuf size up to 256.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Mar 27 19:14:23 2000 UTC (11 years, 10 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +12 -9 lines
Add support for offloading IP/TCP/UDP checksums to NIC hardware which
supports them.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Feb 9 00:34:40 2000 UTC (12 years ago) by shin
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +14 -5 lines
Avoid kernel panic when tcp rfc1323 and rfc1644 options are enabled
at the same time.

   When rfc1323 and rfc1644 option are enabled by sysctl,
   and tcp over IPv6 is tried, kernel panic happens by the
   following check in tcp_output(), because now hdrlen is bigger
   in such case than before.

/*#ifdef DIAGNOSTIC*/
        if (max_linkhdr + hdrlen > MHLEN)
                panic("tcphdr too big");
/*#endif*/

   So change the above check to compare with MCLBYTES in #ifdef INET6 case.
   Also, allocate a mbuf cluster for the header mbuf, in that case.

Bug reported at KAME environment.
Approved by: jkh

Reviewed by: sumikawa
Obtained from: KAME project

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Jan 15 14:56:36 2000 UTC (12 years ago) by shin
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +6 -1 lines
Fixed the problem that IPsec connection hangs when bigger data is sent.
  -opt_ipsec.h was missing on some tcp files (sorry for basic mistake)
  -made buildable as above fix
  -also added some missing IPv4 mapped IPv6 addr consideration into
   ipsec4_getpolicybysock

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Jan 9 19:17:26 2000 UTC (12 years, 1 month ago) by shin
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +143 -23 lines
tcp updates to support IPv6.
also a small patch to sys/nfs/nfs_socket.c, as max_hdr size change.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project

Revision 1.11.4.6: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:34:59 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.11.4.5: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.4.5: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.21.2.5: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:18:42 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.21.2.4: preferred, colored; branchpoint 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21.2.4: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Aug 30 21:17:06 1999 UTC (12 years, 5 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +47 -28 lines
Restructure TCP timeout handling:

  - eliminate the fast/slow timeout lists for TCP and instead use a
    callout entry for each timer.
  - increase the TCP timer granularity to HZ
  - implement "bad retransmit" recovery, as presented in
    "On Estimating End-to-End Network Path Properties", by Allman and Paxson.

Submitted by:	jlemon, wollmann

Revision 1.32.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:29:55 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.32.2.1: preferred, colored; branchpoint 1.32: preferred, colored
Changes since revision 1.32.2.1: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:49:31 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu May 27 12:24:21 1999 UTC (12 years, 8 months ago) by dg
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +9 -8 lines
Added net.inet.tcp.path_mtu_discovery variable which when set to 0
(default 1) disables PMTUD globally. Although PMTUD can be disabled in
the standard case by locking the MTU on a static route (including the
default route), this method doesn't work in the face of dynamic routing
protocols like gated.

Revision 1.32.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 7 22:25:52 1999 UTC (12 years, 10 months ago) by julian
Branches: RELENG_3
CVS tags: RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
MFC: two cosmetic changes.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Apr 7 22:22:06 1999 UTC (12 years, 10 months ago) by julian
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, PRE_NEWBUS, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE, POST_NEWBUS
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Two cosmetic changes, one a typo and the other, a clarification.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Jan 20 17:31:59 1999 UTC (13 years ago) by fenner
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_1_0_RELEASE
Branch point for: RELENG_3
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -2 lines
Add a flag, passed to pru_send routines, PRUS_MORETOCOME.  This
flag means that there is more data to be put into the socket buffer.
Use it in TCP to reduce the interaction between mbuf sizes and the
Nagle algorithm.

Based on:	"Justin C. Walker" <justin@apple.com>'s description of Apple's
		fix for this problem.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Jul 13 11:53:59 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -4 lines
Fixed overflow and sign extension bugs in
`len = min(so->so_snd.sb_cc, win) - off;'.  min() has type u_int
and `off' has type int, so when min() is 0 and `off' is 1, the RHS
overflows to 0U - 1 = UINT_MAX.  `len' has type long, so when
sizeof(long) == sizeof(int), the LHS normally overflows to to the
correct value of -1, but when sizeof(long) > sizeof(int), the LHS
is UINT_MAX.

Fixed some u_long's that should have been fixed-sized types.

Revision 1.21.2.4: download - view: text, markup, annotated - select for diffs
Sun May 24 19:02:31 1998 UTC (13 years, 8 months ago) by fenner
Branches: RELENG_2_2
CVS tags: RELENG_2_2_8_RELEASE, RELENG_2_2_7_RELEASE
Diff to: previous 1.21.2.3: preferred, colored; branchpoint 1.21: preferred, colored
Changes since revision 1.21.2.3: +13 -4 lines
Merge rev 1.30: take IP options into account when calculating length

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun May 24 18:41:04 1998 UTC (13 years, 8 months ago) by fenner
Branches: MAIN
CVS tags: PRE_NOBDEV
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +13 -4 lines
Take IP options into account when calculating the allowable length
of the TCP payload.  See RFC1122 section 4.2.2.6 .  This allows
Path MTU discovery to be used along with IP options.

PR:		problem discovered by Kevin Lahey <kml@nas.nasa.gov>

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Apr 6 06:52:44 1998 UTC (13 years, 10 months ago) by phk
Branches: MAIN
CVS tags: PRE_DEVFS_SLICE, POST_DEVFS_SLICE
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +1 -6 lines
Remove the last traces of TUBA.

Inspired by:	PR kern/3317

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Feb 20 13:37:39 1998 UTC (13 years, 11 months ago) by bde
Branches: MAIN
CVS tags: PRE_SOFTUPDATE, POST_SOFTUPDATE
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
Don't depend on "implicit int".

Revision 1.21.2.3: download - view: text, markup, annotated - select for diffs
Wed Oct 8 05:10:07 1997 UTC (14 years, 4 months ago) by fenner
Branches: RELENG_2_2
CVS tags: RELENG_2_2_6_RELEASE, RELENG_2_2_5_RELEASE
Diff to: previous 1.21.2.2: preferred, colored; branchpoint 1.21: preferred, colored
Changes since revision 1.21.2.2: +3 -3 lines
MFC: Don't try to put more than TCP_MAXWIN in the window field.

Ok'd by:	jkh

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Oct 7 21:10:06 1997 UTC (14 years, 4 months ago) by fenner
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
Don't allow the window to be increased beyond what is possible to
represent in the TCP header.  The old code did effectively:
	win = min(win, MAX_ALLOWED);
	win = max(win, what_i_think_i_advertised_last_time);
so if what_i_think_i_advertised_last_time is bigger than can be
represented in the header (e.g. large buffers and no window scaling)
then we stuff a too-big number into a short.  This fix reverses the
order of the comparisons.

PR:		kern/4712

Revision 1.21.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 30 16:25:10 1997 UTC (14 years, 4 months ago) by davidg
Branches: RELENG_2_2
Diff to: previous 1.21.2.1: preferred, colored; branchpoint 1.21: preferred, colored
Changes since revision 1.21.2.1: +3 -3 lines
Merged from -current: data struct reorg and improved ordering of compares
in the PCB lookup code (see rev 1.30 of in_pcb.c).
This will require a rebuild of netstat.

Revision 1.21.2.1: download - view: text, markup, annotated - select for diffs
Tue Sep 16 18:37:01 1997 UTC (14 years, 4 months ago) by joerg
Branches: RELENG_2_2
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -1 lines
MFC: make TCPDEBUG a new-style option

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Sep 16 18:36:05 1997 UTC (14 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -1 lines
Make TCPDEBUG a new-style option.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Aug 2 14:32:56 1997 UTC (14 years, 6 months ago) by bde
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -4 lines
Removed unused #includes.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Apr 3 05:14:43 1997 UTC (14 years, 10 months ago) by davidg
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge, WOLLMAN_MBUF, BP_WOLLMAN_MBUF
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Reorganize elements of the inpcb struct to take better advantage of
cache lines. Removed the struct ip proto since only a couple of chars
were actually being used in it. Changed the order of compares in the
PCB hash lookup to take advantage of partial cache line fills (on PPro).

Discussed-with: wollman

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:41:40 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:49:14 1997 UTC (15 years, 1 month ago) by jkh
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Jun 8 08:19:00 1996 UTC (15 years, 8 months ago) by bde
Branches: MAIN
CVS tags: WHISTLE_SET_1, WHISTLE_NET_BRANCH_1, WHISTLE_BP1, RELENG_2_2_BP, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Branch point for: RELENG_2_2
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -2 lines
Changed some memcpy()'s back to bcopy()'s.

gcc only inlines memcpy()'s whose count is constant and didn't inline
these.  I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized.  Now it is only used for one struct
copy in si.c.

Revision 1.11.4.5: download - view: text, markup, annotated - select for diffs
Mon Apr 15 03:49:52 1996 UTC (15 years, 10 months ago) by davidg
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE
Diff to: previous 1.11.4.4: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.4.4: +8 -5 lines
Brought in fixes from -current: rev 1.20 of tcp_output.c, and 1.16 of
tcp_timer.c...time-out connections in the CLOSING state better.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Apr 15 03:46:32 1996 UTC (15 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +8 -5 lines
Two fixes from Rich Stevens:

1) Set the persist timer to help time-out connections in the CLOSING state.
2) Honor the keep-alive timer in the CLOSING state.

   This fixes problems with connections getting "stuck" due to incompletion
of the final connection shutdown which can be a BIG problem on busy WWW
servers.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Mar 11 15:13:32 1996 UTC (15 years, 11 months ago) by davidg
Branches: MAIN
CVS tags: wollman_polling
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
Move or add #include <queue.h> in preparation for upcoming struct socket
changes.

Revision 1.11.4.4: download - view: text, markup, annotated - select for diffs
Mon Mar 4 04:56:26 1996 UTC (15 years, 11 months ago) by davidg
Branches: RELENG_2_1_0
Diff to: previous 1.11.4.3: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.4.3: +31 -8 lines
Brought in Path MTU Discovery implementation from main branch. This has
been running on wcarchive now for several weeks and makes a substantial
improvement in TCP performance.

Revision 1.11.4.3: download - view: text, markup, annotated - select for diffs
Wed Jan 31 11:09:44 1996 UTC (16 years ago) by davidg
Branches: RELENG_2_1_0
Diff to: previous 1.11.4.2: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.4.2: +14 -1 lines
Brought in 'fix' from rev 1.18: be sure not to send data and/or FIN in SYN
segments if not doing T/TCP.

Revision 1.11.4.2: download - view: text, markup, annotated - select for diffs
Wed Jan 31 11:02:00 1996 UTC (16 years ago) by davidg
Branches: RELENG_2_1_0
Diff to: previous 1.11.4.1: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.4.1: +3 -10 lines
Brought in T/TCP fixes from main branch: retransmitted SYN segments could
have different CC options.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Jan 17 09:35:23 1996 UTC (16 years ago) by olah
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +14 -1 lines
Be more conservative when T/TCP extensions are disabled.  In particular,
do not send data and/or FIN on SYN segments in this case.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Dec 5 17:46:35 1995 UTC (16 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +6 -6 lines
Path MTU Discovery is now standard.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Nov 3 22:08:08 1995 UTC (16 years, 3 months ago) by olah
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -10 lines
Fix a logical error in T/TCP: when we actively open a connection, we
have to decide whether to send a CC or CCnew option in our SYN segment
depending on the contents of our TAO cache.  This decision has to be
made once when the connection starts.  The earlier code delayed this
decision until the segment was assembled in tcp_output() and
retransmitted SYN segments could have different CC options.

Reviewed by:	Richard Stevens, davidg, wollman

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Oct 16 18:21:12 1995 UTC (16 years, 3 months ago) by wollman
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +13 -1 lines
The ability to administratively change the MTU of an interface presents
a few new wrinkles for MTU discovery which tcp_output() had better
be prepared to handle.  ip_output() is also modified to do something
helpful in this case, since it has already calculated the information
we need.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Sep 22 20:05:58 1995 UTC (16 years, 4 months ago) by wollman
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -5 lines
Merge 4.4-Lite-2: update version number (we already have the same fixes).

Obtained from:	4.4BSD-Lite-2

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Thu Sep 21 17:19:01 1995 UTC (16 years, 4 months ago) by wollman
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +9 -5 lines
Second try: get 4.4-Lite-2 into the source tree.  The conflicts don't
matter because none of our working source files are on the CSRG branch
any more.

Obtained from:	4.4BSD-Lite-2

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Sep 20 21:00:58 1995 UTC (16 years, 4 months ago) by wollman
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +18 -6 lines
Add support in TCP for Path MTU discovery.  This is highly experimental
and gated on `options MTUDISC' in the source.  It is also practically
untested becausse (sniff!) I don't have easy access to a network with
an MTU of less than an Ethernet.  If you have a small MTU network,
please try it and tell me if it works!

Revision 1.11.4.1: download - view: text, markup, annotated - select for diffs
Fri Sep 15 08:58:07 1995 UTC (16 years, 5 months ago) by davidg
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_0_RELEASE
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +6 -3 lines
Brought in changes from rev 1.12: deal properly with mbuf allocation
failure.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Sep 13 17:36:31 1995 UTC (16 years, 5 months ago) by wollman
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +6 -3 lines
If tcp_output() is unable to allocate space for a copy of the data waiting
to be sent, just clean up and return ENOBUFS rather than silently
proceeding without sending any of the data.  This makes it consistent
with the `#ifdef notyet' case immediately above.

Reviewed by:	Andras Olah <olah@freebsd.org>
Obtained from:	Lite-2

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue May 30 08:09:56 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +11 -11 lines
Remove trailing whitespace.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue May 9 13:35:47 1995 UTC (16 years, 9 months ago) by davidg
Branches: MAIN
CVS tags: RELENG_2_0_5_ALPHA
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -4 lines
Replaced some bcopy()'s with memcpy()'s so that gcc while inline/optimize.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Apr 9 01:29:25 1995 UTC (16 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -1 lines
Implemented PCB hashing. Includes new functions in_pcbinshash, in_pcbrehash,
and in_pcblookuphash.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Feb 16 00:55:40 1995 UTC (16 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -23 lines
Transaction TCP support now standard.  Hack away!

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Feb 9 23:13:24 1995 UTC (17 years ago) by wollman
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +145 -15 lines
Merge Transaction TCP, courtesy of Andras Olah <olah@cs.utwente.nl> and
Bob Braden <braden@isi.edu>.

NB: This has not had David's TCP ACK hack re-integrated.  It is not clear
what the correct solution to this problem is, if any.  If a better solution
doesn't pop up in response to this message, I'll put David's code back in
(or he's welcome to do so himself).

Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 7 01:34:07 1995 UTC (17 years ago) by wollman
Branches: OLAH_TTCP
Diff to: previous 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3: +129 -12 lines
Andras Olah's port of Bob Braden's Transaction TCP code.  This should
be on a private branch until it gets merged back into the main
line (which may take some time).

Submitted by: Andras Olah <olah@cs.utwente.nl>

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jan 26 03:56:20 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -6 lines
Kill previous commit as it isn't necessary.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jan 24 08:03:22 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +6 -1 lines
Extended the previous change to cover the non-options case, too.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jan 23 17:58:27 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -1 lines
Applied fix from Andreas Schulz with a different comment by me. Fixes a
bug where TCP connections are closed prematurely.

Submitted by:	Andreas Schulz

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Sep 15 10:36:55 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
CVS tags: RELEASE_2_0, BETA_2_0, ALPHA_2_0
Branch point for: OLAH_TTCP
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -1 lines
Made TCPDEBUG truely optional. Based on changes I made in FreeBSD 1.1.5.
Fixed somebody's idea of a joke - about the first half of the lines in
in_proto.c were spaced over by one space.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Aug 2 07:49:03 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -0 lines
Added $Id$

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 24 10:06:15 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, REL_before_johndavid_2_0_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Kernel Sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 24 10:06:14 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options