summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
Commit message (Collapse)AuthorAgeFilesLines
* Improvements to CC modules:rrs2011-02-261-1/+5
| | | | | | | | | | | 1) Add four new points that allow you to get more information to cc algo's 2) Fix the case where user changes module on a existing TCB, in such a case, the initialization module needs to be called on all nets. 3) Move htcp_cc structure to a union that other modules can use. 4) Add 5th point for get/set socket options for cc_module specific options MFC after: 2 months
* * Cleanup the code computing the retransmission timeout.tuexen2011-02-241-71/+33
| | | | | | * Fix an initialization bug for the scaled variance of the RTO. MFC after: 3 months.
* 1) Typo correction in comments and one spacing change.rrs2011-02-051-3/+2
| | | | | 2) Mass update to all copyrights. MFC after: 3 Months
* Fix several bugs in the stream schedulers.tuexen2011-02-031-1/+1
| | | | | | From Robin Seggelmann. MFC after: 3 months.
* Make sure that changing the ECN sysctl does not affecttuexen2011-02-031-0/+4
| | | | | | exisiting associations and endpoints. MFC after: 3 months.
* 1) Allow a chunk to track the cwnd it was at when sent.rrs2011-02-021-2/+12
| | | | | | | | | | | | | | | | | | | 2) Add separate max-bursts for retransmit and hb. These are set to sysctlable values but not settable via the socket api. This makes sure we don't blast out HB's or fast-retransmits. 3) Determine on the first data transmission on a net if its local-lan (by being under or over a RTT). This can later be used to think about different algorithms based on locallan vs big-i (experimental) 4) The cwnd should NOT be allowed to grow when an ECNEcho is seen (TCP has this same bug). We fix this in SCTP so an ECNe being seen prevents an advance of cwnd. 5) CWR's should not be sent multiple times to the same network, instead just updating the TSN being transmitted if needed. MFC after: 1 Month
* More ECN fixes:rrs2011-01-311-8/+1
| | | | | | | | | | | 1) We now remove ECN-Nonce since it will no longer continue as a I-D 2) Eliminate last_tsn_echo, this tied us to an assoc not the net and thus we were not doing m-homing on the ECN-Echo senders side right. 3) Increment the count going out even if the TSN in lower in the pending ECN-Echo, this way the receiver knows exactly how many packets were marked even with network re-ordering 4) Fix so we DO NOT stop doing delayed sack if a ECN Echo is in queue MFC after: 1 month
* Fixes to ECN in SCTP.rrs2011-01-291-1/+0
| | | | | | | | | | | | | 1) ECN was on an association basis, this is incorrect and will not work with CMT or for that matter if the user is sending to multiple addresses. This commit makes ECN on a per path basis. 2) Adopt the new format for the ECN internet draft. This also maintains compatability with old format chunks as well. 3) Keep track of the real time of a RTT down to micro seconds. For some future conditional features (for like a data center this is good information to have). MFC after: 1 month
* Keep track of the real last RTT on each net.rrs2011-01-281-0/+7
| | | | | | | | | This will be used for Data Center congestion control, we won't want to engage it in the ECN code unless we KNOW that the RTT is less than 500us. MFC after: 1 week
* Add stream scheduling support.tuexen2011-01-231-3/+7
| | | | | | This work is based on a patch received from Robin Seggelmann. MFC after: 3 months.
* Remove unnecessary checking of variable.tuexen2011-01-231-12/+2
| | | | MFC after: 3 months.
* Cleanup the management of CC functions.tuexen2011-01-191-57/+8
| | | | MFC after: 3 months.
* Code cleanup: Use LIST_FOREACH, LIST_FOREACH_SAFE, TAILQ_FOREACH,tuexen2010-12-301-81/+55
| | | | | | | TAILQ_FOREACH_SAFE where appropriate. No functional change. MFC after: 3 months.
* 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.
* Don't print an empty line when printing mapping arrays.tuexen2010-11-121-2/+0
| | | | 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.
* Do not have the MTU table twice in the code. Therefore move thetuexen2010-11-071-17/+32
| | | | | | | | 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.
* Not only stop all timers when entering the SHUTDOWN_SENT state,tuexen2010-11-071-20/+25
| | | | | | but also when entering the SHUTDOWN_ACK_SEND state. MFC after: 3 days.
* Remove old debug code.tuexen2010-09-151-8/+0
| | | | MFC after: 2 weeks.
* Remove unused variable/assignment.tuexen2010-09-151-3/+1
| | | | MFC after: 3 weeks.
* Delay the assignment of a path for DATA chunk until they hittuexen2010-09-151-4/+7
| | | | | | | the sent_queue. Honor a given path when the SCTP_ADDR_OVER flag is set. MFC after: 2 weeks.
* Fix some CLANG warnings. One clang warning is leftrrs2010-09-051-3/+5
| | | | | | due to the fact that its bogus.. nam->sa_family will not change from AF_INET6 to AF_INET (but clang thinks it does ;-D)
* Fix the switching on/off of CMT using sysctl and socket option.tuexen2010-08-281-4/+2
| | | | | | | | Fix the switching on/off of PF and NR-SACKs using sysctl. Add minor improvement in handling malloc failures. Improve the address checks when sending. MFC after: 4 weeks
* This fixes a crash in SCTP. It was possible to have arrs2010-07-031-4/+10
| | | | | | | | | | | | large number of packets queued to a crashing process. In a specific case you may get 2 ABORT's back (from say two packets in flight). If the aborts happened to be processed at the same time its possible to have one free the association while the other is trying to report all the outbound packets. When this occured it could lead to a crash. MFC after: 3 days
* Fix a rece condition in the shutdown handling.tuexen2010-06-181-0/+20
| | | | | | The race condition resulted in a panic. MFC after: 3 days
* 3 Fixes -rrs2010-06-111-4/+14
| | | | | | | | | | | | | | | a) There was a case where a ICMP message could cause us to return leaving a stuck lock on an stcb. b) The iterator needed some tweaks to fix its lock ordering. c) The ITERATOR_LOCK is no longer needed in the freeing of a stcb. Now that the timer based one is gone we don't have a multiple resume situation. Add to that that there was somewhere a path out of the freeing of an assoc that did NOT release the iterator_lock.. it was time to clean this old code up and in the process fix the lock bug. MFC after: 1 week
* Ok, yet another bug in killing off all the hundredsrrs2010-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | of apitesters.. Basically we end up with attempting to destroy a lock thats contended on. A cookie echo arrives at the same time that the close is happening. The close gets the lock but the cookie echo has already passed the check for the gone flag and is then locked waiting on the create lock.. when we go to destroy it bam. For now we do the timer destroy for all calls to close.. We can probably optimize this later so that we check whats being contended on and if there is contention then do the timer thing. but this is probably safest since the inp has been removed from all lists and references and only the timer can find it.. once the locks are released all other places will instantly see the GONE flag and bail (thats what the change in sctp_input is one place that was lacking the bail code). MFC after: 1 week
* Fix a bug in sctp_abort_assoc(). DON'T call the sctp_inpcb_freerrs2010-06-061-7/+0
| | | | | | | when the gone flag is set. You don't know what locks the caller has set and there is already a kill timer running. MFC after: 1 week
* Purge out a Windows def that somehow slippedrrs2010-06-051-7/+1
| | | | | | past the scrubber. MFC after: 1 Week
* This adds back the Iterator to the sctprrs2010-05-161-54/+46
| | | | | | | | | code base. We now properly have ONE thread that services all VNET's. Also we purge out the old timer based iterator code which had multiple LOR's and other issues. MFC after: 3 days
* * Fix compilation when using SCTP_AUDITING_ENABLED.tuexen2010-04-231-3/+3
| | | | | | | | | * Fix delaying of SACK by taking out old optimization code which does not optimize anymore. * Fix fast retransmission of chunks abandoned by the "number of retransmissions" policy. MFC after: 3 days.
* Really print the nr_mapping array when it should be printed.`tuexen2010-04-201-1/+1
| | | | MFC after: 3 days.
* Fix a off-by-one bug in zeroing out the mapping arrays.tuexen2010-04-061-30/+16
| | | | | | Fix sctp_print_mapping_array(). MFC after: 1 week
* * Fix some race condition in SACK/NR-SACK processing.tuexen2010-04-031-57/+36
| | | | | | | | * Fix handling of mapping arrays when draining mbufs or processing FORWARD-TSN chunks. * Cleanup code (no duplicate code anymore for SACKs and NR-SACKs). Part of this code was developed together with rrs. MFC after: 2 weeks.
* Fix for NR-Sack code. The code was NOT working properly whenrrs2010-03-241-5/+35
| | | | | | | | | | | | | enabled. Basically most of the operations were incorrect causing bad sacks when you enabled nr-sack. The fixes range across 4 files and unifiy most of the processing so that we only test nr_sack flags to decide which type of sack to generate. Optimization left for this is to combine the sack generation code and make it capable of generating either sack thus shrinking out a routine. Reviewed by: tuexen@freebsd.org
* Fixes a bug where SACKs in the face ofrrs2010-03-231-14/+33
| | | | | | | | | | | | | | | | mapping_array expansion would break. Basically once we expanded the array we no longer had both mapping arrays in sync which the sack processing code depends on. This would mean we were randomly referring to memory that was probably not there. This mostly just gave us bad sack results going back to the peer. If INVARIENTS was on of course we would hit the panic routine in the sack_check call. We also add a print routine for the place where one would panic in invarients so one can see what the main mapping array holds. Reviewed by: tuexen@freebsd.org MFC after: 2 weeks
* * Fix another u_long -> uint32_t issue.tuexen2010-02-191-4/+1
| | | | | | | | * Remove an unused global variable. * Fix an issue reported by Bruce Cran related to reusing SCTP socket which where connected. MFC after: 1 week
* Pulls out another leaked windows ifdef that somehowrrs2010-01-171-6/+0
| | | | made its way through the scrubber.
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Get rid of unused fields addr_over which is never really used,tuexen2009-11-171-1/+0
| | | | | | only copied around. Approved by: rrs (mentor)
* Do not hold the lock longer than necessary.tuexen2009-11-171-1/+1
| | | | | Approved by: rrs (mentor) MFC after: 1 month
* Get SCTP working in combination with VIMAGE.tuexen2009-09-191-0/+10
| | | | | | Contains code from bz. Approved by: rrs (mentor) MFC after: 1 month.
* Fix a bug in the handling of unreliable messagestuexen2009-08-191-5/+9
| | | | | | | which results in stalled associations. Approved by: re, rrs (mentor) MFC after: immediately
* * Fix a bug where PR-SCTP settings are ignore when using implicittuexen2009-08-151-18/+72
| | | | | | | | | | | | | | | association setup. * Fix a bug where message with illegal stream ids are not deleted. * Fix a crash when reporting back unsent messages from the send_queue. * Fix a bug related to INIT retransmission when the socket is already closed. * Fix a bug where associations were stalled when partial delivery API was enabled. * Fix a bug where the receive buffer size was smaller than the partial_delivery_point. Approved by: re, rrs (mentor) MFC after: One day.
* Turns out that when a receiver forwards through its TNS's therrs2009-07-281-12/+21
| | | | | | | | | | | | | | | processing code holds the read lock (when processing a FWD-TSN for pr-sctp). If it finds stranded data that can be given to the application, it calls sctp_add_to_readq(). The readq function also grabs this lock. So if INVAR is on we get a double recurse on a non-recursive lock and panic. This fix will change it so that readq() function gets a flag to tell if the lock is held, if so then it does not get the lock. Approved by: re@freebsd.org (Kostik Belousov) MFC after: 1 week
* Add a missing unlock for the inp lock whentuexen2009-07-261-0/+1
| | | | | | | returning early from sctp_add_to_readq(). Approved by: re, rrs (mentor) MFC after: 2 weeks.
* Fix a small memory leak from the nr-sack code - the mapping arrayrrs2009-05-301-22/+6
| | | | | was not being freed at term of association. Also get rid of the MICHAELS_EXP code.
* Many bug fixes (from the IETF hack-fest):rrs2009-04-041-35/+27
| | | | | | | | | | | | | | | | - PR-SCTP had major issues when skipping through a multi-part message. o Did not look at socket buffer. o Did not properly handle the reassmebly queue. o The MARKED segments could interfere and un-skip a chunk causing a problem with the proper FWD-TSN. o No FR of FWD-TSN's was being done. - NR-Sack code was basically disabled. It needed fixes that never got into the real code. - CMT code had issues when the two paths were NOT the same b/w. We found a few small bugs, but also the critcal one here was not dividing the rwnd amongst the paths. Obtained from: Michael Tuexen and myself at the IETF hack-fest ;-)
* Fixes several PR-SCTP releated bugs.rrs2009-03-141-49/+156
| | | | | | | | - When sending large PR-SCTP messages over a lossy link we would incorrectly calculate the fwd-tsn - When receiving large multipart pr-sctp packets we would incorrectly send back a SACK that would renege improperly on already received packets thus causing unneeded retransmissions.
* Add the add-stream capability. Still needs morerrs2009-02-201-1/+68
| | | | | | testing.. MFC after: 1 month
OpenPOWER on IntegriCloud