On 2020-12-16 21:59, Johannes Berg wrote:
> On Wed, 2020-12-16 at 21:43 +0100, Felix Fietkau wrote:
>>
>> + u32 *flows_bitmap;
>
>> + fq->flows_bitmap[idx / 32] &= ~BIT(idx % 32);
>
>> + for (base = 0; base < fq->flows_cnt; base += 32) {
>> + u32 mask = fq->flows_bitmap[base / 32];
>
> This all seems a little awkward, why not use unsigned long * and
> <linux/bitops.h>?
>
> The &=~ BIT() thing above is basically __clear_bit() then, the loops
> later are basically for_each_set_bit() if I'm reading things right.
I guess I can simplify this some more. I think I avoided
for_each_set_bit for performance reasons to keep things inline in the
loop, but I'm not sure how much that matters in practice.
- Felix