Search Linux Wireless

Re: [RFC 1/2] fq: support filtering a given tin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:

> +static void fq_tin_filter(struct fq *fq,
> +			  struct fq_tin *tin,
> +			  fq_skb_filter_t filter_func,
> +			  void *filter_data,
> +			  fq_skb_free_t free_func)
> +{
> +	struct list_head *head;
> +	struct fq_flow *flow;
> +
> +	lockdep_assert_held(&fq->lock);
> +
> +	for (;;) {
> +		head = &tin->new_flows;
> +		if (list_empty(head)) {
> +			head = &tin->old_flows;
> +			if (list_empty(head))
> +				break;
> +		}
> +
> +		flow = list_first_entry(head, struct fq_flow, flowchain);
> +		fq_flow_filter(fq, flow, filter_func, filter_data, free_func);
> +	}

Isn't this going to loop forever?

-Toke



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux