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;
133 fq->q.mono_delivery_time = skb->mono_delivery_time;
135 fq->q.flags |= INET_FRAG_FIRST_IN;
137 fq->q.meat += skb->len;
138 add_frag_mem_limit(fq->q.fqdir, skb->truesize);
140 if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
141 fq->q.meat == fq->q.len) {
146 res = lowpan_frag_reasm(fq, skb, prev_tail, ldev);
160 * It is called with locked fq, and caller must check that
164 static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *skb,
169 inet_frag_kill(&fq->q);
171 reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
174 inet_frag_reasm_finish(&fq->q, skb, reasm_data, false);
177 skb->tstamp = fq->q.stamp;
178 fq->q.rb_fragments = RB_ROOT;
179 fq->q.fragments_tail = NULL;
180 fq->q.last_run_head = NULL;
279 struct lowpan_frag_queue *fq;
303 fq = fq_find(net, cb, &hdr.source, &hdr.dest);
304 if (fq != NULL) {
307 spin_lock(&fq->q.lock);
308 ret = lowpan_frag_queue(fq, skb, frag_type);
309 spin_unlock(&fq->q.lock);
311 inet_frag_put(&fq->q);
498 const struct inet_frag_queue *fq = data;
500 return jhash2((const u32 *)&fq->key,
507 const struct inet_frag_queue *fq = ptr;
509 return !!memcmp(&fq->key, key, sizeof(*key));