• Home
  • Raw
  • Download

Lines Matching refs:chunk

59 	struct sctp_chunk *chunk, *tmp;  in sctp_inq_free()  local
62 list_for_each_entry_safe(chunk, tmp, &queue->in_chunk_list, list) { in sctp_inq_free()
63 list_del_init(&chunk->list); in sctp_inq_free()
64 sctp_chunk_free(chunk); in sctp_inq_free()
79 void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk) in sctp_inq_push() argument
82 if (chunk->rcvr->dead) { in sctp_inq_push()
83 sctp_chunk_free(chunk); in sctp_inq_push()
92 list_add_tail(&chunk->list, &q->in_chunk_list); in sctp_inq_push()
93 if (chunk->asoc) in sctp_inq_push()
94 chunk->asoc->stats.ipackets++; in sctp_inq_push()
101 struct sctp_chunk *chunk; in sctp_inq_peek() local
104 chunk = queue->in_progress; in sctp_inq_peek()
106 if (chunk->singleton || in sctp_inq_peek()
107 chunk->end_of_packet || in sctp_inq_peek()
108 chunk->pdiscard) in sctp_inq_peek()
111 ch = (sctp_chunkhdr_t *)chunk->chunk_end; in sctp_inq_peek()
124 struct sctp_chunk *chunk; in sctp_inq_pop() local
131 if ((chunk = queue->in_progress)) { in sctp_inq_pop()
135 if (chunk->singleton || in sctp_inq_pop()
136 chunk->end_of_packet || in sctp_inq_pop()
137 chunk->pdiscard) { in sctp_inq_pop()
138 sctp_chunk_free(chunk); in sctp_inq_pop()
139 chunk = queue->in_progress = NULL; in sctp_inq_pop()
142 ch = (sctp_chunkhdr_t *) chunk->chunk_end; in sctp_inq_pop()
144 skb_pull(chunk->skb, chunk->chunk_end - chunk->skb->data); in sctp_inq_pop()
150 if (!chunk) { in sctp_inq_pop()
158 chunk = queue->in_progress = in sctp_inq_pop()
163 chunk->singleton = 1; in sctp_inq_pop()
164 ch = (sctp_chunkhdr_t *) chunk->skb->data; in sctp_inq_pop()
165 chunk->data_accepted = 0; in sctp_inq_pop()
168 chunk->chunk_hdr = ch; in sctp_inq_pop()
169 chunk->chunk_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length)); in sctp_inq_pop()
174 if (unlikely(skb_is_nonlinear(chunk->skb))) { in sctp_inq_pop()
175 if (chunk->chunk_end > skb_tail_pointer(chunk->skb)) in sctp_inq_pop()
176 chunk->chunk_end = skb_tail_pointer(chunk->skb); in sctp_inq_pop()
178 skb_pull(chunk->skb, sizeof(sctp_chunkhdr_t)); in sctp_inq_pop()
179 chunk->subh.v = NULL; /* Subheader is no longer valid. */ in sctp_inq_pop()
181 if (chunk->chunk_end + sizeof(sctp_chunkhdr_t) <= in sctp_inq_pop()
182 skb_tail_pointer(chunk->skb)) { in sctp_inq_pop()
184 chunk->singleton = 0; in sctp_inq_pop()
185 } else if (chunk->chunk_end > skb_tail_pointer(chunk->skb)) { in sctp_inq_pop()
187 chunk->pdiscard = 1; in sctp_inq_pop()
188 chunk->chunk_end = skb_tail_pointer(chunk->skb); in sctp_inq_pop()
193 chunk->end_of_packet = 1; in sctp_inq_pop()
197 chunk, sctp_cname(SCTP_ST_CHUNK(chunk->chunk_hdr->type)), in sctp_inq_pop()
198 ntohs(chunk->chunk_hdr->length), chunk->skb->len); in sctp_inq_pop()
200 return chunk; in sctp_inq_pop()