Lines Matching defs:fq
33 static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *skb,
47 struct frag_queue *fq;
49 fq = container_of(frag, struct frag_queue, q);
51 spin_lock(&fq->q.lock);
53 if (fq->q.flags & INET_FRAG_COMPLETE)
56 inet_frag_kill(&fq->q);
58 spin_unlock(&fq->q.lock);
59 inet_frag_put(&fq->q);
84 static int lowpan_frag_queue(struct lowpan_frag_queue *fq,
97 if (fq->q.flags & INET_FRAG_COMPLETE)
108 if (end < fq->q.len ||
109 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len))
111 fq->q.flags |= INET_FRAG_LAST_IN;
112 fq->q.len = end;
114 if (end > fq->q.len) {
116 if (fq->q.flags & INET_FRAG_LAST_IN)
118 fq->q.len = end;
127 prev_tail = fq->q.fragments_tail;
128 err = inet_frag_queue_insert(&fq->q, skb, offset, end);
132 fq->q.stamp = skb->tstamp;
134 fq->q.flags |= INET_FRAG_FIRST_IN;
136 fq->q.meat += skb->len;
137 add_frag_mem_limit(fq->q.fqdir, skb->truesize);
139 if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
140 fq->q.meat == fq->q.len) {
145 res = lowpan_frag_reasm(fq, skb, prev_tail, ldev);
159 * It is called with locked fq, and caller must check that
163 static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *skb,
168 inet_frag_kill(&fq->q);
170 reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
173 inet_frag_reasm_finish(&fq->q, skb, reasm_data, false);
176 skb->tstamp = fq->q.stamp;
177 fq->q.rb_fragments = RB_ROOT;
178 fq->q.fragments_tail = NULL;
179 fq->q.last_run_head = NULL;
278 struct lowpan_frag_queue *fq;
302 fq = fq_find(net, cb, &hdr.source, &hdr.dest);
303 if (fq != NULL) {
306 spin_lock(&fq->q.lock);
307 ret = lowpan_frag_queue(fq, skb, frag_type);
308 spin_unlock(&fq->q.lock);
310 inet_frag_put(&fq->q);
493 const struct inet_frag_queue *fq = data;
495 return jhash2((const u32 *)&fq->key,
502 const struct inet_frag_queue *fq = ptr;
504 return !!memcmp(&fq->key, key, sizeof(*key));