2020-01-09 00:10:32 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/****************************************************************************
|
|
|
|
* Driver for Solarflare network controllers and boards
|
|
|
|
* Copyright 2018 Solarflare Communications Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
|
|
* by the Free Software Foundation, incorporated herein by reference.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EFX_TX_COMMON_H
|
|
|
|
#define EFX_TX_COMMON_H
|
|
|
|
|
|
|
|
int efx_probe_tx_queue(struct efx_tx_queue *tx_queue);
|
|
|
|
void efx_init_tx_queue(struct efx_tx_queue *tx_queue);
|
|
|
|
void efx_fini_tx_queue(struct efx_tx_queue *tx_queue);
|
|
|
|
void efx_remove_tx_queue(struct efx_tx_queue *tx_queue);
|
|
|
|
|
|
|
|
void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,
|
|
|
|
struct efx_tx_buffer *buffer,
|
|
|
|
unsigned int *pkts_compl,
|
|
|
|
unsigned int *bytes_compl);
|
|
|
|
|
2020-03-05 19:38:45 +08:00
|
|
|
static inline bool efx_tx_buffer_in_use(struct efx_tx_buffer *buffer)
|
|
|
|
{
|
|
|
|
return buffer->len || (buffer->flags & EFX_TX_BUF_OPTION);
|
|
|
|
}
|
|
|
|
|
|
|
|
void efx_xmit_done_check_empty(struct efx_tx_queue *tx_queue);
|
2020-01-10 21:26:46 +08:00
|
|
|
void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index);
|
|
|
|
|
2020-01-10 21:27:50 +08:00
|
|
|
void efx_enqueue_unwind(struct efx_tx_queue *tx_queue,
|
|
|
|
unsigned int insert_count);
|
|
|
|
|
2020-01-09 00:10:32 +08:00
|
|
|
struct efx_tx_buffer *efx_tx_map_chunk(struct efx_tx_queue *tx_queue,
|
|
|
|
dma_addr_t dma_addr, size_t len);
|
2020-06-30 20:13:15 +08:00
|
|
|
int efx_tx_tso_header_length(struct sk_buff *skb);
|
2020-01-09 00:10:32 +08:00
|
|
|
int efx_tx_map_data(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
|
|
|
|
unsigned int segment_count);
|
|
|
|
|
|
|
|
unsigned int efx_tx_max_skb_descs(struct efx_nic *efx);
|
2020-06-30 20:12:17 +08:00
|
|
|
int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue, struct sk_buff *skb);
|
2020-07-27 19:55:55 +08:00
|
|
|
|
|
|
|
extern bool efx_separate_tx_channels;
|
2020-01-09 00:10:32 +08:00
|
|
|
#endif
|