mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-07 22:34:18 +08:00
1679c72cf4
Remove the tx_queue->handle_tso function pointer, and just use tx_queue->tso_version to decide which function to call, thus removing an indirect call from the fast path. Instead of passing a tso_v2 flag to efx_mcdi_tx_init(), set the desired tx_queue->tso_version before calling it. In efx_mcdi_tx_init(), report back failure to obtain a TSOv2 context by setting tx_queue->tso_version to 0, which will cause the TX path to use the GSO-based fallback. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
34 lines
1.5 KiB
C
34 lines
1.5 KiB
C
/* 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_MCDI_FUNCTIONS_H
|
|
#define EFX_MCDI_FUNCTIONS_H
|
|
|
|
int efx_mcdi_alloc_vis(struct efx_nic *efx, unsigned int min_vis,
|
|
unsigned int max_vis, unsigned int *vi_base,
|
|
unsigned int *allocated_vis);
|
|
int efx_mcdi_free_vis(struct efx_nic *efx);
|
|
|
|
int efx_mcdi_ev_probe(struct efx_channel *channel);
|
|
int efx_mcdi_ev_init(struct efx_channel *channel, bool v1_cut_thru, bool v2);
|
|
void efx_mcdi_ev_remove(struct efx_channel *channel);
|
|
void efx_mcdi_ev_fini(struct efx_channel *channel);
|
|
int efx_mcdi_tx_init(struct efx_tx_queue *tx_queue);
|
|
void efx_mcdi_tx_remove(struct efx_tx_queue *tx_queue);
|
|
void efx_mcdi_tx_fini(struct efx_tx_queue *tx_queue);
|
|
int efx_mcdi_rx_probe(struct efx_rx_queue *rx_queue);
|
|
void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue);
|
|
void efx_mcdi_rx_remove(struct efx_rx_queue *rx_queue);
|
|
void efx_mcdi_rx_fini(struct efx_rx_queue *rx_queue);
|
|
int efx_fini_dmaq(struct efx_nic *efx);
|
|
int efx_mcdi_window_mode_to_stride(struct efx_nic *efx, u8 vi_window_mode);
|
|
int efx_get_pf_index(struct efx_nic *efx, unsigned int *pf_index);
|
|
|
|
#endif
|