On 03/05/2018 06:13 PM, Eric Dumazet wrote:
> On Mon, 2018-03-05 at 15:57 +0300, Alexey Kodanev wrote:
>>
>> +static inline void __qdisc_drop_all(struct sk_buff *skb,
>> +                                   struct sk_buff **to_free)
>> +{
>> +       struct sk_buff *first = skb;
>> +
>> +       while (skb->next)
>> +               skb = skb->next;
>> +
>> +       skb->next = *to_free;
>> +       *to_free = first;
>> +}
> 
> You probably can leverage what I did for commit bec3cfdca36bf43cfa
> ("net: skb_segment() provides list head and tail")
> to avoid the iteration.

OK, thanks! Will use it and send a new version of the patch.

Thanks,
Alexey

Reply via email to