bpf: Remove xdp_do_flush_map().
Subsystems (18)
cover bpf: Remove xdp_do_flush_map().
Hi,
#1 is a s/xdp_do_flush_map/xdp_do_flush/ on all drivers. #2 follows as the removal of xdp_do_flush_map from the API.
I had #1 split in several patches per vendor and then decided to merge it. I can repost it with one patch per vendor if this preferred.
Sebastian
PATCH 1/2 net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
xdp_do_flush_map() is deprecated and new code should use xdp_do_flush() instead.
Replace xdp_do_flush_map() with xdp_do_flush().
--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 2 +- drivers/net/ethernet/sfc/siena/efx_channels.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.c +1 -1
@@ -1828,7 +1828,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, }if (xdp_flags &ENA_XDP_REDIRECT ) -xdp_do_flush_map (); +xdp_do_flush ();return work_done;
drivers/net/ethernet/freescale/enetc/enetc.c +1 -1
@@ -1655,7 +1655,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring, rx_ring->stats.bytes += rx_byte_cnt;if (xdp_redirect_frm_cnt) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_tx_frm_cnt)enetc_update_tx_ring_tail (tx_ring);
drivers/net/ethernet/freescale/fec_main.c +1 -1
@@ -1832,7 +1832,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) rxq->bd.cur = bdp;if (xdp_result &FEC_ENET_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();return pkt_received; }
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 -1
@@ -2405,7 +2405,7 @@ void i40e_update_rx_stats(struct i40e_ring *rx_ring,void i40e_finalize_xdp_rx (struct i40e_ring *rx_ring,unsigned int xdp_res) {if (xdp_res &I40E_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &I40E_XDP_TX ) { struct i40e_ring *xdp_ring =
drivers/net/ethernet/intel/ice/ice_txrx_lib.c +1 -1
@@ -450,7 +450,7 @@ void ice_finalize_xdp_rx(struct ice_tx_ring *xdp_ring, unsigned int xdp_res,struct ice_tx_buf *tx_buf = &xdp_ring->tx_buf[first_idx];if (xdp_res &ICE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &ICE_XDP_TX ) {if (static_branch_unlikely (&ice_xdp_locking_key))
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -1
@@ -2421,7 +2421,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring =ixgbe_determine_xdp_ring (adapter);
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +1 -1
@@ -351,7 +351,7 @@ int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring =ixgbe_determine_xdp_ring (adapter);
drivers/net/ethernet/marvell/mvneta.c +1 -1
@@ -2520,7 +2520,7 @@ static int mvneta_rx_swbm(struct napi_struct *napi,mvneta_xdp_put_buff (pp, rxq, &xdp_buf,-1 );if (ps.xdp_redirect) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets)mvneta_update_stats (pp, &ps);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -1
@@ -4027,7 +4027,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi, }if (xdp_ret &MVPP2_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets) {struct mvpp2_pcpu_stats *stats =this_cpu_ptr (port->stats);
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -1
@@ -2209,7 +2209,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,net_dim (ð->rx_dim, dim_sample);if (xdp_flush) -xdp_do_flush_map (); +xdp_do_flush ();return done; }
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +1 -1
@@ -893,7 +893,7 @@ void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq)mlx5e_xmit_xdp_doorbell (xdpsq);if (test_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags)) { -xdp_do_flush_map (); +xdp_do_flush ();__clear_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags); } }
drivers/net/ethernet/netronome/nfp/nfd3/xsk.c +1 -1
@@ -256,7 +256,7 @@ nfp_nfd3_xsk_rx(struct nfp_net_rx_ring *rx_ring, int budget,nfp_net_xsk_rx_ring_fill_freelist (r_vec->rx_ring);if (xdp_redir) -xdp_do_flush_map (); +xdp_do_flush ();if (tx_ring->wr_ptr_add)nfp_net_tx_xmit_more_flush (tx_ring);
drivers/net/ethernet/sfc/efx_channels.c +1 -1
@@ -1260,7 +1260,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) { if (efx_channel_has_rx_queue(channel) &&
drivers/net/ethernet/sfc/siena/efx_channels.c +1 -1
@@ -1285,7 +1285,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) { if (efx_channel_has_rx_queue(channel) &&
drivers/net/ethernet/socionext/netsec.c +1 -1
@@ -780,7 +780,7 @@ static void netsec_finalize_xdp_rx(struct netsec_priv *priv, u32 xdp_res, u16 pkts) {if (xdp_res &NETSEC_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &NETSEC_XDP_TX )netsec_xdp_ring_tx_db (priv, pkts);
drivers/net/ethernet/ti/cpsw_priv.c +1 -1
@@ -1360,7 +1360,7 @@ int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp,* particular hardware is sharing a common queue, so the * incoming device might change per packet. */ -xdp_do_flush_map (); +xdp_do_flush ();break ;default :bpf_warn_invalid_xdp_action (ndev, prog, act);
Signature · 1 line
2.40.1
RE: [PATCH net-next 1/2] net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
Quoted 336 lines
-----Original Message-----
From: Sebastian Andrzej Siewior <[email protected]>
Sent: Friday, September 8, 2023 5:32 PM
To: [email protected]; [email protected]
Cc: David S. Miller <[email protected]>; Alexei Starovoitov <[email protected]>; Daniel Borkmann <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Jesper Dangaard Brouer <[email protected]>; John Fastabend <[email protected]>; Paolo Abeni <[email protected]>; Thomas Gleixner <[email protected]>; Sebastian Andrzej Siewior <[email protected]>; AngeloGioacchino Del Regno <[email protected]>; Kiyanovski, Arthur <[email protected]>; Clark Wang <[email protected]>; Claudiu Manoil <[email protected]>; Arinzon, David <[email protected]>; Edward Cree <[email protected]>; Felix Fietkau <[email protected]>; Grygorii Strashko <[email protected]>; Ilias Apalodimas <[email protected]>; Jassi Brar <[email protected]>; Jesse Brandeburg <[email protected]>; John Crispin <[email protected]>; Leon Romanovsky <[email protected]>; Lorenzo Bianconi <[email protected]>; Louis Peens <[email protected]>; Marcin Wojtas <[email protected]>; Mark Lee <[email protected]>; Martin Habets <[email protected]>; Matthias Brugger <[email protected]>; NXP Linux Team <[email protected]>; Dagan, Noam <[email protected]>; Russell King <[email protected]>; Bshara, Saeed <[email protected]>; Saeed Mahameed <[email protected]>; Sean Wang <[email protected]>; Agroskin, Shay <[email protected]>; Shenwei Wang <[email protected]>; Thomas Petazzoni <[email protected]>; Tony Nguyen <[email protected]>; Vladimir Oltean <[email protected]>; Wei Fang <[email protected]>
Subject: [EXTERNAL] [PATCH net-next 1/2] net: Tree wide: Replacexdp_do_flush_map()withxdp_do_flush().CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
xdp_do_flush_map()is deprecated and new code should usexdp_do_flush()instead.Replace
xdp_do_flush_map()withxdp_do_flush().Cc: AngeloGioacchino Del Regno
<[email protected]>Cc Arthur Kiyanovski <[email protected]>Cc Clark Wang <[email protected]>Cc Claudiu Manoil <[email protected]>Cc David Arinzon <[email protected]>Cc Edward Cree <[email protected]>Cc Felix Fietkau <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Ilias Apalodimas <[email protected]>Cc Jassi Brar <[email protected]>Cc Jesse Brandeburg <[email protected]>Cc John Crispin <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Lorenzo Bianconi <[email protected]>Cc Louis Peens <[email protected]>Cc Marcin Wojtas <[email protected]>Cc Mark Lee <[email protected]>Cc Martin Habets <[email protected]>Cc Matthias Brugger <[email protected]>Cc NXP Linux Team <[email protected]>Cc Noam Dagan <[email protected]>Cc Russell King <[email protected]>Cc Saeed Bishara <[email protected]>Cc Saeed Mahameed <[email protected]>Cc Sean Wang <[email protected]>Cc Shay Agroskin <[email protected]>Cc Shenwei Wang <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Tony Nguyen <[email protected]>Cc Vladimir Oltean <[email protected]>Cc Wei Fang <[email protected]>Signed-off-by Sebastian Andrzej Siewior <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 2 +- drivers/net/ethernet/sfc/siena/efx_channels.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)drivers/net/ethernet/amazon/ena/ena_netdev.c +1
-1@@ -1828,7 +1828,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, }if (xdp_flags &ENA_XDP_REDIRECT ) -xdp_do_flush_map (); +xdp_do_flush ();return work_done;drivers/net/ethernet/freescale/enetc/enetc.c +1
-1@@ -1655,7 +1655,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring, rx_ring->stats.bytes += rx_byte_cnt;if (xdp_redirect_frm_cnt) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_tx_frm_cnt)enetc_update_tx_ring_tail(tx_ring);drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -1832,7 +1832,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) rxq->bd.cur = bdp;if (xdp_result &FEC_ENET_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();return pkt_received;}
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1
-1@@ -2405,7 +2405,7 @@ void i40e_update_rx_stats(struct i40e_ring *rx_ring, void i40e_finalize_xdp_rx(struct i40e_ring *rx_ring, unsigned int xdp_res) {if (xdp_res &I40E_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &I40E_XDP_TX ) { struct i40e_ring *xdp_ring = diff --git
a/drivers/net/ethernet/intel/ice/ice_txrx_lib.cb/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
indexc8322fb6f2b37..7e06373e14d98100644drivers/net/ethernet/intel/ice/ice_txrx_lib.c +1
-1@@ -450,7 +450,7 @@ void ice_finalize_xdp_rx(struct ice_tx_ring *xdp_ring,unsigned int xdp_res, struct ice_tx_buf *tx_buf = &xdp_ring->tx_buf[first_idx];if (xdp_res &ICE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &ICE_XDP_TX ) {if (
static_branch_unlikely(&ice_xdp_locking_key))drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1
-1@@ -2421,7 +2421,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring = ixgbe_determine_xdp_ring(adapter);drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +1
-1@@ -351,7 +351,7 @@ int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring = ixgbe_determine_xdp_ring(adapter);drivers/net/ethernet/marvell/mvneta.c +1
-1@@ -2520,7 +2520,7 @@ static int mvneta_rx_swbm(struct napi_struct *napi,mvneta_xdp_put_buff (pp, rxq, &xdp_buf,-1 );if (ps.xdp_redirect) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets)mvneta_update_stats(pp, &ps); diff --git
a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.cb/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
indexeb74ccddb4409..60c53f66935a6100644drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1
-1@@ -4027,7 +4027,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi, }if (xdp_ret &MVPP2_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets) {struct mvpp2_pcpu_stats *stats = this_cpu_ptr(port->stats); diff --git
a/drivers/net/ethernet/mediatek/mtk_eth_soc.cb/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index6ad42e3b488f7..0b8ee35d713d1100644drivers/net/ethernet/mediatek/mtk_eth_soc.c +1
-1@@ -2209,7 +2209,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,net_dim (ð->rx_dim, dim_sample);if (xdp_flush) -xdp_do_flush_map (); +xdp_do_flush ();return done;}
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +1
-1@@ -893,7 +893,7 @@ void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq)mlx5e_xmit_xdp_doorbell (xdpsq);if (test_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags)) { -xdp_do_flush_map (); +xdp_do_flush ();__clear_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags); }}
drivers/net/ethernet/netronome/nfp/nfd3/xsk.c +1
-1@@ -256,7 +256,7 @@ nfp_nfd3_xsk_rx(struct nfp_net_rx_ring *rx_ring, int budget,nfp_net_xsk_rx_ring_fill_freelist (r_vec->rx_ring);if (xdp_redir) -xdp_do_flush_map (); +xdp_do_flush ();if (tx_ring->wr_ptr_add)nfp_net_tx_xmit_more_flush(tx_ring);drivers/net/ethernet/sfc/efx_channels.c +1
-1@@ -1260,7 +1260,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) {if (efx_channel_has_rx_queue(channel) && diff --git
a/drivers/net/ethernet/sfc/siena/efx_channels.cb/drivers/net/ethernet/sfc/siena/efx_channels.c
index1776f7f8a7a90..a7346e965bfe7100644drivers/net/ethernet/sfc/siena/efx_channels.c +1
-1@@ -1285,7 +1285,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) {if (efx_channel_has_rx_queue(channel) && diff --git
a/drivers/net/ethernet/socionext/netsec.cb/drivers/net/ethernet/socionext/netsec.c
indexf358ea0031936..b834b129639f0100644drivers/net/ethernet/socionext/netsec.c +1
-1@@ -780,7 +780,7 @@ static void netsec_finalize_xdp_rx(struct netsec_priv *priv, u32 xdp_res, u16 pkts) {if (xdp_res &NETSEC_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &NETSEC_XDP_TX ) netsec_xdp_ring_tx_db(priv, pkts); diff --git
a/drivers/net/ethernet/ti/cpsw_priv.cb/drivers/net/ethernet/ti/cpsw_priv.cindex0ec85635dfd60..764ed298b5708100644drivers/net/ethernet/ti/cpsw_priv.c +1
-1@@ -1360,7 +1360,7 @@ int cpsw_run_xdp(struct cpsw_priv *priv, int ch,struct xdp_buff *xdp, * particular hardware is sharing a common queue, so the * incoming device might change per packet. */ -xdp_do_flush_map (); +xdp_do_flush ();break ;default :bpf_warn_invalid_xdp_action(ndev, prog, act);
Quoted 2 lines
--
2.40.1
Thanks for submitting this change.
Re: [PATCH net-next 1/2] net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
In reply to Sebastian Andrzej SiewiorQuoted 29 lines · Sebastian Andrzej Siewior
xdp_do_flush_map()is deprecated and new code should usexdp_do_flush()instead.Replace
xdp_do_flush_map()withxdp_do_flush().Cc AngeloGioacchino Del Regno <[email protected]>Cc Arthur Kiyanovski <[email protected]>Cc Clark Wang <[email protected]>Cc Claudiu Manoil <[email protected]>Cc David Arinzon <[email protected]>Cc Edward Cree <[email protected]>Cc Felix Fietkau <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Ilias Apalodimas <[email protected]>Cc Jassi Brar <[email protected]>Cc Jesse Brandeburg <[email protected]>Cc John Crispin <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Lorenzo Bianconi <[email protected]>Cc Louis Peens <[email protected]>Cc Marcin Wojtas <[email protected]>Cc Mark Lee <[email protected]>Cc Martin Habets <[email protected]>Cc Matthias Brugger <[email protected]>Cc NXP Linux Team <[email protected]>Cc Noam Dagan <[email protected]>Cc Russell King <[email protected]>Cc Saeed Bishara <[email protected]>Cc Saeed Mahameed <[email protected]>
Quoted 8 lines
Cc Sean Wang <[email protected]>Cc Shay Agroskin <[email protected]>Cc Shenwei Wang <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Tony Nguyen <[email protected]>Cc Vladimir Oltean <[email protected]>Cc Wei Fang <[email protected]>Signed-off-by Sebastian Andrzej Siewior <[email protected]>
Thank you for doing this cleanup!
Re: [PATCH net-next 1/2] net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
In reply to Sebastian Andrzej SiewiorThanks Sebastian
Quoted 266 lines · Sebastian Andrzej Siewior
xdp_do_flush_map()is deprecated and new code should usexdp_do_flush()instead.Replace
xdp_do_flush_map()withxdp_do_flush().Cc AngeloGioacchino Del Regno <[email protected]>Cc Arthur Kiyanovski <[email protected]>Cc Clark Wang <[email protected]>Cc Claudiu Manoil <[email protected]>Cc David Arinzon <[email protected]>Cc Edward Cree <[email protected]>Cc Felix Fietkau <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Ilias Apalodimas <[email protected]>Cc Jassi Brar <[email protected]>Cc Jesse Brandeburg <[email protected]>Cc John Crispin <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Lorenzo Bianconi <[email protected]>Cc Louis Peens <[email protected]>Cc Marcin Wojtas <[email protected]>Cc Mark Lee <[email protected]>Cc Martin Habets <[email protected]>Cc Matthias Brugger <[email protected]>Cc NXP Linux Team <[email protected]>Cc Noam Dagan <[email protected]>Cc Russell King <[email protected]>Cc Saeed Bishara <[email protected]>Cc Saeed Mahameed <[email protected]>Cc Sean Wang <[email protected]>Cc Shay Agroskin <[email protected]>Cc Shenwei Wang <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Tony Nguyen <[email protected]>Cc Vladimir Oltean <[email protected]>Cc Wei Fang <[email protected]>Signed-off-by Sebastian Andrzej Siewior <[email protected]>--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 2 +- drivers/net/ethernet/sfc/siena/efx_channels.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)drivers/net/ethernet/amazon/ena/ena_netdev.c +1
-1@@ -1828,7 +1828,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, }if (xdp_flags &ENA_XDP_REDIRECT ) -xdp_do_flush_map (); +xdp_do_flush ();return work_done;drivers/net/ethernet/freescale/enetc/enetc.c +1
-1@@ -1655,7 +1655,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring, rx_ring->stats.bytes += rx_byte_cnt;if (xdp_redirect_frm_cnt) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_tx_frm_cnt)enetc_update_tx_ring_tail (tx_ring);drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -1832,7 +1832,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) rxq->bd.cur = bdp;if (xdp_result &FEC_ENET_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();return pkt_received; }drivers/net/ethernet/intel/i40e/i40e_txrx.c +1
-1@@ -2405,7 +2405,7 @@ void i40e_update_rx_stats(struct i40e_ring *rx_ring,void i40e_finalize_xdp_rx (struct i40e_ring *rx_ring,unsigned int xdp_res) {if (xdp_res &I40E_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &I40E_XDP_TX ) { struct i40e_ring *xdp_ring =drivers/net/ethernet/intel/ice/ice_txrx_lib.c +1
-1@@ -450,7 +450,7 @@ void ice_finalize_xdp_rx(struct ice_tx_ring *xdp_ring, unsigned int xdp_res,struct ice_tx_buf *tx_buf = &xdp_ring->tx_buf[first_idx];if (xdp_res &ICE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &ICE_XDP_TX ) {if (static_branch_unlikely (&ice_xdp_locking_key))drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1
-1@@ -2421,7 +2421,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring =ixgbe_determine_xdp_ring (adapter);drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +1
-1@@ -351,7 +351,7 @@ int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring =ixgbe_determine_xdp_ring (adapter);drivers/net/ethernet/marvell/mvneta.c +1
-1@@ -2520,7 +2520,7 @@ static int mvneta_rx_swbm(struct napi_struct *napi,mvneta_xdp_put_buff (pp, rxq, &xdp_buf,-1 );if (ps.xdp_redirect) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets)mvneta_update_stats (pp, &ps);drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1
-1@@ -4027,7 +4027,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi, }if (xdp_ret &MVPP2_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets) {struct mvpp2_pcpu_stats *stats =this_cpu_ptr (port->stats);drivers/net/ethernet/mediatek/mtk_eth_soc.c +1
-1@@ -2209,7 +2209,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,net_dim (ð->rx_dim, dim_sample);if (xdp_flush) -xdp_do_flush_map (); +xdp_do_flush ();return done; }drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +1
-1@@ -893,7 +893,7 @@ void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq)mlx5e_xmit_xdp_doorbell (xdpsq);if (test_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags)) { -xdp_do_flush_map (); +xdp_do_flush ();__clear_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags); } }drivers/net/ethernet/netronome/nfp/nfd3/xsk.c +1
-1@@ -256,7 +256,7 @@ nfp_nfd3_xsk_rx(struct nfp_net_rx_ring *rx_ring, int budget,nfp_net_xsk_rx_ring_fill_freelist (r_vec->rx_ring);if (xdp_redir) -xdp_do_flush_map (); +xdp_do_flush ();if (tx_ring->wr_ptr_add)nfp_net_tx_xmit_more_flush (tx_ring);drivers/net/ethernet/sfc/efx_channels.c +1
-1@@ -1260,7 +1260,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) { if (efx_channel_has_rx_queue(channel) &&drivers/net/ethernet/sfc/siena/efx_channels.c +1
-1@@ -1285,7 +1285,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) { if (efx_channel_has_rx_queue(channel) &&drivers/net/ethernet/socionext/netsec.c +1
-1@@ -780,7 +780,7 @@ static void netsec_finalize_xdp_rx(struct netsec_priv *priv, u32 xdp_res, u16 pkts) {if (xdp_res &NETSEC_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &NETSEC_XDP_TX )netsec_xdp_ring_tx_db (priv, pkts);drivers/net/ethernet/ti/cpsw_priv.c +1
-2@@ -1360,7 +1360,7 @@ int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp,* particular hardware is sharing a common queue, so the * incoming device might change per packet. */ -xdp_do_flush_map (); +xdp_do_flush ();break ;default :bpf_warn_invalid_xdp_action (ndev, prog, act); --
Quoted 2 lines
2.40.1
For the socionext netsec part
Re: [PATCH net-next 1/2] net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
In reply to Sebastian Andrzej SiewiorQuoted 29 lines · Sebastian Andrzej Siewior
xdp_do_flush_map()is deprecated and new code should usexdp_do_flush()instead.Replace
xdp_do_flush_map()withxdp_do_flush().Cc AngeloGioacchino Del Regno <[email protected]>Cc Arthur Kiyanovski <[email protected]>Cc Clark Wang <[email protected]>Cc Claudiu Manoil <[email protected]>Cc David Arinzon <[email protected]>Cc Edward Cree <[email protected]>Cc Felix Fietkau <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Ilias Apalodimas <[email protected]>Cc Jassi Brar <[email protected]>Cc Jesse Brandeburg <[email protected]>Cc John Crispin <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Lorenzo Bianconi <[email protected]>Cc Louis Peens <[email protected]>Cc Marcin Wojtas <[email protected]>Cc Mark Lee <[email protected]>Cc Martin Habets <[email protected]>Cc Matthias Brugger <[email protected]>Cc NXP Linux Team <[email protected]>Cc Noam Dagan <[email protected]>Cc Russell King <[email protected]>Cc Saeed Bishara <[email protected]>Cc Saeed Mahameed <[email protected]>
Quoted 8 lines
Cc Sean Wang <[email protected]>Cc Shay Agroskin <[email protected]>Cc Shenwei Wang <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Tony Nguyen <[email protected]>Cc Vladimir Oltean <[email protected]>Cc Wei Fang <[email protected]>Signed-off-by Sebastian Andrzej Siewior <[email protected]>
For sfc drivers:
Quoted 230 lines
--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 2 +- drivers/net/ethernet/sfc/siena/efx_channels.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)drivers/net/ethernet/amazon/ena/ena_netdev.c +1
-1@@ -1828,7 +1828,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, }if (xdp_flags &ENA_XDP_REDIRECT ) -xdp_do_flush_map (); +xdp_do_flush ();return work_done;drivers/net/ethernet/freescale/enetc/enetc.c +1
-1@@ -1655,7 +1655,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring, rx_ring->stats.bytes += rx_byte_cnt;if (xdp_redirect_frm_cnt) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_tx_frm_cnt)enetc_update_tx_ring_tail (tx_ring);drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -1832,7 +1832,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) rxq->bd.cur = bdp;if (xdp_result &FEC_ENET_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();return pkt_received; }drivers/net/ethernet/intel/i40e/i40e_txrx.c +1
-1@@ -2405,7 +2405,7 @@ void i40e_update_rx_stats(struct i40e_ring *rx_ring,void i40e_finalize_xdp_rx (struct i40e_ring *rx_ring,unsigned int xdp_res) {if (xdp_res &I40E_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &I40E_XDP_TX ) { struct i40e_ring *xdp_ring =drivers/net/ethernet/intel/ice/ice_txrx_lib.c +1
-1@@ -450,7 +450,7 @@ void ice_finalize_xdp_rx(struct ice_tx_ring *xdp_ring, unsigned int xdp_res,struct ice_tx_buf *tx_buf = &xdp_ring->tx_buf[first_idx];if (xdp_res &ICE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &ICE_XDP_TX ) {if (static_branch_unlikely (&ice_xdp_locking_key))drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1
-1@@ -2421,7 +2421,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring =ixgbe_determine_xdp_ring (adapter);drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +1
-1@@ -351,7 +351,7 @@ int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector, }if (xdp_xmit &IXGBE_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_xmit &IXGBE_XDP_TX ) {struct ixgbe_ring *ring =ixgbe_determine_xdp_ring (adapter);drivers/net/ethernet/marvell/mvneta.c +1
-1@@ -2520,7 +2520,7 @@ static int mvneta_rx_swbm(struct napi_struct *napi,mvneta_xdp_put_buff (pp, rxq, &xdp_buf,-1 );if (ps.xdp_redirect) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets)mvneta_update_stats (pp, &ps);drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1
-1@@ -4027,7 +4027,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi, }if (xdp_ret &MVPP2_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (ps.rx_packets) {struct mvpp2_pcpu_stats *stats =this_cpu_ptr (port->stats);drivers/net/ethernet/mediatek/mtk_eth_soc.c +1
-1@@ -2209,7 +2209,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,net_dim (ð->rx_dim, dim_sample);if (xdp_flush) -xdp_do_flush_map (); +xdp_do_flush ();return done; }drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +1
-1@@ -893,7 +893,7 @@ void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq)mlx5e_xmit_xdp_doorbell (xdpsq);if (test_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags)) { -xdp_do_flush_map (); +xdp_do_flush ();__clear_bit (MLX5E_RQ_FLAG_XDP_REDIRECT , rq->flags); } }drivers/net/ethernet/netronome/nfp/nfd3/xsk.c +1
-1@@ -256,7 +256,7 @@ nfp_nfd3_xsk_rx(struct nfp_net_rx_ring *rx_ring, int budget,nfp_net_xsk_rx_ring_fill_freelist (r_vec->rx_ring);if (xdp_redir) -xdp_do_flush_map (); +xdp_do_flush ();if (tx_ring->wr_ptr_add)nfp_net_tx_xmit_more_flush (tx_ring);drivers/net/ethernet/sfc/efx_channels.c +1
-1@@ -1260,7 +1260,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) { if (efx_channel_has_rx_queue(channel) &&drivers/net/ethernet/sfc/siena/efx_channels.c +1
-1@@ -1285,7 +1285,7 @@ static int efx_poll(struct napi_struct *napi, int budget) spent =efx_process_channel (channel, budget); -xdp_do_flush_map (); +xdp_do_flush ();if (spent < budget) { if (efx_channel_has_rx_queue(channel) &&drivers/net/ethernet/socionext/netsec.c +1
-1@@ -780,7 +780,7 @@ static void netsec_finalize_xdp_rx(struct netsec_priv *priv, u32 xdp_res, u16 pkts) {if (xdp_res &NETSEC_XDP_REDIR ) -xdp_do_flush_map (); +xdp_do_flush ();if (xdp_res &NETSEC_XDP_TX )netsec_xdp_ring_tx_db (priv, pkts);drivers/net/ethernet/ti/cpsw_priv.c +1
-1@@ -1360,7 +1360,7 @@ int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp,* particular hardware is sharing a common queue, so the * incoming device might change per packet. */ -xdp_do_flush_map (); +xdp_do_flush ();break ;default :bpf_warn_invalid_xdp_action (ndev, prog, act);Signature · 1 line
2.40.1
Re: [PATCH net-next 1/2] net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
In reply to Sebastian Andrzej SiewiorQuoted 5 lines · Sebastian Andrzej Siewior
xdp_do_flush_map()is deprecated and new code should usexdp_do_flush()instead.Replace
xdp_do_flush_map()withxdp_do_flush().
[...]
Quoted 11 lines
Signed-off-by Sebastian Andrzej Siewior<[email protected]>--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
Quoted 8 lines
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 2 +- drivers/net/ethernet/sfc/siena/efx_channels.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)
Happy to see this cleanup across all drivers.
PATCH 2/2 bpf: Remove xdp_do_flush_map().
In reply to Sebastian Andrzej Siewiorxdp_do_flush_map() can be removed because there is no more user in tree.
Remove xdp_do_flush_map().
--- include/linux/filter.h | 6 ------ 1 file changed, 6 deletions(-)
include/linux/filter.h +0 -6
@@ -981,12 +981,6 @@ int xdp_do_redirect_frame(struct net_device *dev, struct bpf_prog *prog);void xdp_do_flush (void ); -/* The xdp_do_flush_map() helper has been renamed to drop the _map suffix, as -* it is no longer only flushing maps. Keep this define for compatibility -* until all drivers are updated - do not use xdp_do_flush_map() in new code! -*/ -#define xdp_do_flush_map xdp_do_flush -void bpf_warn_invalid_xdp_action (struct net_device *dev,struct bpf_prog *prog,u32 act);#ifdef CONFIG_INET
Signature · 1 line
2.40.1
Quoted 5 lines · Sebastian Andrzej Siewior
xdp_do_flush_map()can be removed because there is no more user in tree.Remove
xdp_do_flush_map().Signed-off-by Sebastian Andrzej Siewior <[email protected]>
Quoted 6 lines · Sebastian Andrzej Siewior
xdp_do_flush_map()can be removed because there is no more user in tree.Remove
xdp_do_flush_map().Signed-off-by Sebastian Andrzej Siewior <[email protected]>---
Thanks for cleaning up :-)
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Fri, 8 Sep 2023 16:32:13 +0200 you wrote:
Hi,
#1 is a s/xdp_do_flush_map/xdp_do_flush/ on all drivers. #2 follows as the removal of
xdp_do_flush_mapfrom the API.I had #1 split in several patches per vendor and then decided to merge it. I can repost it with one patch per vendor if this preferred.
[...]
Here is the summary with links:
- [net-next,1/2] net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().
https://git.kernel.org/netdev/net-next/c/7f04bd109d4c - [net-next,2/2] bpf: Remove xdp_do_flush_map(). https://git.kernel.org/netdev/net-next/c/75cec20345fa
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html