Commit 55593960 authored by Or Gerlitz's avatar Or Gerlitz Committed by David S. Miller

net/sched: cls_flower: Reflect HW offload status

Flower support for the "in hw" offloading flags.
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: default avatarAmir Vadai <amir@vadai.me>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e696028a
...@@ -273,6 +273,8 @@ static int fl_hw_replace_filter(struct tcf_proto *tp, ...@@ -273,6 +273,8 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
err = dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, tp->protocol, err = dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, tp->protocol,
tc); tc);
if (!err)
f->flags |= TCA_CLS_FLAGS_IN_HW;
if (tc_skip_sw(f->flags)) if (tc_skip_sw(f->flags))
return err; return err;
...@@ -912,6 +914,9 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, ...@@ -912,6 +914,9 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
goto errout; goto errout;
} }
if (!tc_in_hw(fnew->flags))
fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW;
if (fold) { if (fold) {
if (!tc_skip_sw(fold->flags)) if (!tc_skip_sw(fold->flags))
rhashtable_remove_fast(&head->ht, &fold->ht_node, rhashtable_remove_fast(&head->ht, &fold->ht_node,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment