summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef100_tx.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2020-09-12 00:40:03 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-12 02:15:22 +0200
commit1679c72cf48552e75a624b9c9230e2c7c18cfffc (patch)
tree0a01a45d7b955a904a17a0be7e371a3d42eefd32 /drivers/net/ethernet/sfc/ef100_tx.c
parentsfc: select inner-csum-offload TX queues for skbs that need it (diff)
downloadlinux-1679c72cf48552e75a624b9c9230e2c7c18cfffc.tar.xz
linux-1679c72cf48552e75a624b9c9230e2c7c18cfffc.zip
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 <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef100_tx.c')
-rw-r--r--drivers/net/ethernet/sfc/ef100_tx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_tx.c b/drivers/net/ethernet/sfc/ef100_tx.c
index ef9c2e879499..a90e5a9d2a37 100644
--- a/drivers/net/ethernet/sfc/ef100_tx.c
+++ b/drivers/net/ethernet/sfc/ef100_tx.c
@@ -37,7 +37,14 @@ void ef100_tx_init(struct efx_tx_queue *tx_queue)
tx_queue->channel->channel -
tx_queue->efx->tx_channel_offset);
- if (efx_mcdi_tx_init(tx_queue, false))
+ /* This value is purely documentational; as EF100 never passes through
+ * the switch statement in tx.c:__efx_enqueue_skb(), that switch does
+ * not handle case 3. EF100's TSOv3 descriptors are generated by
+ * ef100_make_tso_desc().
+ * Meanwhile, all efx_mcdi_tx_init() cares about is that it's not 2.
+ */
+ tx_queue->tso_version = 3;
+ if (efx_mcdi_tx_init(tx_queue))
netdev_WARN(tx_queue->efx->net_dev,
"failed to initialise TXQ %d\n", tx_queue->queue);
}