summaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_lock_bsd.h
Commit message (Collapse)AuthorAgeFilesLines
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* netinet/sctp*: minor spelling fixes in comments.Pedro F. Giffuni2016-05-021-1/+1
| | | | | | | | | No functional change. Reviewed by: tuexen Notes: svn path=/head/; revision=298942
* Use consistent text at the begining of the files.Michael Tuexen2012-05-231-7/+8
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=235828
* 1) Typo correction in comments and one spacing change.Randall Stewart2011-02-051-0/+2
| | | | | | | | 2) Mass update to all copyrights. MFC after: 3 Months Notes: svn path=/head/; revision=218319
* Adds an experimental option to create a pool ofRandall Stewart2011-02-031-0/+42
| | | | | | | | | | | | threads. These serve as input threads and are queued packets based on the V-tag number. This is similar to what a modern card can do with queue's for TCP... but alas modern cards know nothing about SCTP. MFC after: 3 months (maybe) Notes: svn path=/head/; revision=218211
* 1) Optimize the cleanup and don't always depend onRandall Stewart2010-06-061-0/+7
| | | | | | | | | | | | | | | | the timer. This is done by considering the locks we will destroy and if they are contended we consider it the same as a reference count being up. Fixing this appears to cleanup another crash that was appearing with all the timers where the socket buf lock got corrupted. 2) Fix the sysctl code to take a lot more care when looking at INP's that are in the GONE or ALLGONE state. MFC after: 1 week Notes: svn path=/head/; revision=208879
* This adds back the Iterator to the sctpRandall Stewart2010-05-161-17/+31
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=208160
* - Make strict-sacks be the default.Randall Stewart2008-08-281-2/+8
| | | | | | | | | | - Change it so that without INVARIANTs there are no panics in SCTP. - sctp_timer changes so that we have a recovery mechanism when the sent list is out of order. Notes: svn path=/head/; revision=182367
* - Fixes foobar on my part. Some missing virtualization macros fromRandall Stewart2008-06-141-4/+4
| | | | | | | specific logging cases. Notes: svn path=/head/; revision=179786
* - Macro-izes the packed declaration in all headers.Randall Stewart2008-06-141-46/+46
| | | | | | | | | | | | | | | | | | | | | - Vimage prep - these are major restructures to move all global variables to be accessed via a macro or two. The variables all go into a single structure. - Asconf address addition tweaks (add_or_del Interfaces) - Fix rwnd calcualtion to be more conservative. - Support SACK_IMMEDIATE flag to skip delayed sack by demand of peer. - Comment updates in the sack mapping calculations - Invarients panic added. - Pre-support for UDP tunneling (we can do this on MAC but will need added support from UDP to get a "pipe" of UDP packets in. - clear trace buffer sysctl added when local tracing on. Note the majority of this huge patch is all the vimage prep stuff :-) Notes: svn path=/head/; revision=179783
* - Adds support for the multi-asconf (From Kozuka-san)Randall Stewart2008-05-201-4/+4
| | | | | | | | | | | | | | | | | | | | | - Adds some prepwork (Not all yet) for vimage in particular support the delete the sctppcbinfo.xx structs. There is still a leak in here if it were to be called plus we stil need the regrouping (From Me and Michael Tuexen) - Adds support for UDP tunneling. For BSD there is no socket yet setup so its disabled, but major argument changes are in here to emcompass the passing of the port number (zero when you don't have a udp tunnel, the default for BSD). Will add some hooks in UDP here shortly (discussed with Robert) that will allow easy tunneling. (Mainly from Peter Lei and Michael Tuexen with some BSD work from me :-D) - Some ease for windows, evidently leave is reserved by their compile move label leave: -> out: MFC after: 1 week Notes: svn path=/head/; revision=179157
* - The address lock is changed to a rwlock. ThisRandall Stewart2007-09-181-11/+30
| | | | | | | | | | | | | | | | also involves macro changes to have a RLOCK and a WLOCK and placing the correct version within the code. - The INP-INFO lock is changed to a rwlock. - When sctp_shutdown() is called on Mac OS X, the socket lock is held. So call sctp_chunk_output with SCTP_SO_LOCKED and not SCTP_SO_NOT_LOCKED. - Add SCTP_IPI_ADDR_[RW]LOCK and SCTP_IPI_ADDR_[RW]UNLOCK for Mac OS X. - u_int64_t -> uint64_t - add missing addr unlock for error return path Approved by: re@freebsd.org (K Smith) Notes: svn path=/head/; revision=172218
* - Locking compatiability changes. This involves addingRandall Stewart2007-09-081-0/+6
| | | | | | | | | | | | | | additional flags to many function calls. The flags only get used in BSD when we compile with lock testing. These flags allow apple to escape the "giant" lock it holds on the socket and have more fine-grained locking in the NKE. It also allows us to test (with witness) the locking used by apple via a compile switch (manually applied). Approved by: re@freebsd.org(B Mah) Notes: svn path=/head/; revision=172090
* - Fix so ifn's are properly deleted when the ref count goes to 0.Randall Stewart2007-06-141-13/+4
| | | | | | | | | | | | | - Fix so VRF's will clean themselves up when no references are around. - Allow sctp_ifa to be passed into inpcb_bind, addr_mgmt_ep_sa to bypass normal validation checks. - turn auto-asconf off for subset bound sockets - Moves all logging to use KTR. This gets rid of most of the logging #ifdef's with a few exceptions reducing the number of config options for SCTP. Notes: svn path=/head/; revision=170744
* - Fixes so we won't try to start a timer when weRandall Stewart2007-05-291-0/+13
| | | | | | | | | | | | | hold a wq lock for the iterator. Panda uses a silly recursive lock they hold through the timer. - Add poor mans wireshark compile option.. - Allocate and start using SCTP_M_XXX for all SCTP_MALLOC() calls. - sysctl now will get back the refcnt for viewing by onlookers. Reviewed by: gnn Notes: svn path=/head/; revision=170091
* - Copyright change, cisco's silly tool wants it to say:Randall Stewart2007-05-081-1/+1
| | | | | | | | | | | "Copyright (c) 2001-2007, by Cisco Systems," instead of *Copyright (c) 2001-2007, Cisco Systems," - Also fix a few straglers that were still in 2006. Notes: svn path=/head/; revision=169382
* - More work on making send lock contention.Randall Stewart2007-04-191-11/+8
| | | | | | | | | | | | | | | | | | | | | | | - Removed free-oqueue cache. - Fix counter for sq entries - Increased the amount of information retained on ASOC_TSN logging on the association. - Made it so with the ASOC_TSN logging on sending or recieving an abort we dump the log. - Went through and added invariant's around some panic's that needed them. - decrements went to atomic_subtact_int instead of add -1 - Removed residual count increment that threw off a strm oq count. - Tracks and complaints if we don't have a LAST fragment and clean up the sp structure. - Track a new stat that counts number of abandoned msgs that happen if you close without reading. - Fix lookup of frag point to be aware of a 0 assoc-id. Reviewed by: gnn Notes: svn path=/head/; revision=168859
* - Sysctl's move to seperate fileRandall Stewart2007-03-151-29/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - moved away from ifn/ifa access to sctp_ifa/sctp_ifn built and managed by the add-ip code. - cleaned up add-ip code to use the iterator - made iterator be a thread, which enables auto-asconf now. - rewrote and cleaned up source address selection (also made it use new structures). - Fixed a couple of memory leaks. - DACK now settable as to how many packets to delay as well as time. - connectx() to latest socket API, new associd arg. - Fixed issue with revoking and loosing potential to send when we inflate the flight size. We now inflate the cwnd too and deflate it later when the revoked chunk is sent or acked. - Got rid of some temp debug code - src addr selection moved to a common file (sctp_output.c) - Support for simple VRF's (we have support for multi-vfr via compile switch that is scrubbed from BSD but we won't need multi-vrf until we first get VRF :-D) - Rest of mib work for address information now done - Limit number of addresses in INIT/INIT-ACK to a #def (30). Reviewed by: gnn Notes: svn path=/head/; revision=167598
* 1) Fixes on a number of different collision case LOR's.Randall Stewart2006-12-141-0/+32
| | | | | | | | | | | 2) Fix all "magic numbers" to be constants. 3) A collision case that would generate two associations to the same peer due to a missing lock is fixed. 4) Added tracking of where timers are stopped. Approved by: gnn Notes: svn path=/head/; revision=165220
* Opps... in my fix up of all the $FreeBSD:$-> $FreeBSD$ IRandall Stewart2006-11-031-1/+1
| | | | | | | | | | | | | inserted a few to the new files.. but I falied to add the #include <sys/cdef.h> Which causes a compile error.. sorry about that... got it now :-) Approved by:gnn Notes: svn path=/head/; revision=163954
* Ok, here it is, we finally add SCTP to current. Note that thisRandall Stewart2006-11-031-0/+355
work is not just mine, but it is also the works of Peter Lei and Michael Tuexen. They both are my two key other developers working on the project.. and they need ata-boy's too: **** peterlei@cisco.com tuexen@fh-muenster.de **** I did do a make sysent which updated the syscall's and sysproto.. I hope that is correct... without it you don't build since we have new syscalls for SCTP :-0 So go out and look at the NOTES, add option SCTP (make sure inet and inet6 are present too) and play with SCTP. I will see about comitting some test tools I have after I figure out where I should place them. I also have a lib (libsctp.a) that adds some of the missing socketapi functions that I need to put into lib's.. I will talk to George about this :-) There may still be some 64 bit issues in here, none of us have a 64 bit processor to test with yet.. Michael may have a MAC but thats another beast too.. If you have a mac and want to use SCTP contact Michael he maintains a web site with a loadable module with this code :-) Reviewed by: gnn Approved by: gnn Notes: svn path=/head/; revision=163953