[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1487148757-24809-5-git-send-email-ogerlitz@mellanox.com>
Date: Wed, 15 Feb 2017 10:52:34 +0200
From: Or Gerlitz <ogerlitz@...lanox.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>,
John Fastabend <john.r.fastabend@...el.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Roi Dayan <roid@...lanox.com>, Jiri Pirko <jiri@...lanox.com>,
netdev@...r.kernel.org, Or Gerlitz <ogerlitz@...lanox.com>
Subject: [PATCH net-next V3 4/7] net/sched: cls_flower: Reflect HW offload status
Flower support for the "in hw" offloading flags.
Signed-off-by: Or Gerlitz <ogerlitz@...lanox.com>
Reviewed-by: Amir Vadai <amir@...ai.me>
Acked-by: Jiri Pirko <jiri@...lanox.com>
---
net/sched/cls_flower.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 850d982..9270c5b 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -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;
@@ -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,
--
2.3.7
Powered by blists - more mailing lists