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,
119 if (fq->q.flags & INET_FRAG_COMPLETE) {
151 if (end < fq->q.len ||
152 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len))
154 fq->q.flags |= INET_FRAG_LAST_IN;
155 fq->q.len = end;
167 if (end > fq->q.len) {
169 if (fq->q.flags & INET_FRAG_LAST_IN)
171 fq->q.len = end;
192 prev_tail = fq->q.fragments_tail;
193 err = inet_frag_queue_insert(&fq->q, skb, offset, end);
198 fq->iif = dev->ifindex;
200 fq->q.stamp = skb->tstamp;
201 fq->q.mono_delivery_time = skb->mono_delivery_time;
202 fq->q.meat += skb->len;
203 fq->ecn |= ecn;
204 add_frag_mem_limit(fq->q.fqdir, skb->truesize);
207 if (fragsize > fq->q.max_size)
208 fq->q.max_size = fragsize;
214 fq->nhoffset = nhoff;
215 fq->q.flags |= INET_FRAG_FIRST_IN;
218 if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
219 fq->q.meat == fq->q.len) {
223 err = ip6_frag_reasm(fq, skb, prev_tail, dev);
241 inet_frag_kill(&fq->q);
252 * It is called with locked fq, and caller must check that
256 static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *skb,
259 struct net *net = fq->q.fqdir->net;
265 inet_frag_kill(&fq->q);
267 ecn = ip_frag_ecn_table[fq->ecn];
271 reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
276 sizeof(struct ipv6hdr) + fq->q.len -
283 nhoff = fq->nhoffset;
293 inet_frag_reasm_finish(&fq->q, skb, reasm_data, true);
300 IP6CB(skb)->frag_max_size = fq->q.max_size;
309 fq->q.rb_fragments = RB_ROOT;
310 fq->q.fragments_tail = NULL;
311 fq->q.last_run_head = NULL;
323 inet_frag_kill(&fq->q);
330 struct frag_queue *fq;
380 fq = fq_find(net, fhdr->identification, hdr, iif);
381 if (fq) {
385 spin_lock(&fq->q.lock);
387 fq->iif = iif;
388 ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff,
391 spin_unlock(&fq->q.lock);
392 inet_frag_put(&fq->q);