On Wed 17 Apr 2019 at 00:49, Jakub Kicinski <jakub.kicin...@netronome.com> 
wrote:
> On Tue, 16 Apr 2019 17:20:47 +0300, Vlad Buslov wrote:
>> @@ -1551,6 +1558,10 @@ static int fl_change(struct net *net, struct sk_buff 
>> *in_skb,
>>              goto errout_mask;
>>
>>      if (!tc_skip_hw(fnew->flags)) {
>> +            spin_lock(&tp->lock);
>> +            list_add(&fnew->hw_list, &head->hw_filters);
>> +            spin_unlock(&tp->lock);
>> +
>>              err = fl_hw_replace_filter(tp, fnew, rtnl_held, extack);
>>              if (err)
>>                      goto errout_ht;
>
> Duplicated deletes should be fine, but I'm not sure same is true for
> adds.  Won't seeing an add with the same cookie twice confuse drivers?
>
> There's also the minor issue of offloaded count being off in that
> case :)

Hmmm, okay. Rejecting duplicate cookies should be a trivial change to
drivers though. Do you see any faults with this approach in general?

Reply via email to