Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/sched: Remove unused functions

Since commit c54e1d920f04 ("flow_offload: add ops to tc_action_ops for
flow action setup") these are unused.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Link: https://patch.msgid.link/20250624014327.3686873-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Yue Haibing and committed by
Jakub Kicinski
4b70e2a0 9b19b50c

-63
-9
include/net/tc_act/tc_csum.h
··· 18 18 }; 19 19 #define to_tcf_csum(a) ((struct tcf_csum *)a) 20 20 21 - static inline bool is_tcf_csum(const struct tc_action *a) 22 - { 23 - #ifdef CONFIG_NET_CLS_ACT 24 - if (a->ops && a->ops->id == TCA_ID_CSUM) 25 - return true; 26 - #endif 27 - return false; 28 - } 29 - 30 21 static inline u32 tcf_csum_update_flags(const struct tc_action *a) 31 22 { 32 23 u32 update_flags;
-9
include/net/tc_act/tc_ct.h
··· 92 92 tcf_ct_flow_table_restore_skb(struct sk_buff *skb, unsigned long cookie) { } 93 93 #endif 94 94 95 - static inline bool is_tcf_ct(const struct tc_action *a) 96 - { 97 - #if defined(CONFIG_NET_CLS_ACT) && IS_ENABLED(CONFIG_NF_CONNTRACK) 98 - if (a->ops && a->ops->id == TCA_ID_CT) 99 - return true; 100 - #endif 101 - return false; 102 - } 103 - 104 95 #endif /* __NET_TC_CT_H */
-9
include/net/tc_act/tc_gate.h
··· 51 51 52 52 #define to_gate(a) ((struct tcf_gate *)a) 53 53 54 - static inline bool is_tcf_gate(const struct tc_action *a) 55 - { 56 - #ifdef CONFIG_NET_CLS_ACT 57 - if (a->ops && a->ops->id == TCA_ID_GATE) 58 - return true; 59 - #endif 60 - return false; 61 - } 62 - 63 54 static inline s32 tcf_gate_prio(const struct tc_action *a) 64 55 { 65 56 s32 tcfg_prio;
-9
include/net/tc_act/tc_mpls.h
··· 27 27 }; 28 28 #define to_mpls(a) ((struct tcf_mpls *)a) 29 29 30 - static inline bool is_tcf_mpls(const struct tc_action *a) 31 - { 32 - #ifdef CONFIG_NET_CLS_ACT 33 - if (a->ops && a->ops->id == TCA_ID_MPLS) 34 - return true; 35 - #endif 36 - return false; 37 - } 38 - 39 30 static inline u32 tcf_mpls_action(const struct tc_action *a) 40 31 { 41 32 u32 tcfm_action;
-9
include/net/tc_act/tc_police.h
··· 44 44 struct tc_ratespec peakrate; 45 45 }; 46 46 47 - static inline bool is_tcf_police(const struct tc_action *act) 48 - { 49 - #ifdef CONFIG_NET_CLS_ACT 50 - if (act->ops && act->ops->id == TCA_ID_POLICE) 51 - return true; 52 - #endif 53 - return false; 54 - } 55 - 56 47 static inline u64 tcf_police_rate_bytes_ps(const struct tc_action *act) 57 48 { 58 49 struct tcf_police *police = to_police(act);
-9
include/net/tc_act/tc_sample.h
··· 17 17 }; 18 18 #define to_sample(a) ((struct tcf_sample *)a) 19 19 20 - static inline bool is_tcf_sample(const struct tc_action *a) 21 - { 22 - #ifdef CONFIG_NET_CLS_ACT 23 - return a->ops && a->ops->id == TCA_ID_SAMPLE; 24 - #else 25 - return false; 26 - #endif 27 - } 28 - 29 20 static inline __u32 tcf_sample_rate(const struct tc_action *a) 30 21 { 31 22 return to_sample(a)->rate;
-9
include/net/tc_act/tc_vlan.h
··· 26 26 }; 27 27 #define to_vlan(a) ((struct tcf_vlan *)a) 28 28 29 - static inline bool is_tcf_vlan(const struct tc_action *a) 30 - { 31 - #ifdef CONFIG_NET_CLS_ACT 32 - if (a->ops && a->ops->id == TCA_ID_VLAN) 33 - return true; 34 - #endif 35 - return false; 36 - } 37 - 38 29 static inline u32 tcf_vlan_action(const struct tc_action *a) 39 30 { 40 31 u32 tcfv_action;