netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/8] xdp: make stack perform remove and tests
@ 2017-12-01  1:35 Jakub Kicinski
  2017-12-01  1:35 ` [PATCH net-next v2 1/8] net: xdp: avoid output parameters when querying XDP prog Jakub Kicinski
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Jakub Kicinski @ 2017-12-01  1:35 UTC (permalink / raw)
  To: netdev; +Cc: davem, daniel, alexei.starovoitov, jiri, oss-drivers,
	Jakub Kicinski

Hi!

The purpose of this series is to add a software model of BPF offloads
to make it easier for everyone to test them and make some of the more
arcane rules and assumptions more clear.

The series starts with 3 patches aiming to make XDP handling in the
drivers less error prone.  Currently driver authors have to remember
to free XDP programs if XDP is active during unregister.  With this
series the core will disable XDP on its own.  It will take place
after close, drivers are not expected to perform reconfiguration
when disabling XDP on a downed device.

Next two patches add the software netdev driver, followed by a python 
test which exercises all the corner cases which came to my mind.

Test needs to be run as root.  It will print basic information to
stdout, but can also create a more detailed log of all commands
when --log option is passed.  Log is in Emacs Org-mode format.

  ./tools/testing/selftests/bpf/test_offload.py --log /tmp/log

Last two patches replace the SR-IOV API implementation of dummy.

v2:
 - free device from the release function;
 - use bus-based name generatin instead of netdev name.
v1:
 - replace the SR-IOV API implementation of dummy;
 - make the dev_xdp_uninstall() also handle the XDP generic (Daniel).


Jakub Kicinski (8):
  net: xdp: avoid output parameters when querying XDP prog
  net: xdp: report flags program was installed with on query
  net: xdp: make the stack take care of the tear down
  netdevsim: add software driver for testing offloads
  netdevsim: add bpf offload support
  selftests/bpf: add offload test based on netdevsim
  netdevsim: add SR-IOV functionality
  net: dummy: remove fake SR-IOV functionality

 MAINTAINERS                                        |   5 +
 drivers/net/Kconfig                                |  11 +
 drivers/net/Makefile                               |   1 +
 drivers/net/dummy.c                                | 215 +------
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |   2 -
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   3 -
 drivers/net/ethernet/netronome/nfp/bpf/main.c      |   7 -
 .../net/ethernet/netronome/nfp/nfp_net_common.c    |   4 +-
 drivers/net/ethernet/qlogic/qede/qede_main.c       |   4 -
 drivers/net/netdevsim/Makefile                     |   7 +
 drivers/net/netdevsim/bpf.c                        | 373 +++++++++++
 drivers/net/netdevsim/netdev.c                     | 501 +++++++++++++++
 drivers/net/netdevsim/netdevsim.h                  |  78 +++
 drivers/net/tun.c                                  |   4 -
 include/linux/netdevice.h                          |   5 +-
 net/core/dev.c                                     |  53 +-
 net/core/rtnetlink.c                               |   6 +-
 tools/testing/selftests/bpf/Makefile               |   5 +-
 tools/testing/selftests/bpf/sample_ret0.c          |   7 +
 tools/testing/selftests/bpf/test_offload.py        | 681 +++++++++++++++++++++
 20 files changed, 1714 insertions(+), 258 deletions(-)
 create mode 100644 drivers/net/netdevsim/Makefile
 create mode 100644 drivers/net/netdevsim/bpf.c
 create mode 100644 drivers/net/netdevsim/netdev.c
 create mode 100644 drivers/net/netdevsim/netdevsim.h
 create mode 100644 tools/testing/selftests/bpf/sample_ret0.c
 create mode 100755 tools/testing/selftests/bpf/test_offload.py

-- 
2.14.1

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

end of thread, other threads:[~2017-12-01 22:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-01  1:35 [PATCH net-next v2 0/8] xdp: make stack perform remove and tests Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 1/8] net: xdp: avoid output parameters when querying XDP prog Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 2/8] net: xdp: report flags program was installed with on query Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 3/8] net: xdp: make the stack take care of the tear down Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 4/8] netdevsim: add software driver for testing offloads Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 5/8] netdevsim: add bpf offload support Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 6/8] selftests/bpf: add offload test based on netdevsim Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 7/8] netdevsim: add SR-IOV functionality Jakub Kicinski
2017-12-01 13:43   ` Phil Sutter
2017-12-01 20:14     ` Jakub Kicinski
2017-12-01 21:36       ` Phil Sutter
2017-12-01 21:45         ` Jakub Kicinski
2017-12-01 21:58           ` Phil Sutter
2017-12-01 22:14             ` Jakub Kicinski
2017-12-01  1:35 ` [PATCH net-next v2 8/8] net: dummy: remove fake " Jakub Kicinski
2017-12-01 13:46   ` Phil Sutter
2017-12-01 20:19     ` Jakub Kicinski
2017-12-01 21:41       ` Phil Sutter

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