aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/tx.c
diff options
context:
space:
mode:
authorCharles McLachlan <cmclachlan@solarflare.com>2019-10-31 10:23:49 +0000
committerDavid S. Miller <davem@davemloft.net>2019-10-31 14:14:53 -0700
commit3990a8fffbdad5765f47ea593f9de66c91762059 (patch)
tree35ca22547cac256496e40fd7c4e3d725fe056ad7 /drivers/net/ethernet/sfc/tx.c
parentsfc: Enable setting of xdp_prog (diff)
downloadlinux-dev-3990a8fffbdad5765f47ea593f9de66c91762059.tar.xz
linux-dev-3990a8fffbdad5765f47ea593f9de66c91762059.zip
sfc: allocate channels for XDP tx queues
Each CPU needs access to its own queue to allow uncontested transmission of XDP_TX packets. This means we need to allocate (up front) enough channels ("xdp transmit channels") to provide at least one extra tx queue per CPU. These tx queues should not do TSO. Signed-off-by: Charles McLachlan <cmclachlan@solarflare.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/sfc/tx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index 204aafb3d96a..8a5bc500d2a1 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -859,6 +859,8 @@ void efx_init_tx_queue(struct efx_tx_queue *tx_queue)
tx_queue->completed_timestamp_major = 0;
tx_queue->completed_timestamp_minor = 0;
+ tx_queue->xdp_tx = efx_channel_is_xdp_tx(tx_queue->channel);
+
/* Set up default function pointers. These may get replaced by
* efx_nic_init_tx() based off NIC/queue capabilities.
*/