summaryrefslogtreecommitdiff
path: root/net/sctp/ulpqueue.c
AgeCommit message (Collapse)Author
2007-10-23[SCTP]: Consolidate sctp_ulpq_renege_xxx functionsPavel Emelyanov
Both are equal, except for the list to be traversed. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[SCTP]: Rewrite of sctp buffer management codeNeil Horman
This patch introduces autotuning to the sctp buffer management code similar to the TCP. The buffer space can be grown if the advertised receive window still has room. This might happen if small message sizes are used, which is common in telecom environmens. New tunables are introduced that provide limits to buffer growth and memory pressure is entered if to much buffer spaces is used. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-29SCTP: properly clean up fragment and ordering queues during FWD-TSN.Vlad Yasevich
When we recieve a FWD-TSN (meaning the peer has abandoned the data), we need to clean up any partially received messages that may be hanging out on the re-assembly or re-ordering queues. This is a MUST requirement that was not properly done before. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com.>
2007-04-25[NET]: cleanup extra semicolonsStephen Hemminger
Spring cleaning time... There seems to be a lot of places in the network code that have extra bogus semicolons after conditionals. Most commonly is a bogus semicolon after: switch() { } Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[SCTP]: Implement SCTP_PARTIAL_DELIVERY_POINT option.Vlad Yasevich
This option induces partial delivery to run as soon as the specified amount of data has been accumulated on the association. However, we give preference to fully reassembled messages over PD messages. In any case, window and buffer is freed up. Signed-off-by: Vlad Yasevich <vladislav.yasevich@.hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[SCTP]: Implement SCTP_FRAGMENT_INTERLEAVE socket optionVlad Yasevich
This option was introduced in draft-ietf-tsvwg-sctpsocket-13. It prevents head-of-line blocking in the case of one-to-many endpoint. Applications enabling this option really must enable SCTP_SNDRCV event so that they would know where the data belongs. Based on an earlier patch by Ivan Skytte Jørgensen. Additionally, this functionality now permits multiple associations on the same endpoint to enter Partial Delivery. Applications should be extra careful, when using this functionality, to track EOR indicators. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-18[SCTP]: Do not interleave non-fragments when in partial deliveryVlad Yasevich
The way partial delivery is currently implemnted, it is possible to intereleave a message (either from another steram, or unordered) that is not part of partial delivery process. The only way to this is for a message to not be a fragment and be 'in order' or unorderd for a given stream. This will result in bypassing the reassembly/ordering queues where things live duing partial delivery, and the message will be delivered to the socket in the middle of partial delivery. This is a two-fold problem, in that: 1. the app now must check the stream-id and flags which it may not be doing. 2. this clearing partial delivery state from the association and results in ulp hanging. This patch is a band-aid over a much bigger problem in that we don't do stream interleave. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20[SCTP]: Clean up stale data during association restartVlad Yasevich
During association restart we may have stale data sitting on the ULP queue waiting for ordering or reassembly. This data may cause severe problems if not cleaned up. In particular stale data pending ordering may cause problems with receive window exhaustion if our peer has decided to restart the association. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-10[NET] SCTP: Fix whitespace errors.YOSHIFUJI Hideaki
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-10-11[SCTP]: Fix receive buffer accounting.Vlad Yasevich
When doing receiver buffer accounting, we always used skb->truesize. This is problematic when processing bundled DATA chunks because for every DATA chunk that could be small part of one large skb, we would charge the size of the entire skb. The new approach is to store the size of the DATA chunk we are accounting for in the sctp_ulpevent structure and use that stored value for accounting. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-05[SCTP]: Prevent possible infinite recursion with multiple bundled DATA.Vladislav Yasevich
There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user data buffer is smaller that the full data message. The problem is that we clone the skb for every fragment in the message. When reassembling the full message, we try to link skbs from the "first fragment" clone using the frag_list. However, since the frag_list is shared between two clones in this rare situation, we end up setting the frag_list pointer of the second fragment to point to itself. This causes sctp_skb_pull() to potentially recurse indefinitely. Proposed solution is to make a copy of the skb when attempting to link things using frag_list. Signed-off-by: Vladislav Yasevich <vladsilav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-10-08[PATCH] gfp flags annotations - part 1Al Viro
- added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-29[NET]: Kill skb->listDavid S. Miller
Remove the "list" member of struct sk_buff, as it is entirely redundant. All SKB list removal callers know which list the SKB is on, so storing this in sk_buff does nothing other than taking up some space. Two tricky bits were SCTP, which I took care of, and two ATM drivers which Francois Romieu <romieu@fr.zoreil.com> fixed up. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2005-07-11[SCTP]: __nocast annotationsAlexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-14[SCTP] merge sctp_sock with sctp_optArnaldo Carvalho de Melo
No need for two structs, follow the new inet_sock layout style. Also introduce inet_sk_copy_descendant, to copy just the inet_sock descendant specific area from one sock to another. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-12-26[SCTP] Code cleanup: remove unused code and make needlessly global code staticSridhar Samudrala
Signed-off-by: Adrian Bunk <bunk@stutsa.de> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-20Merge bk://bk.skbuff.net:20608/linux-2.6-snmp-20040708David S. Miller
into nuts.davemloft.net:/disk1/BK/snmp-2.6
2004-07-11[SPARSE]: Fix warnings in net/sctp/Andrew Morton
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[NET] convert storage for MIB from struct member to array item.Hideaki Yoshifuji
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-05-03[SCTP] Fix memset() parameter ordering.Sridhar Samudrala
2004-04-18[SCTP] Partial Reliability Extension support.Sridhar Samudrala
2004-04-05[SCTP] Update sctp_ulpevent structure to include assoc pointer andSridhar Samudrala
only the receive specific fields of sctp_sndrcvinfo.
2003-07-10[SCTP] Fix for panic on recvmsg() with MSG_PEEK flag and some ulpeventSridhar Samudrala
cleanup.
2003-07-03[SCTP] Move rwnd accounting and I/O redrive off of the skb destructor.Jon Grimm
When the skb was shared with Ethereal, Ethereal was sometimes the last user and the destructor would get called on another CPU, not knowing anything about our sock_lock. Move our rwnd updates and I/O redrive out of the skb destructor. Also, if unable to allocate an skb for our transmission packet, walk the packet's chunks and free the control chunks. Also change list_dels to list_del_init. Fix real later, but this prevent us from a doing damage if we list_del twice.
2003-06-04o net: create struct sock_common and use in struct sock & tcp_tw_bucketArnaldo Carvalho de Melo
With this the data dependency is reduced to just making sure that the first member of both struct sock and struct tcp_tw_bucket are a struct sock_common. Also makes it easier to grep for struct sock and struct tcp_tw_bucket usage in the tree as all the members in those structs are prefixed, respectively, with sk_ and tw_, like struct inode (i_), struct block_device (bd_), etc. Checked namespace with make tags/ctags, just one colision with the macros for the struct sock members, with a wanrouter struct, fixed that s/sk_state/state_sk/g in the wanrouter struct. Checked as well if the names of the members in both structs collided with some macro, none found.
2003-05-27o net: abstract access to struct sock ->flagsArnaldo Carvalho de Melo
This makes: 1. simpler primitive to access struct sock flags, shorter 2. we check if the flag is valid by using enum sock_flags 3. we can change the implementation to an open coded bit operations if it proves to be faster than the more general bit manipulation routines now used, i.e. we only have to change sock.h, not the whole net tree like now
2003-04-16[SCTP] More typedef removals.Jon Grimm
Continue typedef removal. Also, change sctp_chunk.num_times_sent counter to a resent flag. There was a rather obscure, unlikely, and in the end fairly benign bug sitting there if num_times_sent wrapped. However, there's no need to keep this counter, as its use was really just to know if we'd ever resent this chunk.
2003-04-10[SCTP] short-circuit reassembly & ordering for best case.Jon Grimm
Short circuit normal case. First check if the chunk belongs at the end of the queue. If so, don't bother walking the entire list, just just put at end.
2003-04-09[SCTP] Various code cleanup.Jon Grimm
More typedef removals and naming consistency. Remove sctp_association_t, sctp_endpoint_t, & sctp_endpoint_common_t.
2003-03-19Merge http://linux-lksctp.bkbits.net/lksctp-2.5David S. Miller
into nuts.ninka.net:/home/davem/src/BK/net-2.5
2003-03-05Merge us.ibm.com:/home/sridhar/BK/linux-2.5.64Sridhar Samudrala
into us.ibm.com:/home/sridhar/BK/lksctp-2.5.64
2003-03-02Merge us.ibm.com:/home/sridhar/BK/lksctp-2.5.workSridhar Samudrala
into us.ibm.com:/home/sridhar/BK/lksctp-2.5.63
2003-03-02[SCTP] accept() support for TCP-style SCTP sockets.Sridhar Samudrala
2003-03-02[NET]: Convert volatile char socket flags to real bitops mask, work by Pedro ↵James Morris
Hortas.
2003-03-02Resolve conflicts.David S. Miller
2003-02-28Merge http://linux-lksctp.bkbits.net/lksctp-2.5-01Jon Grimm
into touki.austin.ibm.com:/home/jgrimm/bk/lksctp-2.5.work
2003-02-28[SCTP] Only consider C-E bundling up until C-E has been sent.Jon Grimm
Yes, it is _that_ obvious. If someone does a connect (its not required, but one can) the C-E may have already been sent by the time the first DATA is available. Don't calculate in the C-E bundling overhead if we've already sent the C-E.
2003-02-26MergeSridhar Samudrala
2003-02-18[PATCH] spelling fix for propogate -> propagateSteven Cole
This patch provides the following spelling fix. propogate -> propagate
2003-02-18[SCTP] Renege to make room for CTSN+1 chunk. Jon Grimm
If our receive buffer is full, but this is the most important TSN to receive, make room by reneging less important TSNs. Only renege if there is a gap and this is the next TSN to fit in the gap.
2003-02-11[SCTP] Merge mib statistics changes with partial delivery changes.Sridhar Samudrala
2003-02-11[SCTP] sctp mib statistics update/display support.Sridhar Samudrala
2003-02-11[SCTP] Partial Data DeliveryJon Grimm
Support pushing a partial record up to the application if we are receiving pressure on rwnd. The most common case is that the sender is sending a record larger than our rwnd. We send as much up the receive queue in hopes that a read will occur up room in rwnd. Other associations on the socket need held off until the partial delivery condition is finally fufilled (or ABORTed). Additionally, one must be careful to "do the right thing" with regards to associations peeled off to new sockets, properly preserving or clearing the partial delivery state.
2003-02-06[SCTP] Minor surgery on ulpevent & related cleanups.Jon Grimm
sndrcvinfo.sinfo_cumtsn is new field added by the latest (05) API I-D. Remove unused fields in ulpevent, minimally to make room for for storing this new field. But I'll clear out even more so I can make room for impending partial data delivery work. See changes in comments for ulpqueue.c. Many naming and typedef removal cleanups.
2003-01-17[SCTP] Fix hardcoded stream counts.Jon Grimm
Code had hardcoded limits to the maximum stream that could be used, and consequent static data structures. Now dynamically allocate storage for the SSN maps until _after_ we know what they are. Protocols such as SIP want to use all possible streams.
2003-01-09[SCTP] Handle non-linear ip re-assembled skb's in sctp_rcv()Sridhar Samudrala
2002-09-25SCTP: Resync with LKSCTP tree.Jon Grimm
sctp: one more list_t removal. sctp: more whitespace cleanup (jgrimm) sctp: merge with linux bk tree sctp: Minor ABORT updates (ardelle.fan) sctp: Fix misc. COOKIE-ECHO bundling bugs. (jgrimm) There were small windows where the following could occur. -Two DATA chunks bundled with COOKIE-ECHO (only 1 allowed.) -DATA bundled with lost COOKIE-ECHO needs resent too. -DATA sent while in COOKIE-ECHOED if there had not been control data already bundled. sctp: more updates for abort (jgrimm and ardelle.fan) Cleanup T5 upon abort. Send COMM_LOST notification to ULP upon abort. sctp: updates to T5 shutdown timer. (samudrala) I missed a couple changes from Sridhar's last patch. sctp: more ABORT, cleanup shutdown timers (ardelle.fan) When we send or receive an ABORT, there may be a variety of timers running. Turn these timers off when we abort. sctp: Fix bug in COOKIE-ECHO retransmission. (jgrimm) We had saved away the pointer directly to the INIT-ACK state cookie param, but upon COOKIE ECHO retransmission, this skb has already been thrown away. The fix is to save away the cookie. sctp: Unknown chunk processing. (daisyc) Each chunkheader contains the chunk type. For forward compatiblity, 'action' bits in the type describe what action the peer requests if one does not understand that chunk type. This patch is to implement the handling of those 'unrecognized chunk' actions. sctp: Add T5 shutdown guard handling. (samudrala) The T5-shutdown-guard timer is used to bound the time we are willing to try gracefully shutting down. This protects against certain pathological peers. sctp: Add msg_name support for notifications and PF_INET sockets. (jgrimm)
2002-08-29[SCTP]: Rename sctp_foo.[ch] to foo.[ch] and kill CVS tags on authors request.David S. Miller