diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-12-08 08:04:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-11 11:23:05 -0500 |
commit | 132282386f5d0eff7a84a119599216b5f9e9bfc6 (patch) | |
tree | d38678a52bc8be07f40964b91c6afb839fa8cf03 /net/sctp/ulpqueue.c | |
parent | 65f5e357839e40817aead853d7a7f61ff828b52b (diff) |
sctp: add support for the process of unordered idata
Unordered idata process is more complicated than unordered data:
- It has to add mid into sctp_stream_out to save the next mid value,
which is separated from ordered idata's.
- To support pd for unordered idata, another mid and pd_mode need to
be added to save the message id and pd state in sctp_stream_in.
- To make unordered idata reasm easier, it adds a new event queue
to save frags for idata.
The patch mostly adds the samilar reasm functions for unordered idata
as ordered idata's, and also adjusts some other codes on assign_mid,
abort_pd and ulpevent_data for idata.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ulpqueue.c')
-rw-r--r-- | net/sctp/ulpqueue.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index dd53daab4a25..97fae53310e0 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c | |||
@@ -60,6 +60,7 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *ulpq, | |||
60 | 60 | ||
61 | ulpq->asoc = asoc; | 61 | ulpq->asoc = asoc; |
62 | skb_queue_head_init(&ulpq->reasm); | 62 | skb_queue_head_init(&ulpq->reasm); |
63 | skb_queue_head_init(&ulpq->reasm_uo); | ||
63 | skb_queue_head_init(&ulpq->lobby); | 64 | skb_queue_head_init(&ulpq->lobby); |
64 | ulpq->pd_mode = 0; | 65 | ulpq->pd_mode = 0; |
65 | 66 | ||
@@ -83,6 +84,10 @@ void sctp_ulpq_flush(struct sctp_ulpq *ulpq) | |||
83 | sctp_ulpevent_free(event); | 84 | sctp_ulpevent_free(event); |
84 | } | 85 | } |
85 | 86 | ||
87 | while ((skb = __skb_dequeue(&ulpq->reasm_uo)) != NULL) { | ||
88 | event = sctp_skb2event(skb); | ||
89 | sctp_ulpevent_free(event); | ||
90 | } | ||
86 | } | 91 | } |
87 | 92 | ||
88 | /* Dispose of a ulpqueue. */ | 93 | /* Dispose of a ulpqueue. */ |