Message ID | cover.1608670965.git.lorenzo@kernel.org |
---|---|
Headers | show |
Series | introduce xdp_init_buff/xdp_prepare_buff | expand |
Hi Lorenzo, wt., 22 gru 2020 o 22:13 Lorenzo Bianconi <lorenzo@kernel.org> napisaĆ(a): > > Introduce xdp_init_buff and xdp_prepare_buff utility routines to initialize > xdp_buff data structure and remove duplicated code in all XDP capable > drivers. > > Changes since v4: > - fix xdp_init_buff/xdp_prepare_buff (natural order is xdp_init_buff() first > and then xdp_prepare_buff()) > > Changes since v3: > - use __always_inline instead of inline for xdp_init_buff/xdp_prepare_buff > - add 'const bool meta_valid' to xdp_prepare_buff signature to avoid > overwriting data_meta with xdp_set_data_meta_invalid() > - introduce removed comment in bnxt driver > > Changes since v2: > - precompute xdp->data as hard_start + headroom and save it in a local > variable to reuse it for xdp->data_end and xdp->data_meta in > xdp_prepare_buff() > > Changes since v1: > - introduce xdp_prepare_buff utility routine > > Lorenzo Bianconi (2): > net: xdp: introduce xdp_init_buff utility routine > net: xdp: introduce xdp_prepare_buff utility routine > > Acked-by: Shay Agroskin <shayagr@amazon.com> > Acked-by: Martin Habets <habetsm.xilinx@gmail.com> > Acked-by: Camelia Groza <camelia.groza@nxp.com> > For Marvell mvpp2: Acked-by: Marcin Wojtas <mw@semihalf.com> Thanks, Marcin
On Tue, 22 Dec 2020 22:09:28 +0100 Lorenzo Bianconi <lorenzo@kernel.org> wrote: > Introduce xdp_init_buff utility routine to initialize xdp_buff fields > const over NAPI iterations (e.g. frame_sz or rxq pointer). Rely on > xdp_init_buff in all XDP capable drivers. > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> > --- > drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +-- > drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 ++-- > drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 ++-- > drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 ++-- > drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 8 ++++---- > drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 +++--- > drivers/net/ethernet/intel/ice/ice_txrx.c | 6 +++--- > drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++---- > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 +++---- > drivers/net/ethernet/marvell/mvneta.c | 3 +-- > drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 +++++--- > drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +-- > drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +-- > drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- > drivers/net/ethernet/qlogic/qede/qede_fp.c | 3 +-- > drivers/net/ethernet/sfc/rx.c | 3 +-- > drivers/net/ethernet/socionext/netsec.c | 3 +-- > drivers/net/ethernet/ti/cpsw.c | 4 ++-- > drivers/net/ethernet/ti/cpsw_new.c | 4 ++-- > drivers/net/hyperv/netvsc_bpf.c | 3 +-- > drivers/net/tun.c | 7 +++---- > drivers/net/veth.c | 8 ++++---- > drivers/net/virtio_net.c | 6 ++---- > drivers/net/xen-netfront.c | 4 ++-- > include/net/xdp.h | 7 +++++++ > net/bpf/test_run.c | 4 ++-- > net/core/dev.c | 8 ++++---- > 28 files changed, 68 insertions(+), 72 deletions(-) Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer
Lorenzo Bianconi wrote: > Introduce xdp_init_buff utility routine to initialize xdp_buff fields > const over NAPI iterations (e.g. frame_sz or rxq pointer). Rely on > xdp_init_buff in all XDP capable drivers. > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> > --- Seems like a nice bit of cleanup. I spot checked math in a few drivers LGTM. Acked-by: John Fastabend <john.fastabend@gmail.com>