tc_bindings.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /****************************************************************************
  3. * Driver for Solarflare network controllers and boards
  4. * Copyright 2022 Xilinx Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation, incorporated herein by reference.
  9. */
  10. #ifndef EFX_TC_BINDINGS_H
  11. #define EFX_TC_BINDINGS_H
  12. #include "net_driver.h"
  13. #if IS_ENABLED(CONFIG_SFC_SRIOV)
  14. #include <net/sch_generic.h>
  15. struct efx_rep;
  16. void efx_tc_block_unbind(void *cb_priv);
  17. int efx_tc_setup_block(struct net_device *net_dev, struct efx_nic *efx,
  18. struct flow_block_offload *tcb, struct efx_rep *efv);
  19. int efx_tc_setup(struct net_device *net_dev, enum tc_setup_type type,
  20. void *type_data);
  21. int efx_tc_indr_setup_cb(struct net_device *net_dev, struct Qdisc *sch,
  22. void *cb_priv, enum tc_setup_type type,
  23. void *type_data, void *data,
  24. void (*cleanup)(struct flow_block_cb *block_cb));
  25. int efx_tc_netdev_event(struct efx_nic *efx, unsigned long event,
  26. struct net_device *net_dev);
  27. #else /* CONFIG_SFC_SRIOV */
  28. static inline int efx_tc_netdev_event(struct efx_nic *efx, unsigned long event,
  29. struct net_device *net_dev)
  30. {
  31. return NOTIFY_DONE;
  32. }
  33. #endif /* CONFIG_SFC_SRIOV */
  34. #endif /* EFX_TC_BINDINGS_H */