diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/pkt_cls.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 2f8f16a4d88e..08815fe9314d 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -606,9 +606,9 @@ struct tc_cls_common_offload { }; static inline void -tc_cls_common_offload_init(struct tc_cls_common_offload *cls_common, - const struct tcf_proto *tp, - struct netlink_ext_ack *extack) +tc_cls_common_offload_init_deprecated(struct tc_cls_common_offload *cls_common, + const struct tcf_proto *tp, + struct netlink_ext_ack *extack) { cls_common->chain_index = tp->chain->index; cls_common->protocol = tp->protocol; @@ -694,6 +694,18 @@ static inline bool tc_in_hw(u32 flags) return (flags & TCA_CLS_FLAGS_IN_HW) ? true : false; } +static inline void +tc_cls_common_offload_init(struct tc_cls_common_offload *cls_common, + const struct tcf_proto *tp, u32 flags, + struct netlink_ext_ack *extack) +{ + cls_common->chain_index = tp->chain->index; + cls_common->protocol = tp->protocol; + cls_common->prio = tp->prio; + if (tc_skip_sw(flags)) + cls_common->extack = extack; +} + enum tc_fl_command { TC_CLSFLOWER_REPLACE, TC_CLSFLOWER_DESTROY, |