summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Bugfix: Do correct accounting using the MIB counters when antuexen2010-12-121-0/+5
| | | | | | association is aborted via sctp_abort_association(). MFC after: 3 days.
* Use correct field to track statistics counting error as bad header length.bz2010-12-051-1/+1
| | | | | | | | This assimilates the code to what ip_input has been doing since r1.1 in this case. Submitted by: Rozhuk Ivan (rozhuk.im gmail.com) MFC after: 4 days
* Fix a bug where also the number of non-renegable gap reportstuexen2010-12-043-47/+25
| | | | | | was considered to be potentially renegable. MFC after: 1 day.
* Import a clean-room implementation of the experimental H-TCP congestion controllstewart2010-12-021-0/+521
| | | | | | | | | | | | | | | | | | algorithm based on the Internet-Draft "draft-leith-tcp-htcp-06.txt". It is implemented as a kernel module compatible with the recently committed modular congestion control framework. H-TCP was designed to provide increased throughput in fast and long-distance networks. It attempts to maintain fairness when competing with legacy NewReno TCP in lower speed scenarios where NewReno is able to operate adequately. The paper "H-TCP: A framework for congestion control in high-speed and long-distance networks" provides additional detail. In collaboration with: David Hayes <dahayes at swin edu au> and Grenville Armitage <garmitage at swin edu au> Sponsored by: FreeBSD Foundation Reviewed by: rpaulo (older patch from a few weeks ago) MFC after: 3 months
* Import a clean-room implementation of the experimental CUBIC congestion controllstewart2010-12-022-0/+625
| | | | | | | | | | | | | | | | | | algorithm based on the Internet-Draft "draft-rhee-tcpm-cubic-02.txt". It is implemented as a kernel module compatible with the recently committed modular congestion control framework. CUBIC was designed for provide increased throughput in fast and long-distance networks. It attempts to maintain fairness when competing with legacy NewReno TCP in lower speed scenarios where NewReno is able to operate adequately. The paper "CUBIC: A New TCP-Friendly High-Speed TCP Variant" provides additional detail. In collaboration with: David Hayes <dahayes at swin edu au> and Grenville Armitage <garmitage at swin edu au> Sponsored by: FreeBSD Foundation Reviewed by: rpaulo (older patch from a few weeks ago) MFC after: 3 months
* General cleanup of the NewReno CC module (no functional changes):lstewart2010-12-021-52/+40
| | | | | | | | | | | | - Remove superfluous includes and unhelpful comments. - Alphabetically order functions. - Make functions static. Sponsored by: FreeBSD Foundation MFC after: 9 weeks X-MFC with: r215166
* - Reinstantiate the after_idle hook call in tcp_output(), which got lostlstewart2010-12-022-36/+20
| | | | | | | | | | | | 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
* Set ssthresh appropriately on RTO. This change was accidentally not ported fromlstewart2010-12-021-0/+2
| | | | | | | | | the pre modular CC stack. Sponsored by: FreeBSD Foundation Submitted by: David Hayes <dahayes at swin edu au> MFC after: 9 weeks X-MFC with: r215166
* Pass NULL instead of 0 for the th pointer value. NULL != 0 on all platforms.lstewart2010-12-021-1/+1
| | | | | | Submitted by: David Hayes <dahayes at swin edu au> MFC after: 9 weeks X-MFC with: r215166
* Use time_uptime instead of non-monotonic time_second to drive ARPglebius2010-11-302-6/+6
| | | | | | timeouts. Suggested by: bde
* Fix more continuous/contiguous typos (cf. r215955)brucec2010-11-271-1/+1
|
* Adds new dtrace for cwnd functions and lay'srrs2010-11-255-3/+332
| | | | | | groundwork for future dtrace points (rwnd flightsize etc). MFC after: 2 months
* Redo r166423. It is important not only skip freeing multicastglebius2010-11-241-14/+17
| | | | | entires when underlying interface is detached, but also purge pointers to them, to avoid double-free in future.
* After some off-list discussion, revert a number of changes to thedim2010-11-2222-110/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | DPCPU_DEFINE and VNET_DEFINE macros, as these cause problems for various people working on the affected files. A better long-term solution is still being considered. This reversal may give some modules empty set_pcpu or set_vnet sections, but these are harmless. Changes reverted: ------------------------------------------------------------------------ r215318 | dim | 2010-11-14 21:40:55 +0100 (Sun, 14 Nov 2010) | 4 lines Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined. ------------------------------------------------------------------------ r215317 | dim | 2010-11-14 21:38:11 +0100 (Sun, 14 Nov 2010) | 3 lines Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree. ------------------------------------------------------------------------ r215316 | dim | 2010-11-14 21:23:02 +0100 (Sun, 14 Nov 2010) | 2 lines Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.
* Remove an apparently redundant CURVNET_SET() / CURVNET_RESTORE() pair.zec2010-11-221-2/+0
| | | | MFC after: 3 days
* Fix a minor code redundancy nit.lstewart2010-11-201-3/+1
| | | | MFC after: 3 days
* When enabling or disabling SIFTR with a VIMAGE kernel, ensure we add or removelstewart2010-11-201-12/+24
| | | | | | | | | | | | the SIFTR pfil(9) hook functions to or from all network stacks. This patch allows packets inbound or outbound from a vnet to be "seen" by SIFTR. Additional work is required to allow SIFTR to actually generate log messages for all vnet related packets because the siftr_findinpcb() function does not yet search for inpcbs across all vnets. This issue will be fixed separately. Reported and tested by: David Hayes <dahayes at swin edu au> MFC after: 3 days
* Add new, per connection, statistics for TCP, including:gnn2010-11-175-3/+15
| | | | | | | | | | Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after: 2 weeks
* Add an SCTP socket option to retrieve the number of timeoutstuexen2010-11-163-0/+35
| | | | | | of an association. MFC after: 3 days.
* Make the CC framework more VIMAGE friendly by adding the machinery to allowlstewart2010-11-162-32/+34
| | | | | | | | | | | vnets to select their own default CC algorithm independent of each other and the base system. If the base system or a vnet has set a default which gets unloaded, we reset that netstack's default to NewReno. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub <to.my.trociny at gmail com> Reviewed by: bz (briefly) MFC after: 3 months
* - Querying the default CC algo is more common than setting it and the functionlstewart2010-11-161-3/+2
| | | | | | | | | | is small, so there is no good reason not to declare the buffer at the top. - Fix a whitespace nit. Sponsored by: FreeBSD Foundation MFC after: 11 weeks X-MFC with: r215166
* Move protocol specific implementation detail out of the core CC framework.lstewart2010-11-163-48/+70
| | | | | | | Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub <to.my.trociny at gmail com> MFC after: 11 weeks X-MFC with: r215166
* On CC algorithm module unload, we walk the list of active TCP control blocks.lstewart2010-11-161-24/+35
| | | | | | | | | | | | | | | Any found to be using the algorithm that is about to go away are switched back to NewReno to avoid leaving dangling pointers which would trigger a panic. For VIMAGE kernels, there is a list per vnet to walk, yet the implementation was only examining one of the vnet lists. Fix the implementation of the above feature for VIMAGE kernels by looping through all active TCP control blocks across all vnets. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub <to.my.trociny at gmail com> Reviewed by: bz (briefly) MFC after: 11 weeks
* cc_init() should only be run once on system boot, but with VIMAGE kernels itlstewart2010-11-163-5/+4
| | | | | | | | | | | | | | | | runs on boot and each time a vnet jail is created. Running cc_init() multiple times results in a panic when attempting to initialise the cc_list lock again, and so r215166 effectively broke the use of vnet jails. Switch to using a SYSINIT to run cc_init() on boot. CC algorithm modules loaded on boot register in the same SI_SUB_PROTO_IFATTACHDOMAIN category as is used in this patch, so cc_init() is run at SI_ORDER_FIRST to ensure the framework is initialised before module registration is attempted. Sponsored by: FreeBSD Foundation Reported and tested by: Mikolaj Golub <to.my.trociny at gmail com> MFC after: 11 weeks X-MFC with: r215166
* Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughoutdim2010-11-1422-110/+110
| | | | the tree.
* Take out special code for disable CRC computations ontuexen2010-11-141-9/+3
| | | | | the loopback interface for IPv6. It will be handled by the loopback interface.
* Simplify sctp_delayed_cksum() a bit.tuexen2010-11-141-4/+2
| | | | MFC after: 3 days.
* Fix a locking issue reported by brucec@ affectingtuexen2010-11-131-1/+2
| | | | | | | 1-to-1 style sockets which have not yet been accepted. MFC after: 3 days.
* Add a queue to hold packets while we await an ARP reply.gnn2010-11-122-18/+63
| | | | | | | | | | | | | | | | | | | | | | When a fast machine first brings up some non TCP networking program it is quite possible that we will drop packets due to the fact that only one packet can be held per ARP entry. This leads to packets being missed when a program starts or restarts if the ARP data is not currently in the ARP cache. This code adds a new sysctl, net.link.ether.inet.maxhold, which defines a system wide maximum number of packets to be held in each ARP entry. Up to maxhold packets are queued until an ARP reply is received or the ARP times out. The default setting is the old value of 1 which has been part of the BSD networking code since time immemorial. Expose the time we hold an incomplete ARP entry by adding the sysctl net.link.ether.inet.wait, which defaults to 20 seconds, the value used when the new ARP code was added.. Reviewed by: bz, rpaulo MFC after: 3 weeks
* Don't print an empty line when printing mapping arrays.tuexen2010-11-121-2/+0
| | | | MFC after: 3 days.
* Fix more issues with the SACK/NR-SACK generation code.tuexen2010-11-121-21/+24
| | | | MFC after: 3 days.
* The first customer of the SO_USER_COOKIE option:luigi2010-11-123-0/+37
| | | | | | | | | | | | the "sockarg" ipfw option matches packets associated to a local socket and with a non-zero so_user_cookie value. The value is made available as tablearg, so it can be used as a skipto target or pipe number in ipfw/dummynet rules. Code by Paul Joe, manpage by me. Submitted by: Paul Joe MFC after: 1 week
* This commit marks the first formal contribution of the "Five New TCP Congestionlstewart2010-11-1211-287/+1199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Standardise all Swinburne related copyright/licence statements throughout thelstewart2010-11-123-24/+18
| | | | | tree in preparation for another large code import. Swinburne University is the legal entity that owns copyright and the 2-clause BSD licence is acceptable.
* The university does not require that its CRICOS number be included in sourcelstewart2010-11-123-6/+3
| | | | | | code. Remove all references from the tree. MFC after: 3 days
* Fix the SACK/NR-SACK generation code.tuexen2010-11-111-9/+8
| | | | MFC after: 3 days.
* Fix so that a multicast packet can be sentrrs2010-11-111-5/+4
| | | | | | | | | | | even if there is no route out to that mcast address. The code in in_pcb inadvertantly would error (no route) even though the user may have specified the address with the proper socket option (to specify the egress interface). Thanks bz for reminding me I forgot to commit this ;-) Reviewed by: bz MFC after: 1 week
* Improve the scalability by using the local and remote port whentuexen2010-11-091-30/+33
| | | | | | putting inps in the tcpephash. MFC after: 3 days.
* Fix a bug which resulted in kevent() reporting an event twice ontuexen2010-11-091-0/+1
| | | | | | 1-to-1 style sockets when an ABORT was received. MFC after: 3 days.
* Fix typos.brucec2010-11-094-34/+34
| | | | | PR: bin/148894 Submitted by: olgeni
* Do not have the MTU table twice in the code. Therefore move thetuexen2010-11-074-60/+36
| | | | | | | | function from the timer code to util, rename it appropriately and also fix a bug in sctp_get_prev_mtu(), where calling it with a value existing in the MTU table did not return a smaller one. MFC after: 3 days.
* Remove two functions which are not used.tuexen2010-11-072-27/+0
| | | | MFC after: 3 days.
* * Use exponential backoff for retransmission of SHUTDOWN andtuexen2010-11-071-20/+15
| | | | | | | SHUTDOWN-ACK chunks. * While there, do some cleanups. MFC after: 3 days.
* Not only stop all timers when entering the SHUTDOWN_SENT state,tuexen2010-11-073-25/+28
| | | | | | but also when entering the SHUTDOWN_ACK_SEND state. MFC after: 3 days.
* Do not resend DATA chunks without delay when dropped by the peer andtuexen2010-11-061-0/+4
| | | | | | the CRC was correct. MFC after: 3 days.
* * Fix an accounting bug regarding SACK/NR-SACK chunks.tuexen2010-11-061-56/+22
| | | | | | * Fix the generation of the SACK/NR-SACK gap lists. MFC after: 3 days.
* Don't spam the console with loaded modules during boot and/or duringn_hibma2010-11-031-1/+0
| | | | | | | startup of ppp. Note: This cannot be hidden behind bootverbose as this file is included from lib/libalias as well.
* Don't leak the LLE lock if the arptimer callout is pending or inactive.jhb2010-11-021-3/+3
| | | | | Reported by: David Rhodus MFC after: 1 month
* Remove meaningless XXXXX, that is a remain of comment, removed in r186200.glebius2010-10-291-2/+0
|
* Revert a small part of the r198301, that is entirely unrelated to theglebius2010-10-291-1/+1
| | | | | | | | r198301 itself. It also broke the logic of not sending more than one ARP request per second, that consequently lead to a potential problem of flooding network with broadcast packets. MFC after: 1 week
OpenPOWER on IntegriCloud