tc_bpf.h 456 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (c) 2015 Jiri Pirko <[email protected]>
  4. */
  5. #ifndef __NET_TC_BPF_H
  6. #define __NET_TC_BPF_H
  7. #include <linux/filter.h>
  8. #include <net/act_api.h>
  9. struct tcf_bpf {
  10. struct tc_action common;
  11. struct bpf_prog __rcu *filter;
  12. union {
  13. u32 bpf_fd;
  14. u16 bpf_num_ops;
  15. };
  16. struct sock_filter *bpf_ops;
  17. const char *bpf_name;
  18. };
  19. #define to_bpf(a) ((struct tcf_bpf *)a)
  20. #endif /* __NET_TC_BPF_H */