tx_common.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /****************************************************************************
  3. * Driver for Solarflare network controllers and boards
  4. * Copyright 2018 Solarflare Communications 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_TX_COMMON_H
  11. #define EFX_TX_COMMON_H
  12. int efx_siena_probe_tx_queue(struct efx_tx_queue *tx_queue);
  13. void efx_siena_init_tx_queue(struct efx_tx_queue *tx_queue);
  14. void efx_siena_fini_tx_queue(struct efx_tx_queue *tx_queue);
  15. void efx_siena_remove_tx_queue(struct efx_tx_queue *tx_queue);
  16. static inline bool efx_tx_buffer_in_use(struct efx_tx_buffer *buffer)
  17. {
  18. return buffer->len || (buffer->flags & EFX_TX_BUF_OPTION);
  19. }
  20. void efx_siena_xmit_done_check_empty(struct efx_tx_queue *tx_queue);
  21. void efx_siena_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index);
  22. void efx_siena_enqueue_unwind(struct efx_tx_queue *tx_queue,
  23. unsigned int insert_count);
  24. struct efx_tx_buffer *efx_siena_tx_map_chunk(struct efx_tx_queue *tx_queue,
  25. dma_addr_t dma_addr, size_t len);
  26. int efx_siena_tx_map_data(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
  27. unsigned int segment_count);
  28. unsigned int efx_siena_tx_max_skb_descs(struct efx_nic *efx);
  29. int efx_siena_tx_tso_fallback(struct efx_tx_queue *tx_queue, struct sk_buff *skb);
  30. extern bool efx_siena_separate_tx_channels;
  31. #endif