tc_ctinfo.h 619 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NET_TC_CTINFO_H
  3. #define __NET_TC_CTINFO_H
  4. #include <net/act_api.h>
  5. struct tcf_ctinfo_params {
  6. struct rcu_head rcu;
  7. struct net *net;
  8. int action;
  9. u32 dscpmask;
  10. u32 dscpstatemask;
  11. u32 cpmarkmask;
  12. u16 zone;
  13. u8 mode;
  14. u8 dscpmaskshift;
  15. };
  16. struct tcf_ctinfo {
  17. struct tc_action common;
  18. struct tcf_ctinfo_params __rcu *params;
  19. atomic64_t stats_dscp_set;
  20. atomic64_t stats_dscp_error;
  21. atomic64_t stats_cpmark_set;
  22. };
  23. enum {
  24. CTINFO_MODE_DSCP = BIT(0),
  25. CTINFO_MODE_CPMARK = BIT(1)
  26. };
  27. #define to_ctinfo(a) ((struct tcf_ctinfo *)a)
  28. #endif /* __NET_TC_CTINFO_H */