On 08/26/2016 08:06 PM, Jakub Kicinski wrote:
This patch adds hardware offload capability to cls_bpf classifier,
similar to what have been done with U32 and flower.

Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>

Acked-by: Daniel Borkmann <dan...@iogearbox.net>

[...]
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index a459be5fe1c2..a86262f0d93a 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -486,4 +486,18 @@ struct tc_cls_matchall_offload {
        unsigned long cookie;
  };

+enum tc_clsbpf_command {
+       TC_CLSBPF_ADD,
+       TC_CLSBPF_REPLACE,
+       TC_CLSBPF_DESTROY,
+};
+
+struct tc_cls_bpf_offload {
+       enum tc_clsbpf_command command;
+       struct tcf_exts *exts;
+       struct bpf_prog *filter;

Small nit: s/filter/prog/, I think prog is a more appropriate name since
it's about more than just filtering. (I will rename it at some point for
cls_bpf as well.)

Rest looks good to me.

Reply via email to