Lines Matching refs:event
125 struct sctp_ulpevent *event) in sctp_intl_store_reasm() argument
132 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
138 if (event->stream == cevent->stream && in sctp_intl_store_reasm()
139 event->mid == cevent->mid && in sctp_intl_store_reasm()
141 (!(event->msg_flags & SCTP_DATA_FIRST_FRAG) && in sctp_intl_store_reasm()
142 event->fsn > cevent->fsn))) { in sctp_intl_store_reasm()
143 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
147 if ((event->stream == cevent->stream && in sctp_intl_store_reasm()
148 MID_lt(cevent->mid, event->mid)) || in sctp_intl_store_reasm()
149 event->stream > cevent->stream) { in sctp_intl_store_reasm()
150 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
158 if (event->stream < cevent->stream || in sctp_intl_store_reasm()
159 (event->stream == cevent->stream && in sctp_intl_store_reasm()
160 MID_lt(event->mid, cevent->mid))) { in sctp_intl_store_reasm()
164 if (event->stream == cevent->stream && in sctp_intl_store_reasm()
165 event->mid == cevent->mid && in sctp_intl_store_reasm()
167 (event->msg_flags & SCTP_DATA_FIRST_FRAG || in sctp_intl_store_reasm()
168 event->fsn < cevent->fsn)) { in sctp_intl_store_reasm()
175 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
177 __skb_queue_before(&ulpq->reasm, loc, sctp_event2skb(event)); in sctp_intl_store_reasm()
182 struct sctp_ulpevent *event) in sctp_intl_retrieve_partial() argument
192 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_partial()
197 if (cevent->stream < event->stream) in sctp_intl_retrieve_partial()
200 if (cevent->stream > event->stream || in sctp_intl_retrieve_partial()
259 struct sctp_ulpevent *event) in sctp_intl_retrieve_reassembled() argument
272 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_reassembled()
277 if (cevent->stream < event->stream) in sctp_intl_retrieve_reassembled()
279 if (cevent->stream > event->stream) in sctp_intl_retrieve_reassembled()
282 if (MID_lt(cevent->mid, event->mid)) in sctp_intl_retrieve_reassembled()
284 if (MID_lt(event->mid, cevent->mid)) in sctp_intl_retrieve_reassembled()
349 struct sctp_ulpevent *event) in sctp_intl_reasm() argument
354 if (SCTP_DATA_NOT_FRAG == (event->msg_flags & SCTP_DATA_FRAG_MASK)) { in sctp_intl_reasm()
355 event->msg_flags |= MSG_EOR; in sctp_intl_reasm()
356 return event; in sctp_intl_reasm()
359 sctp_intl_store_reasm(ulpq, event); in sctp_intl_reasm()
361 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_reasm()
362 if (sin->pd_mode && event->mid == sin->mid && in sctp_intl_reasm()
363 event->fsn == sin->fsn) in sctp_intl_reasm()
364 retval = sctp_intl_retrieve_partial(ulpq, event); in sctp_intl_reasm()
367 retval = sctp_intl_retrieve_reassembled(ulpq, event); in sctp_intl_reasm()
373 struct sctp_ulpevent *event) in sctp_intl_store_ordered() argument
380 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
385 if (event->stream == cevent->stream && in sctp_intl_store_ordered()
386 MID_lt(cevent->mid, event->mid)) { in sctp_intl_store_ordered()
387 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
391 if (event->stream > cevent->stream) { in sctp_intl_store_ordered()
392 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
400 if (cevent->stream > event->stream) { in sctp_intl_store_ordered()
404 if (cevent->stream == event->stream && in sctp_intl_store_ordered()
405 MID_lt(event->mid, cevent->mid)) { in sctp_intl_store_ordered()
412 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
414 __skb_queue_before(&ulpq->lobby, loc, sctp_event2skb(event)); in sctp_intl_store_ordered()
418 struct sctp_ulpevent *event) in sctp_intl_retrieve_ordered() argument
423 __u16 sid = event->stream; in sctp_intl_retrieve_ordered()
426 event_list = (struct sk_buff_head *)sctp_event2skb(event)->prev; in sctp_intl_retrieve_ordered()
449 struct sctp_ulpevent *event) in sctp_intl_order() argument
455 sid = event->stream; in sctp_intl_order()
457 if (event->mid != sctp_mid_peek(stream, in, sid)) { in sctp_intl_order()
458 sctp_intl_store_ordered(ulpq, event); in sctp_intl_order()
464 sctp_intl_retrieve_ordered(ulpq, event); in sctp_intl_order()
466 return event; in sctp_intl_order()
474 struct sctp_ulpevent *event; in sctp_enqueue_event() local
478 event = sctp_skb2event(skb); in sctp_enqueue_event()
482 !sctp_ulpevent_is_notification(event))) in sctp_enqueue_event()
485 if (!sctp_ulpevent_is_notification(event)) { in sctp_enqueue_event()
490 if (!sctp_ulpevent_is_enabled(event, ulpq->asoc->subscribe)) in sctp_enqueue_event()
510 struct sctp_ulpevent *event) in sctp_intl_store_reasm_uo() argument
517 __skb_queue_tail(&ulpq->reasm_uo, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
523 if (event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
524 event->mid == cevent->mid && in sctp_intl_store_reasm_uo()
526 (!(event->msg_flags & SCTP_DATA_FIRST_FRAG) && in sctp_intl_store_reasm_uo()
527 event->fsn > cevent->fsn))) { in sctp_intl_store_reasm_uo()
528 __skb_queue_tail(&ulpq->reasm_uo, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
532 if ((event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
533 MID_lt(cevent->mid, event->mid)) || in sctp_intl_store_reasm_uo()
534 event->stream > cevent->stream) { in sctp_intl_store_reasm_uo()
535 __skb_queue_tail(&ulpq->reasm_uo, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
542 if (event->stream < cevent->stream || in sctp_intl_store_reasm_uo()
543 (event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
544 MID_lt(event->mid, cevent->mid))) in sctp_intl_store_reasm_uo()
547 if (event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
548 event->mid == cevent->mid && in sctp_intl_store_reasm_uo()
550 (event->msg_flags & SCTP_DATA_FIRST_FRAG || in sctp_intl_store_reasm_uo()
551 event->fsn < cevent->fsn)) in sctp_intl_store_reasm_uo()
555 __skb_queue_before(&ulpq->reasm_uo, pos, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
560 struct sctp_ulpevent *event) in sctp_intl_retrieve_partial_uo() argument
570 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_partial_uo()
575 if (cevent->stream < event->stream) in sctp_intl_retrieve_partial_uo()
577 if (cevent->stream > event->stream) in sctp_intl_retrieve_partial_uo()
641 struct sctp_ulpevent *event) in sctp_intl_retrieve_reassembled_uo() argument
654 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_reassembled_uo()
659 if (cevent->stream < event->stream) in sctp_intl_retrieve_reassembled_uo()
661 if (cevent->stream > event->stream) in sctp_intl_retrieve_reassembled_uo()
664 if (MID_lt(cevent->mid, event->mid)) in sctp_intl_retrieve_reassembled_uo()
666 if (MID_lt(event->mid, cevent->mid)) in sctp_intl_retrieve_reassembled_uo()
732 struct sctp_ulpevent *event) in sctp_intl_reasm_uo() argument
737 if (SCTP_DATA_NOT_FRAG == (event->msg_flags & SCTP_DATA_FRAG_MASK)) { in sctp_intl_reasm_uo()
738 event->msg_flags |= MSG_EOR; in sctp_intl_reasm_uo()
739 return event; in sctp_intl_reasm_uo()
742 sctp_intl_store_reasm_uo(ulpq, event); in sctp_intl_reasm_uo()
744 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_reasm_uo()
745 if (sin->pd_mode_uo && event->mid == sin->mid_uo && in sctp_intl_reasm_uo()
746 event->fsn == sin->fsn_uo) in sctp_intl_reasm_uo()
747 retval = sctp_intl_retrieve_partial_uo(ulpq, event); in sctp_intl_reasm_uo()
750 retval = sctp_intl_retrieve_reassembled_uo(ulpq, event); in sctp_intl_reasm_uo()
822 struct sctp_ulpevent *event; in sctp_ulpevent_idata() local
826 event = sctp_ulpevent_make_rcvmsg(chunk->asoc, chunk, gfp); in sctp_ulpevent_idata()
827 if (!event) in sctp_ulpevent_idata()
830 event->mid = ntohl(chunk->subh.idata_hdr->mid); in sctp_ulpevent_idata()
831 if (event->msg_flags & SCTP_DATA_FIRST_FRAG) in sctp_ulpevent_idata()
832 event->ppid = chunk->subh.idata_hdr->ppid; in sctp_ulpevent_idata()
834 event->fsn = ntohl(chunk->subh.idata_hdr->fsn); in sctp_ulpevent_idata()
836 if (!(event->msg_flags & SCTP_DATA_UNORDERED)) { in sctp_ulpevent_idata()
837 event = sctp_intl_reasm(ulpq, event); in sctp_ulpevent_idata()
838 if (event) { in sctp_ulpevent_idata()
840 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_ulpevent_idata()
842 if (event->msg_flags & MSG_EOR) in sctp_ulpevent_idata()
843 event = sctp_intl_order(ulpq, event); in sctp_ulpevent_idata()
846 event = sctp_intl_reasm_uo(ulpq, event); in sctp_ulpevent_idata()
847 if (event) { in sctp_ulpevent_idata()
849 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_ulpevent_idata()
853 if (event) { in sctp_ulpevent_idata()
854 event_eor = (event->msg_flags & MSG_EOR) ? 1 : 0; in sctp_ulpevent_idata()
928 struct sctp_ulpevent *event; in sctp_intl_start_pd() local
933 event = sctp_intl_retrieve_first(ulpq); in sctp_intl_start_pd()
934 if (event) { in sctp_intl_start_pd()
936 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_intl_start_pd()
939 } while (event); in sctp_intl_start_pd()
944 event = sctp_intl_retrieve_first_uo(ulpq); in sctp_intl_start_pd()
945 if (event) { in sctp_intl_start_pd()
947 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_intl_start_pd()
950 } while (event); in sctp_intl_start_pd()
1005 struct sctp_ulpevent *cevent, *event = NULL; in sctp_intl_reap_ordered() local
1028 if (!event) in sctp_intl_reap_ordered()
1029 event = sctp_skb2event(pos); in sctp_intl_reap_ordered()
1034 if (!event && pos != (struct sk_buff *)lobby) { in sctp_intl_reap_ordered()
1043 event = sctp_skb2event(pos); in sctp_intl_reap_ordered()
1047 if (event) { in sctp_intl_reap_ordered()
1048 sctp_intl_retrieve_ordered(ulpq, event); in sctp_intl_reap_ordered()
1211 struct sctp_ulpevent *event = sctp_skb2event(pos); in sctp_intl_reasm_flushtsn() local
1212 __u32 tsn = event->tsn; in sctp_intl_reasm_flushtsn()
1216 sctp_ulpevent_free(event); in sctp_intl_reasm_flushtsn()
1221 struct sctp_ulpevent *event = sctp_skb2event(pos); in sctp_intl_reasm_flushtsn() local
1222 __u32 tsn = event->tsn; in sctp_intl_reasm_flushtsn()
1226 sctp_ulpevent_free(event); in sctp_intl_reasm_flushtsn()
1289 static int do_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event) in do_ulpq_tail_event() argument
1294 __skb_queue_tail(&temp, sctp_event2skb(event)); in do_ulpq_tail_event()
1318 struct sctp_ulpevent *event) in do_sctp_enqueue_event() argument
1323 __skb_queue_tail(&temp, sctp_event2skb(event)); in do_sctp_enqueue_event()