bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries
@ 2019-06-10 16:02 Björn Töpel
  2019-06-10 16:02 ` [PATCH bpf-next v3 1/5] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev Björn Töpel
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Björn Töpel @ 2019-06-10 16:02 UTC (permalink / raw)
  To: ast, daniel, netdev
  Cc: Björn Töpel, magnus.karlsson, bjorn.topel, toke,
	brouer, bpf, jakub.kicinski, saeedm

Here's yet another attempt tomove the XDP_QUERY_PROG{,_HW} code out
from the drivers to generic netdev code.

I took a bit different approach with the v3. In this revision I
introduced to a new netdev_xdp structure that tracks the XDP programs,
and instead of sharing the xdp_prog member between DRV and SKB (again,
they mutual exclusive). With this, there's no need for a special
"what-mode-am-I-in" flag for SKB/DRV.

Jakub, what's your thoughts on the special handling of XDP offloading?
Maybe it's just overkill? Just allocate space for the offloaded
program regardless support or not? Also, please review the
dev_xdp_support_offload() addition into the nfp code.

The last two patches move the attach flag checks to generic code, and
removes the flags member from netdev_bpf.

Please refer to the individual commit messages for more details.

The series passes test_offload.py from selftests. Thanks to Jakub for
pointing this out.


Thanks,
Björn

Björn Töpel (5):
  net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev
  nfp, netdevsim: use dev_xdp_support_offload() function
  net: xdp: remove XDP_QUERY_PROG{,_HW}
  net: xdp: refactor XDP flags checking
  net: xdp: remove xdp_attachment_flags_ok() and flags member

 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |   4 -
 .../net/ethernet/cavium/thunder/nicvf_main.c  |   3 -
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  |   3 -
 drivers/net/ethernet/intel/i40e/i40e_main.c   |   3 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   4 -
 .../net/ethernet/intel/ixgbevf/ixgbevf_main.c |   4 -
 .../net/ethernet/mellanox/mlx4/en_netdev.c    |  24 ---
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  18 --
 .../ethernet/netronome/nfp/nfp_net_common.c   |  10 -
 .../net/ethernet/netronome/nfp/nfp_net_main.c |   7 +
 .../net/ethernet/qlogic/qede/qede_filter.c    |   3 -
 drivers/net/netdevsim/bpf.c                   |   7 -
 drivers/net/netdevsim/netdev.c                |   4 +
 drivers/net/netdevsim/netdevsim.h             |   2 +-
 drivers/net/tun.c                             |  15 --
 drivers/net/veth.c                            |  15 --
 drivers/net/virtio_net.c                      |  17 --
 include/linux/netdevice.h                     |  30 +--
 include/net/xdp.h                             |   5 -
 net/core/dev.c                                | 172 ++++++++++++------
 net/core/rtnetlink.c                          |  31 +---
 net/core/xdp.c                                |  22 ---
 22 files changed, 147 insertions(+), 256 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-06-12 14:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10 16:02 [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries Björn Töpel
2019-06-10 16:02 ` [PATCH bpf-next v3 1/5] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev Björn Töpel
2019-06-10 16:02 ` [PATCH bpf-next v3 2/5] nfp, netdevsim: use dev_xdp_support_offload() function Björn Töpel
2019-06-10 16:02 ` [PATCH bpf-next v3 3/5] net: xdp: remove XDP_QUERY_PROG{,_HW} Björn Töpel
2019-06-10 16:02 ` [PATCH bpf-next v3 4/5] net: xdp: refactor XDP flags checking Björn Töpel
2019-06-10 16:02 ` [PATCH bpf-next v3 5/5] net: xdp: remove xdp_attachment_flags_ok() and flags member Björn Töpel
2019-06-10 22:24 ` [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries Jakub Kicinski
2019-06-11  7:24   ` Björn Töpel
2019-06-11 12:17     ` Toke Høiland-Jørgensen
2019-06-11 17:22     ` Jakub Kicinski
2019-06-12  5:38       ` Björn Töpel
2019-06-12 14:31     ` Jonathan Lemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).