[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <pj41zlczw9ei5h.fsf@u68c7b5b1d2d758.ant.amazon.com>
Date: Mon, 8 Mar 2021 18:15:22 +0200
From: Shay Agroskin <shayagr@...zon.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
CC: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>,
<davem@...emloft.net>, <kuba@...nel.org>, <ast@...nel.org>,
<daniel@...earbox.net>, <brouer@...hat.com>, <toke@...hat.com>,
<freysteinn.alfredsson@....se>, <lorenzo.bianconi@...hat.com>,
<john.fastabend@...il.com>, <jasowang@...hat.com>,
<mst@...hat.com>, <thomas.petazzoni@...tlin.com>,
<mw@...ihalf.com>, <linux@...linux.org.uk>,
<ilias.apalodimas@...aro.org>, <netanel@...zon.com>,
<akiyano@...zon.com>, <michael.chan@...adcom.com>,
<madalin.bucur@....com>, <ioana.ciornei@....com>,
<jesse.brandeburg@...el.com>, <anthony.l.nguyen@...el.com>,
<saeedm@...dia.com>, <grygorii.strashko@...com>,
<ecree.xilinx@...il.com>, <maciej.fijalkowski@...el.com>
Subject: Re: [PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap
for XDP_REDIRECT
Lorenzo Bianconi <lorenzo@...nel.org> writes:
> We want to change the current ndo_xdp_xmit drop semantics
> because
> it will allow us to implement better queue overflow handling.
> This is working towards the larger goal of a XDP TX queue-hook.
> Move XDP_REDIRECT error path handling from each XDP ethernet
> driver to
> devmap code. According to the new APIs, the driver running the
> ndo_xdp_xmit pointer, will break tx loop whenever the hw reports
> a tx
> error and it will just return to devmap caller the number of
> successfully
> transmitted frames. It will be devmap responsability to free
> dropped
> frames.
> Move each XDP ndo_xdp_xmit capable driver to the new APIs:
> - veth
> - virtio-net
> - mvneta
> - mvpp2
> - socionext
> - amazon ena
> - bnxt
> - freescale (dpaa2, dpaa)
> - xen-frontend
> - qede
> - ice
> - igb
> - ixgbe
> - i40e
> - mlx5
> - ti (cpsw, cpsw-new)
> - tun
> - sfc
>
> Acked-by: Edward Cree <ecree.xilinx@...il.com>
> Reviewed-by: Ioana Ciornei <ioana.ciornei@....com>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@...aro.org>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
> More details about the new ndo_xdp_xmit design can be found here
> [0].
>
> [0]
> https://github.com/xdp-project/xdp-project/blob/master/areas/core/redesign01_ndo_xdp_xmit.org
>
> Changes since v2:
> - drop wrong comment in ena driver
> - simplify drop condition using unlikey in the for condition of
> devmap code
> - rebase on top of bpf-next
> - collect acked-by/reviewed-by
>
> Changes since v1:
> - rebase on top of bpf-next
> - add driver maintainers in cc
> - add Edward's ack
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 21
> ++++++-------
> drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 20
> +++++--------
> .../net/ethernet/freescale/dpaa/dpaa_eth.c | 12 ++++----
> .../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 --
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 15 +++++-----
> drivers/net/ethernet/intel/ice/ice_txrx.c | 15 +++++-----
> drivers/net/ethernet/intel/igb/igb_main.c | 11 ++++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 ++++---
> drivers/net/ethernet/marvell/mvneta.c | 13 ++++----
> .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 13 ++++----
> .../net/ethernet/mellanox/mlx5/core/en/xdp.c | 15 ++++------
> drivers/net/ethernet/qlogic/qede/qede_fp.c | 19 +++++-------
> drivers/net/ethernet/sfc/tx.c | 15 +---------
> drivers/net/ethernet/socionext/netsec.c | 16 +++++-----
> drivers/net/ethernet/ti/cpsw.c | 14 ++++-----
> drivers/net/ethernet/ti/cpsw_new.c | 14 ++++-----
> drivers/net/ethernet/ti/cpsw_priv.c | 11 +++----
> drivers/net/tun.c | 15 ++++++----
> drivers/net/veth.c | 28
> +++++++++--------
> drivers/net/virtio_net.c | 25
> ++++++++--------
> drivers/net/xen-netfront.c | 18 +++++------
> kernel/bpf/devmap.c | 30
> ++++++++-----------
> 22 files changed, 153 insertions(+), 200 deletions(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index 102f2c91fdb8..5c062c51b4cb 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -300,7 +300,7 @@ static int ena_xdp_xmit_frame(struct
> ena_ring *xdp_ring,
>
Acked-by: Shay Agroskin <shayagr@...zon.com>
for ena-drivers. Also reviewed all non-driver specific code, lgtm.
Thank you for this work Lorenzo.
Powered by blists - more mailing lists