mirror of https://gitee.com/openkylin/linux.git
net: cls_u32: catch all hardware offload errors
Errors reported by u32_replace_hw_hnode() were not propagated. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3497ed8c85
commit
6eef3801e7
|
@ -922,11 +922,17 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
|
|||
ht->divisor = divisor;
|
||||
ht->handle = handle;
|
||||
ht->prio = tp->prio;
|
||||
|
||||
err = u32_replace_hw_hnode(tp, ht, flags);
|
||||
if (err) {
|
||||
kfree(ht);
|
||||
return err;
|
||||
}
|
||||
|
||||
RCU_INIT_POINTER(ht->next, tp_c->hlist);
|
||||
rcu_assign_pointer(tp_c->hlist, ht);
|
||||
*arg = (unsigned long)ht;
|
||||
|
||||
u32_replace_hw_hnode(tp, ht, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue