From 1679c72cf48552e75a624b9c9230e2c7c18cfffc Mon Sep 17 00:00:00 2001 From: Edward Cree Date: Fri, 11 Sep 2020 23:40:03 +0100 Subject: sfc: de-indirect TSO handling 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/sfc/farch.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/ethernet/sfc/farch.c') diff --git a/drivers/net/ethernet/sfc/farch.c b/drivers/net/ethernet/sfc/farch.c index bb5c45a0291b..d75cf5ff5686 100644 --- a/drivers/net/ethernet/sfc/farch.c +++ b/drivers/net/ethernet/sfc/farch.c @@ -415,6 +415,8 @@ void efx_farch_tx_init(struct efx_tx_queue *tx_queue) FFE_BZ_TX_PACE_OFF : FFE_BZ_TX_PACE_RESERVED); efx_writeo_table(efx, ®, FR_BZ_TX_PACE_TBL, tx_queue->queue); + + tx_queue->tso_version = 1; } static void efx_farch_flush_tx_queue(struct efx_tx_queue *tx_queue) -- cgit v1.2.3