netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/9] bpf: xdp: Report bpf_prog ID in IFLA_XDP
@ 2017-06-16  0:29 Martin KaFai Lau
  2017-06-16  0:29 ` [PATCH v3 net-next 1/9] net: Add IFLA_XDP_PROG_ID Martin KaFai Lau
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Martin KaFai Lau @ 2017-06-16  0:29 UTC (permalink / raw)
  To: netdev; +Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team

This is the first usage of the new bpf_prog ID.  It is for
reporting the ID of a xdp_prog through netlink.

It rides on the existing IFLA_XDP.  This patch adds IFLA_XDP_PROG_ID
for the bpf_prog ID reporting.

It starts with changing the generic_xdp first.  After that,
the hardware driver is changed one by one.  Jakub Kicinski mentioned
that he will soon introduce XDP_ATTACHED_HW (on top of the existing
XDP_ATTACHED_DRV and XDP_ATTACHED_SKB)
and he is going to reuse the prog_attached for this purpose.
Hence, this patch set keeps the prog_attached even though
!!prog_id also implies there is xdp_prog attached.

I have tested with generic_xdp, mlx4 and mlx5.

v3:
1. Replace 'if' by '?' when checking the xdp_prog pointer
   as suggested by Jakub Kicinski (thanks!)

v2:
1. Remove READ_ONCE since it is alredy under rtnl lock
2. Keep prog_attached in 'struct netdev_xdp' as
   requested by Jakub Kicinski.  The existing prog_attached
   and the new prog_id are put under a struct for XDP_QUERY_PROG.

Martin KaFai Lau (9):
  net: Add IFLA_XDP_PROG_ID
  bpf: mlx4: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: mlx5e: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: virtio_net: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: bnxt: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: thunderx: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: ixgbe: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG
  bpf: qede: Report bpf_prog ID during XDP_QUERY_PROG

 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c      |  1 +
 drivers/net/ethernet/cavium/thunder/nicvf_main.c   |  1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |  2 ++
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c     | 21 ++++++++++++++---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  | 15 +++++++++---
 .../net/ethernet/netronome/nfp/nfp_net_common.c    |  1 +
 drivers/net/ethernet/qlogic/qede/qede_filter.c     |  1 +
 drivers/net/virtio_net.c                           | 13 +++++++----
 include/linux/netdevice.h                          |  7 ++++--
 include/uapi/linux/if_link.h                       |  1 +
 net/core/dev.c                                     | 19 ++++++++-------
 net/core/rtnetlink.c                               | 27 +++++++++++++++++-----
 12 files changed, 82 insertions(+), 27 deletions(-)

-- 
2.9.3

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

end of thread, other threads:[~2017-06-16 15:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16  0:29 [PATCH v3 net-next 0/9] bpf: xdp: Report bpf_prog ID in IFLA_XDP Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 1/9] net: Add IFLA_XDP_PROG_ID Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 2/9] bpf: mlx4: Report bpf_prog ID during XDP_QUERY_PROG Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 3/9] bpf: mlx5e: " Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 4/9] bpf: virtio_net: " Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 5/9] bpf: bnxt: " Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 6/9] bpf: thunderx: " Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 7/9] bpf: ixgbe: " Martin KaFai Lau
2017-06-16  0:29 ` [PATCH v3 net-next 8/9] bpf: nfp: " Martin KaFai Lau
2017-06-16  1:05   ` Jakub Kicinski
2017-06-16  0:29 ` [PATCH v3 net-next 9/9] bpf: qede: " Martin KaFai Lau
2017-06-16 15:59 ` [PATCH v3 net-next 0/9] bpf: xdp: Report bpf_prog ID in IFLA_XDP David Miller

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).