Skip to content

Commit

Permalink
net/sched: cls_flower: Reflect HW offload status
Browse files Browse the repository at this point in the history
Flower support for the "in hw" offloading flags.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Amir Vadai <amir@vadai.me>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Or Gerlitz authored and David S. Miller committed Feb 17, 2017
1 parent e696028 commit 5559396
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/sched/cls_flower.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
tc);
if (!err)
f->flags |= TCA_CLS_FLAGS_IN_HW;

if (tc_skip_sw(f->flags))
return err;
Expand Down Expand Up @@ -912,6 +914,9 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
goto errout;
}

if (!tc_in_hw(fnew->flags))
fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW;

if (fold) {
if (!tc_skip_sw(fold->flags))
rhashtable_remove_fast(&head->ht, &fold->ht_node,
Expand Down

0 comments on commit 5559396

Please sign in to comment.