DragonFly BSD

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.63: download - view: text, markup, annotated - select for diffs
Tue Nov 11 10:46:58 2008 UTC (5 years, 11 months ago) by sephe
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.62: preferred, unified
Changes since revision 1.62: +33 -4 lines
- If we receive redirect or host dead ICMP message due to packets sent on
  TCP sockets, we need to go through all CPUs to check per-cpu TCP inpcbs.
- If we receive redirect ICMP message due to packets sent on UDP sockets,
  we need to go through all CPUs to free UDP inpcbs' cached route entry.

Reported-by: pavalos@
Tested-by: pavalos@

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Oct 30 10:50:18 2008 UTC (5 years, 11 months ago) by sephe
Branches: MAIN
Diff to: previous 1.61: preferred, unified
Changes since revision 1.61: +14 -5 lines
Don't use listen socket's route cache, it is not MPSAFE currently.  This could
happen if a listen socket received TCP segment with invalid flags combination.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Sep 23 11:28:49 2008 UTC (6 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.60: preferred, unified
Changes since revision 1.60: +34 -4 lines
Add following three network protocol threads running mode:
1) BGL (default)
2) Adaptive BGL.  Protocol threads run without BGL by default.  BGL will be
   held if the received msg does not have MSGF_MPSAFE turned on the ms_flags
   field
3) No BGL (experimental)

The code on the main path is done by dillon@

Following three sysctls and tunables are added to adjust the "mode":
net.netisr.mpsafe_thread
net.inet.tcp.mpsafe_thread
net.inet.udp.mpsafe_thread

They have same set of values,
0 (default) -- BGL
1 	    -- Adaptive BGL
2 	    -- No BGL



NETISR_FLAG_MPSAFE is added (netisr.ni_flags), so that:
- netisr_queue() and schednetisr() could set MSGF_MPSAFE during msg
  initialization
- netisr_run() (called by ether_input_oncpu()) could hold BGL based on this flag
  before calling netisr's handler



PR_MPSAFE is added (protosw.pr_flags), so that tranport_processing_oncpu() could
hold BGL before calling protocol's input handler



Kernel API changes:
- The thread parameter to netmsg_service_loop() must be supplied (running mode)
  and it must have the type of "int *"
- netisr_register() takes additional flags parameter to indicate whether its
  handler is MPSAFE (NETISR_FLAG_MPSAFE) or not

Reviewed-by: dillon@

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Aug 15 21:37:16 2008 UTC (6 years, 2 months ago) by nth
Branches: MAIN
Diff to: previous 1.59: preferred, unified
Changes since revision 1.59: +0 -1 lines
Allocate sackblock structs with kmalloc() instead of zalloc().

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Jul 6 11:59:03 2007 UTC (7 years, 3 months ago) by sephe
Branches: MAIN
CVS tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12, DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10, DragonFly_Preview
Diff to: previous 1.58: preferred, unified
Changes since revision 1.58: +1 -1 lines
After lwkt_waitmsg/lwkt_waitport splitting, the second parameter of
lwkt_waitport() is tsleep flags instead of msg pointer.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed May 23 08:57:09 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.57: preferred, unified
Changes since revision 1.57: +20 -22 lines
* Greatly reduce the complexity of the LWKT messaging and port abstraction.
  Significantly reduce the overhead of the subsystem.

* The message abort algorithm has been rewritten.  It now sends a
  separate message to issue the abort instead of trying to requeue
  the original message.  This also means the TAILQ embedded in the
  lwkt_msg structure can be used by unrelated code during processing
  of the message.

* Numerous MSGF_ flags have been removed, and all the LWKT msg/port
  algorithms have been rewritten and simplified.  The message structure
  is now only touched by the current owner in all situations.

* Numerous structural fields have been removed.  In particular, the
  fields used for message abort sequencing have been simplified and
  we do not try to embed a 'command' field in the base LWKT message
  any more.

* Clean up the netmsg abstraction, which is used all over the network stack.
  Instead of trying to overload fields in lwkt_msg we now simply extend
  the base lwkt_msg into struct netmsg.  The function dispatch now takes
  a netmsg and returns void (before we had to return EASYNC), and we no
  longer need weird casts.

  Accept/connect message aborts are now greatly simplified.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Apr 22 01:13:14 2007 UTC (7 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.56: preferred, unified
Changes since revision 1.56: +4 -4 lines
Give the sockbuf structure its own header file and supporting source file.
Move all sockbuf-specific functions from kern/uipc_socket2.c into the new
kern/uipc_sockbuf.c and move all the sockbuf-specific structures from
sys/socketvar.h to sys/sockbuf.h.

Change the sockbuf structure to only contain those fields required to
properly management a chain of mbufs.  Create a signalsockbuf structure
to hold the remaining fields (e.g. selinfo, mbmax, etc).

Change the so_rcv and so_snd structures in the struct socket from
a sockbuf to a signalsockbuf.

Remove the recently added sorecv_direct structure which was being used
to provide a direct mbuf path to consumers for socket I/O.  Use the newly
revamped sockbuf base structure instead.  This gives mbuf consumers
direct access to the sockbuf API functions for use outside of a struct
socket.  This will also allow new API functions to be added to the sockbuf
interface to ease the job of parsing data out of chained mbufs.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sun Mar 4 18:51:59 2007 UTC (7 years, 7 months ago) by swildner
Branches: MAIN
Diff to: previous 1.55: preferred, unified
Changes since revision 1.55: +0 -17 lines
Remove weird license clause which has expired.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Dec 22 23:57:52 2006 UTC (7 years, 10 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.54: preferred, unified
Changes since revision 1.54: +2 -2 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Dec 5 23:31:57 2006 UTC (7 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.53: preferred, unified
Changes since revision 1.53: +7 -7 lines
Local variables that were improperly named 'errno' must be renamed so as
not to conflict with libc's errno, when building a virtual kernel.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Sep 5 03:48:12 2006 UTC (8 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.52: preferred, unified
Changes since revision 1.52: +2 -2 lines
Rename malloc->kmalloc, free->kfree, and realloc->krealloc.  Pass 2

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Sep 5 00:55:48 2006 UTC (8 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.51: preferred, unified
Changes since revision 1.51: +2 -2 lines
Rename malloc->kmalloc, free->kfree, and realloc->krealloc.  Pass 1

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sat Jan 14 11:33:50 2006 UTC (8 years, 9 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6
Diff to: previous 1.50: preferred, unified
Changes since revision 1.50: +3 -3 lines
* Remove (void) casts for discarded return values.

* Put function types on separate lines.

* Ansify function definitions.

* Remove __P.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Dec 18 08:16:14 2005 UTC (8 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.49: preferred, unified
Changes since revision 1.49: +13 -2 lines
Add KTR logging to the core tcp protocol loop.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Jun 2 23:52:42 2005 UTC (9 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.48: preferred, unified
Changes since revision 1.48: +9 -10 lines
Remove spl*() calls from netinet, replacing them with critical sections.
A slight rearrangement of COMMON_START() in tcp_usrreq.c was necessary to
ensure that the inp is loaded after  entering the critical section.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue May 10 15:48:10 2005 UTC (9 years, 5 months ago) by hsu
Branches: MAIN
Diff to: previous 1.47: preferred, unified
Changes since revision 1.47: +3 -1 lines
Implement TCP Appropriate Byte Counting.

Reviewed by Noritoshi Demizu, demizu@dd.iij4u.or.jp.
Misunderstanding of spec clarified by Mark Allman.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Apr 22 17:41:15 2005 UTC (9 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.46: preferred, unified
Changes since revision 1.46: +0 -3 lines
Don't call cpu_mb1 after lwkt_setcpu_self, but call it internally
after the processing is done in lwkt_setcpu_self. The extern call
should automatically invalidate all non-local data and keeping it
in lwkt_setcpu_self ensures that it continues to work even with
IPO.

Requested-by: dillon

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Apr 11 09:43:50 2005 UTC (9 years, 6 months ago) by hmp
Branches: MAIN
CVS tags: DragonFly_Stable
Diff to: previous 1.45: preferred, unified
Changes since revision 1.45: +5 -9 lines
Mechanical cleanup of TCP per-cpu statistics code, better naming etc.

Correct a stale comment regarding initialisation of the counters.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Mar 6 05:09:25 2005 UTC (9 years, 7 months ago) by hsu
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.44: preferred, unified
Changes since revision 1.44: +112 -70 lines
Minimal patch that allows Path MTU discovery to be turned back on, but
leave it off by default.

Tested by:  Hiroki Sato, Dave Rhodus, Yonetani Tomokazu, Matt Dillon,
	    Andrew Atrens,

Revision 1.44: download - view: text, markup, annotated - select for diffs
Thu Jan 6 09:14:13 2005 UTC (9 years, 9 months ago) by hsu
Branches: MAIN
Diff to: previous 1.43: preferred, unified
Changes since revision 1.43: +3 -3 lines
Cosmetic cleanups.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Dec 21 02:54:15 2004 UTC (9 years, 10 months ago) by hsu
Branches: MAIN
Diff to: previous 1.42: preferred, unified
Changes since revision 1.42: +36 -45 lines
Clean up the routing and networking code before I parallelize routing.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Dec 20 11:03:16 2004 UTC (9 years, 10 months ago) by joerg
Branches: MAIN
Diff to: previous 1.41: preferred, unified
Changes since revision 1.41: +1 -25 lines
Remove the userland visible part of the socket generation counting.
As a side issue, the CPU used for processing a PCB isn't shown anymore,
since this is currently not included by the userland sockets.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Dec 16 03:37:30 2004 UTC (9 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.40: preferred, unified
Changes since revision 1.40: +24 -12 lines
Correct a bug where incoming connections do not properly initialize the
inflight bandwidth calculator.

Reorg the code a bit, removing random initialization elsewhere and putting
it all in one place.

Add an idle check and a pure-ack check.

Reported-by: Dan Nelson <dnelson@allantgroup.com>

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Nov 14 00:49:08 2004 UTC (9 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.39: preferred, unified
Changes since revision 1.39: +5 -0 lines
Implement SACK.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Oct 15 22:59:10 2004 UTC (10 years ago) by hsu
Branches: MAIN
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +2 -2 lines
Update includes now that the Fast IPSec code has moved to netproto/ipsec.

Submitted by:  Pawel Biernacki <kaktus@dragonflybsd.pl>

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Aug 11 02:36:22 2004 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +78 -20 lines
Add a state to sanity check tcp_close() to make sure it is not called
twice.

Add a 'cpu' field to the inpcb so the cpu owning a pcb can be made
well-known, for use in later assertions as we move closer to removing
the BGL.

Fix a bug in the closing of listen sockets.  The inp wildcard hash table
removal was being done asynchronously with the freeing of the inp, which
could lead to problems.  Instead of sending messages in parallel to all tcp
protocol threads to remove the wildcard hash we instead chain a single
message through all tcp protocol threads to remove the hash, then detach the
inp at the end of the chain.

There is still an issue with the socket being ripped out from under other
protocol threads which might be trying to accept connections on behalf of
the listen socket which must be resolved before the BGL can be removed (amoung
other things).

Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Aug 3 00:04:13 2004 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +40 -0 lines
tcp_input()'s DELAY_ACK() code checks to see if the delayed ack timer is
running and if it is not it starts it and returns rather then issue an
ack.  If the timer is already running tcp_input() will generate an immediate
ack, resulting in one ack every other packet.  This every-other-packet ack
is usually required to ensure that the window does not close too much and
stall the sender, but it really only exists because the tcp stack does not
look ahead to see if there are other incoming packets that need to be
processed that might themselves require additional acks.  For optimal
operation we really want to process all the pending TCP packets for
the connection before sending any 'normal' acks.

Many ethernet interfaces, including and most especially GigE interfaces,
rate-limit their interrupts.  This results in several packets being moved
from the RX ring to the TCP/IP stack all at once, in a batch.

GIVE THE TCP stack its own netisr dispatcher loop rather then using the
generic netisr dispatcher loop.  The TCP dispatcher loop will call an
additional routine, tcp_willblock(), after all messages queued to the TCP
protocol stack have been exhausted.

When tcp_input() needs to send an ack in the normal header-prediction case
it now places the TCPCB on a queue rather then send an immediate ack.
tcp_willblock() processes this queue and calls tcp_output() to send the
actual ack.

The result is that on a GigE interface which typically queues 8+ packets
per interrupt, a TCP stream will only be acked once per ~8 packets rather
then 4 times (every other packet) per ~8 packets.  This *GREATLY* reduces TCP
protocol overhead and network ack traffic on both ends of the connection.

NOTE: a later commit will deal with pure window space updates which generate
an additional ACK per ~8 packets when the user program drains the buffer.

Reviewed-by: Jeffrey Hsu <hsu@crater.dragonflybsd.org>

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Jul 8 22:07:35 2004 UTC (10 years, 3 months ago) by hsu
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0A_REL
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +50 -1 lines
Add the standard DragonFly copyright notice to go along with mine.

Approved by:	Matt

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Jul 2 04:41:01 2004 UTC (10 years, 3 months ago) by hsu
Branches: MAIN
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +1 -0 lines
Update some of my copyright notices before we officially publish
DragonFlyBSD in Release 1.0.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Jun 24 07:45:22 2004 UTC (10 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_1_0_RC1
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +10 -0 lines
The route table treats sockaddr data as opaque, which means that the unused
fields in the structure passed to rtalloc() MUST BE ZERO.

The syncache code allocates a governing struct syncache structure which
contains an embedded struct route, but it does not zero this structure.
When used in a mixed IPV4/IPV6 environment, it is possible for a structure
to be allocated for IPV4 whos unused fields for the route lookup (e.g.
sin_port and sin_zero) may contain garbage.  This screws up the route
table lookup and causes the wrong route to be returned.

I believe the proper fix in this case is to rewrite the route table code,
but since that would take a very long time the fix I am committing is
to have tcp_rtlookup() zero out the sockaddr_in before it builds it for
the rtalloc() call.

Reported-by: Richard Nyberg <rnyberg@it.su.se>
With-help-from: Hiten Pandya <hmp@nxad.com>

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Jun 7 02:36:22 2004 UTC (10 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +115 -60 lines
Add in_pcbinfo_init() to encapsulate basic structural setup (right now just
the LIST_INIT).  Rename inpcbinfo->listhead to inpcbinfo->pcblisthead due
to changes in the API (addition of markers).

Add support for markers in the inpcbinfo->pcblisthead lists of INPCB
structures.  Use markers in sysctl output code to iterate through these lists
without losing its place or having to worry about structures being ripped out
from under it.  Scrap the original two-pass code.

Redo the sysctl INPCB output code for tcp, udp, and other protocols so we
always output the correct number of structures (as specified in xig_count).

Generate output for all cpus (for TCP).  This is accomplished by using
lwkt_setcpu_self() to migrate the kernel thread to each cpu, which allows us
to iterate the list(s) managed by that cpu without having to deal with mutexes
or other forms of locks.  Iterations always wind up on the same cpu they began
on.

Redo netstat to properly iterate across as many cpu chunks as the inpcb
sysctl's return, rather then just the first one.

Work-by: Hiten Pandya and Matthew Dillon

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Jun 4 04:32:23 2004 UTC (10 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +16 -8 lines
Use MPIPE instead of the really hackish use of m_get() and mtod()/dtom()
for the 'tcptemp' structure.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Jun 2 14:43:01 2004 UTC (10 years, 4 months ago) by eirikn
Branches: MAIN
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +3 -3 lines
Change mbug allocation flags from M_ to MB_ to avoid confusion with malloc
flags.

Requested by: Jeffrey Hsu

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Apr 28 08:00:35 2004 UTC (10 years, 5 months ago) by hsu
Branches: MAIN
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +12 -10 lines
Remember if an inpcb was entered into the wildcard table to save
some cycles when a connection is closed.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Apr 24 04:47:29 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +39 -5 lines
Replicate the TCP listen table to give each cpu its own copy.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Apr 21 18:13:56 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +2 -2 lines
Fix a netmsg memory leak in the ARP code.  Adjust all ms_cmd function
dispatches to return a proper error code.

Reported-by: multiple people

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Apr 20 01:52:28 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +8 -8 lines
Revamp the initial lwkt_abortmsg() support to normalize the abstraction.  Now
a message's primary command is always processed by the target even if an
abort is requested before the target has retrieved the message from the
message port.  The message will then be requeued and the abort command copied
into lwkt_msg_t->ms_cmd.  Thus the target is always guarenteed to see the
original message and then a second, abort message (the same message with
ms_cmd = ms_abort) regardless of whether the abort was requested before
or after the target retrieved the original message.

ms_cmd is now an opaque union.  LWKT makes no assumptions as to its contents.
The NET code now stores nm_handler in ms_cmd as a function vector, and
nm_handler has been removed from all netmsg structures.

The ms_cmd function vector support nominally returns an integer error code
which is intended to support synchronous/asynchronous optimizations in the
future (to bypass messaging queueing and dequeueing in those situations
where they can be bypassed, without messing up the messaging abstraction).

The connect() predicate for which signal/abort support was added in the last
commit now uses the new abort mechanism.  Instead of having the handler
function check whether a message represents an abort or not, a different
handler vector is stored in ms_abort and run when an abort is processed
(making for an easy separation of function).

The large netmsg switch has been replaced by individual function vectors
using the new ms_cmd function vector support.  This will soon be removed
entirely in favor of direct assignment of LWKT-aware PRU vectors to the
messages command vector.

NOTE ADDITIONAL: eventually the SYSCALL, VFS, and DEV interfaces will use
the new message opaque ms_cmd 'function vector' support instead of a
command index.

Work by: Matthew Dillon and Jeffrey Hsu

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Apr 18 20:05:09 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +1 -1 lines
Allow an inp control block to be inserted on multiple wildcard hash tables.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Apr 18 06:41:35 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +275 -366 lines
Cosmetic changes.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Apr 13 07:10:34 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +0 -1 lines
Don't need opt_tcp_input.h for TCP_DISTRIBUTED_TCBINFO anymore.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Apr 13 05:23:13 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +0 -8 lines
get rid of TCP_DISTRIBUTED_TCBINFO, it only added confusion.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Apr 10 00:07:15 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +1 -0 lines
Add header file to pull in the setting of the TCP_DISTRIBUTED_TCBINFO option.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Apr 9 22:34:10 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +2 -3 lines
Push the lwkt_replymsg() up one level from netisr_service_loop() to
the message handler so we can explicitly reply or not reply as appropriate.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Apr 7 17:01:25 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +42 -0 lines
Make TCP stats per-cpu.

Submitted-by: Hiten Pandya <hmp@crater.dragonflybsd.org>

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Apr 5 17:47:01 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +11 -1 lines
per-cpu tcbinfo[]s aren't ready for prime time yet.  The tcbinfo is assigned
at tcp_attach time, but there is insufficient information available at this
time to select the hash table and the wrong one gets assigned N-1 out of N
times on MP systems (N = number of cpus), causing outgoing tcp connections
to fail.

An an option, TCP_DISTRIBUTED_TCBINFO, so MP-safe tcbinfo distribution can
continue to be developed without impacting users.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Mar 31 00:43:09 2004 UTC (10 years, 6 months ago) by hsu
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +5 -5 lines
Only enter wildcard sockets into the wildcard hash table.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Mar 14 08:26:31 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +2 -0 lines
Ifdef out unused variable.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Mar 14 08:21:53 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +24 -21 lines
Make tcp_drain() per-cpu.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Mar 14 07:57:26 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +54 -12 lines
Make tcp_drain() per-cpu.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Mar 8 19:44:32 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +70 -44 lines
Partition the TCP connection table.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Mar 6 05:00:41 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +8 -7 lines
Change the "struct inpcbhead *listhead" field in "struct inpcbinfo"
to "struct inpcbhead listhead" so we can have a separate list per
"struct inpcbinfo" when it becomes per-cpu.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Mar 4 01:02:05 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +2 -2 lines
Split out wildcarded sockets from the connection hash table.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Mar 2 20:41:13 2004 UTC (10 years, 7 months ago) by rob
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +7 -0 lines

Patch forr FreeBSD-SA-04:04.tcp

limits out of sequence reassembly queue size, to make sure we don't run
out of mbufs, resulting in a DOS attack.

This is the same as tcp47.patch

checked by Robert Garrett & Joerg Sonnenberger

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Feb 14 21:12:39 2004 UTC (10 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +1 -1 lines
Move <machine/in_cksum.h> to <sys/in_cksum.h>.  This file is now platform
independant.  If we want to add extreme machine specialization later on
then sys/in_cksum.h will #include machine/in_cksum.h.

Move i386/i386/in_cksum.c to netinet/in_cksum.c.  Note that netinet/in_cksum.c
already existed but was not used by the build system at all.  The move
overwrites it.  The new in_cksum.c is a portable, complete rewrite which
references core assembly (procedure call) to do 32-bit-aligned work.  See
also i386/i386/in_cksum2.s.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Nov 8 07:57:51 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +2 -2 lines
Network threading stage 1/3: netisrs are already software interrupts,
which means they alraedy run in their own thread.  This commit creates
multiple supporting threads for netisrs rather then just one and code
has been added to begin routing packets to particular threads based on
their content.  Eventually this will lead to us being able to isolate and
serialize PCBs in particular threads.  The tail end of the ip_input path's
protocol dispatch, the UIPC (user entry) code, and listen socket have not
been covered yet and still need to be serialized.

A new debugging sysctl, net.inet.ip.mthread_enable, has been added.  It
defaults to 1.  If you set this sysctl 0 netisr processing will revert to
the prior single-threaded behavior.

Submitted-by: Jeffrey Hsu <hsu@FreeBSD.org>
Additional-work-by: dillon

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Aug 23 11:18:00 2003 UTC (11 years, 2 months ago) by rob
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +4 -4 lines
if ipv6 doesnt need oldstyle prototypes maybe its time we took them out
of ipv4's code

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Jul 26 21:00:04 2003 UTC (11 years, 3 months ago) by rob
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +9 -9 lines
Register keyword removal

Approved by: Matt Dillon

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Jul 23 02:30:22 2003 UTC (11 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +2 -2 lines
LINT pass.  Cleanup missed proc->thread conversions and get rid of warnings.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Jun 25 05:22:32 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +2 -2 lines
proc->thread stage 4: post commit cleanup.  Fix minor issues when recompiling
with GENERIC.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Jun 25 03:56:04 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +4 -4 lines
proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
pointers instead of process pointers as arguments, similar to what FreeBSD-5
did.  Note however that ultimately both APIs are going to be message-passing
which means the current thread context will not be useable for creds and
descriptor access.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jun 23 17:55:46 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +3 -3 lines
proc->thread stage 2: MAJOR revamping of system calls, ucred, jail API,
and some work on the low level device interface (proc arg -> thread arg).
As -current did, I have removed p_cred and incorporated its functions
into p_ucred.  p_prison has also been moved into p_ucred and adjusted
accordingly.  The jail interface tests now uses ucreds rather then processes.

The syscall(p,uap) interface has been changed to just (uap).  This is inclusive
of the emulation code.  It makes little sense to pass a proc pointer around
which confuses the MP readability of the code, because most system call code
will only work with the current process anyway.  Note that eventually
*ALL* syscall emulation code will be moved to a kernel-protected userland
layer because it really makes no sense whatsoever to implement these
emulations in the kernel.

suser() now takes no arguments and only operates with the current process.
The process argument has been removed from suser_xxx() so it now just takes
a ucred and flags.

The sysctl interface was adjusted somewhat.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:51 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:34 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.73.2.31

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