From 62603506c4716dfaf4d6947af066f67b1164b823 Mon Sep 17 00:00:00 2001 From: Jon Grimm Date: Tue, 11 Feb 2003 13:54:48 -0600 Subject: [SCTP] Partial Data Delivery 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. --- include/net/sctp/ulpqueue.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include/net/sctp/ulpqueue.h') diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index 689abb810eb2..dd7823b0a737 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h @@ -48,7 +48,8 @@ /* A structure to carry information to the ULP (e.g. Sockets API) */ struct sctp_ulpq { - int malloced; + char malloced; + char pd_mode; sctp_association_t *asoc; struct sk_buff_head reasm; struct sk_buff_head lobby; @@ -60,13 +61,19 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *, sctp_association_t *); void sctp_ulpq_free(struct sctp_ulpq *); /* Add a new DATA chunk for processing. */ -int sctp_ulpq_tail_data(struct sctp_ulpq *, sctp_chunk_t *chunk, int priority); +int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, int); /* Add a new event for propogation to the ULP. */ int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev); -/* Is the ulpqueue empty. */ -int sctp_ulpqueue_is_empty(struct sctp_ulpq *); +/* Perform partial delivery. */ +void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, int); + +/* Abort the partial delivery. */ +void sctp_ulpq_abort_pd(struct sctp_ulpq *, int); + +/* Clear the partial data delivery condition on this socket. */ +int sctp_clear_pd(struct sock *sk); #endif /* __sctp_ulpqueue_h__ */ -- cgit v1.2.3