summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Bugfix: Make sure that the COMM_UP notificatin is delivered first alsotuexen2011-01-021-5/+18
| | | | | | on the passive side. MFC after: 3 days.
* Fix a typo.tuexen2011-01-011-1/+1
| | | | MFC after: 3 months.
* Try to catch a possible divide-by-zero as early as possible if "mtu" is 0bz2010-12-311-0/+3
| | | | | | | | | (also test for negative MTUs if checking it anyway). An MTU of 0 is arguably a bug elsewhere, but this at least gives us some more debugging hints. Sponsored by: ISPsystem (Early 2010) MFC after: 1 week
* Define and use SCTP_SSN_GE, SCTP_SSN_GT, SCTP_TSN_GE, SCTP_TSN_GT macrostuexen2010-12-307-210/+125
| | | | | | | and use them instead of the generic compare_with_wrap. Retire compare_with_wrap. MFC after: 3 months.
* Code cleanup: Use LIST_FOREACH, LIST_FOREACH_SAFE, TAILQ_FOREACH,tuexen2010-12-309-738/+439
| | | | | | | TAILQ_FOREACH_SAFE where appropriate. No functional change. MFC after: 3 months.
* Fix three bugs related to the sequence number wrap-around affectingtuexen2010-12-303-3/+3
| | | | | | | the processing of ECNE and ASCONF chunks. Reviewed by: rrs MFC after: 3 days.
* Add a comment for the ccv member of struct tcpcb.lstewart2010-12-281-1/+1
| | | | | | Sponsored by: FreeBSD Foundation MFC after: 5 weeks X-MFC with: r215166
* - Add some helper hook points to the TCP stack. The hooks allow Khelp modules tolstewart2010-12-284-0/+97
| | | | | | | | | | | | | | | | | | | | 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
* Add a new sack hint to track the most recent and highest sacked sequence number.lstewart2010-12-282-0/+2
| | | | | | | | | This will be used by the incoming Enhanced RTT Khelp module. Sponsored by: FreeBSD Foundation Submitted by: David Hayes <dahayes at swin edu au> Reviewed by: bz and others (as part of a larger patch) MFC after: 3 months
* Fix a whitespace nit introduced in r215166.lstewart2010-12-281-1/+1
| | | | | | | Sponsored by: FreeBSD Foundation Spotted by: bz MFC after: 5 weeks X-MFC with: r215166
* Remove comment bemoaning the lack of an INP_INHASHLIST above in_pcbdrop();rwatson2010-12-271-6/+0
| | | | | | | I fixed this in r189657 in early 2009, so the comment is OBE. Reviewed by: bz MFC after: 3 days
* Provide a possibility to configure the inital congestion window to thetuexen2010-12-222-9/+13
| | | | | | value defined in RFC 4960. MFC after: 3 months.
* Improve plausibility check in sctp_handle_sack().tuexen2010-12-227-79/+68
| | | | | | Allow cmt_on_off to support values 0 (no CMT), 1 (CMT), and 2 (CMT/RP). MFC after: 3 months.
* Fix a typo in a comment.jhb2010-12-211-1/+1
| | | | MFC after: 1 week
* Fix a flightsize bug related to the processing of PKTDRP reports.tuexen2010-12-171-1/+1
| | | | MFC after: 3 days.
* Bugfix: Take also the nr-mapping array into account when detectingtuexen2010-12-162-10/+14
| | | | | | | gaps. Reviewed by: rrs@ MFC after: 3 days.
* Add a missing cast. Reported by blade_ly at yahoo.com.cn.tuexen2010-12-161-1/+1
| | | | MFC after: 1 day.
* Bring back (most of) NATM to avoid further bitrot after r186119.bz2010-12-151-0/+6
| | | | | | | | Keep three lines disabled which I am unsure if they had been used at all. This will allow us to seek testers and possibly bring it all back. Discussed with: rwatson MFC after: 7 weeks
* 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
OpenPOWER on IntegriCloud