Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /****************************************************************************
0003  * Driver for Solarflare network controllers and boards
0004  * Copyright 2018 Solarflare Communications Inc.
0005  *
0006  * This program is free software; you can redistribute it and/or modify it
0007  * under the terms of the GNU General Public License version 2 as published
0008  * by the Free Software Foundation, incorporated herein by reference.
0009  */
0010 
0011 #ifndef EFX_TX_COMMON_H
0012 #define EFX_TX_COMMON_H
0013 
0014 int efx_siena_probe_tx_queue(struct efx_tx_queue *tx_queue);
0015 void efx_siena_init_tx_queue(struct efx_tx_queue *tx_queue);
0016 void efx_siena_fini_tx_queue(struct efx_tx_queue *tx_queue);
0017 void efx_siena_remove_tx_queue(struct efx_tx_queue *tx_queue);
0018 
0019 static inline bool efx_tx_buffer_in_use(struct efx_tx_buffer *buffer)
0020 {
0021     return buffer->len || (buffer->flags & EFX_TX_BUF_OPTION);
0022 }
0023 
0024 void efx_siena_xmit_done_check_empty(struct efx_tx_queue *tx_queue);
0025 void efx_siena_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index);
0026 
0027 void efx_siena_enqueue_unwind(struct efx_tx_queue *tx_queue,
0028                   unsigned int insert_count);
0029 
0030 struct efx_tx_buffer *efx_siena_tx_map_chunk(struct efx_tx_queue *tx_queue,
0031                          dma_addr_t dma_addr, size_t len);
0032 int efx_siena_tx_map_data(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
0033               unsigned int segment_count);
0034 
0035 unsigned int efx_siena_tx_max_skb_descs(struct efx_nic *efx);
0036 int efx_siena_tx_tso_fallback(struct efx_tx_queue *tx_queue, struct sk_buff *skb);
0037 
0038 extern bool efx_siena_separate_tx_channels;
0039 #endif