Lines Matching defs:fq
70 static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *skb,
76 struct frag_queue *fq;
78 fq = container_of(frag, struct frag_queue, q);
80 ip6frag_expire_frag_queue(fq->q.fqdir->net, fq);
106 static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
117 if (fq->q.flags & INET_FRAG_COMPLETE)
147 if (end < fq->q.len ||
148 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len))
150 fq->q.flags |= INET_FRAG_LAST_IN;
151 fq->q.len = end;
163 if (end > fq->q.len) {
165 if (fq->q.flags & INET_FRAG_LAST_IN)
167 fq->q.len = end;
188 prev_tail = fq->q.fragments_tail;
189 err = inet_frag_queue_insert(&fq->q, skb, offset, end);
194 fq->iif = dev->ifindex;
196 fq->q.stamp = skb->tstamp;
197 fq->q.meat += skb->len;
198 fq->ecn |= ecn;
199 add_frag_mem_limit(fq->q.fqdir, skb->truesize);
202 if (fragsize > fq->q.max_size)
203 fq->q.max_size = fragsize;
209 fq->nhoffset = nhoff;
210 fq->q.flags |= INET_FRAG_FIRST_IN;
213 if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
214 fq->q.meat == fq->q.len) {
218 err = ip6_frag_reasm(fq, skb, prev_tail, dev);
235 inet_frag_kill(&fq->q);
246 * It is called with locked fq, and caller must check that
250 static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *skb,
253 struct net *net = fq->q.fqdir->net;
259 inet_frag_kill(&fq->q);
261 ecn = ip_frag_ecn_table[fq->ecn];
265 reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
270 sizeof(struct ipv6hdr) + fq->q.len -
277 nhoff = fq->nhoffset;
287 inet_frag_reasm_finish(&fq->q, skb, reasm_data, true);
294 IP6CB(skb)->frag_max_size = fq->q.max_size;
303 fq->q.rb_fragments = RB_ROOT;
304 fq->q.fragments_tail = NULL;
305 fq->q.last_run_head = NULL;
317 inet_frag_kill(&fq->q);
324 struct frag_queue *fq;
374 fq = fq_find(net, fhdr->identification, hdr, iif);
375 if (fq) {
379 spin_lock(&fq->q.lock);
381 fq->iif = iif;
382 ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff,
385 spin_unlock(&fq->q.lock);
386 inet_frag_put(&fq->q);