aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/tx.c
diff options
context:
space:
mode:
authorCharles McLachlan <cmclachlan@solarflare.com>2019-10-31 10:23:10 +0000
committerDavid S. Miller <davem@davemloft.net>2019-10-31 14:14:53 -0700
commit8c42350116fe4ad23a5a813eba367355cfe7cff5 (patch)
tree89adf3d5d692af9fc49304e6aaffd01c9d0a30b8 /drivers/net/ethernet/sfc/tx.c
parentmlxsw: Fix 64-bit division in mlxsw_sp_sb_prs_init (diff)
downloadlinux-dev-8c42350116fe4ad23a5a813eba367355cfe7cff5.tar.xz
linux-dev-8c42350116fe4ad23a5a813eba367355cfe7cff5.zip
sfc: support encapsulation of xdp_frames in efx_tx_buffer
Add a field to efx_tx_buffer so that we can track xdp_frames. Add a flag so that buffers that contain xdp_frames can be identified and passed to xdp_return_frame. 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 'drivers/net/ethernet/sfc/tx.c')
-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 65e81ec1b314..204aafb3d96a 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -95,6 +95,8 @@ static void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,
netif_vdbg(tx_queue->efx, tx_done, tx_queue->efx->net_dev,
"TX queue %d transmission id %x complete\n",
tx_queue->queue, tx_queue->read_count);
+ } else if (buffer->flags & EFX_TX_BUF_XDP) {
+ xdp_return_frame_rx_napi(buffer->xdpf);
}
buffer->len = 0;