linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/7] selftests/bpf: Restore test_offload.py to working order
@ 2020-12-04 11:52 Toke Høiland-Jørgensen
  2020-12-04 11:52 ` [PATCH bpf v2 1/7] xdp: remove the xdp_attachment_flags_ok() callback Toke Høiland-Jørgensen
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Toke Høiland-Jørgensen @ 2020-12-04 11:52 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: David S. Miller, Daniel Borkmann, Alexei Starovoitov,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Jesper Dangaard Brouer,
	Michael S. Tsirkin, Romain Perier, Allen Pais, Grygorii Strashko,
	Simon Horman, Gustavo A. R. Silva, Lorenzo Bianconi, Wei Yongjun,
	Jiri Benc, oss-drivers, linux-omap, netdev, bpf

This series restores the test_offload.py selftest to working order. It seems a
number of subtle behavioural changes have crept into various subsystems which
broke test_offload.py in a number of ways. Most of these are fairly benign
changes where small adjustments to the test script seems to be the best fix, but
one is an actual kernel bug that I've observed in the wild caused by a bad
interaction between xdp_attachment_flags_ok() and the rework of XDP program
handling in the core netdev code.

Patch 1 fixes the bug by removing xdp_attachment_flags_ok(), and the reminder of
the patches are adjustments to test_offload.py, including a new feature for
netdevsim to force a BPF verification fail. Please see the individual patches
for details.

Changelog:

v2:
- Replace xdp_attachment_flags_ok() with a check in dev_xdp_attach()
- Better packing of struct nsim_dev

---

Toke Høiland-Jørgensen (7):
      xdp: remove the xdp_attachment_flags_ok() callback
      selftests/bpf/test_offload.py: Remove check for program load flags match
      netdevsim: Add debugfs toggle to reject BPF programs in verifier
      selftests/bpf/test_offload.py: only check verifier log on verification fails
      selftests/bpf/test_offload.py: fix expected case of extack messages
      selftests/bpf/test_offload.py: reset ethtool features after failed setting
      selftests/bpf/test_offload.py: filter bpftool internal map when counting maps


 .../ethernet/netronome/nfp/nfp_net_common.c   |  6 ---
 drivers/net/ethernet/ti/cpsw_priv.c           |  3 --
 drivers/net/netdevsim/bpf.c                   | 15 ++++--
 drivers/net/netdevsim/netdevsim.h             |  1 +
 include/net/xdp.h                             |  2 -
 net/core/dev.c                                | 22 +++++++-
 net/core/xdp.c                                | 12 -----
 tools/testing/selftests/bpf/test_offload.py   | 53 ++++++++++---------
 8 files changed, 60 insertions(+), 54 deletions(-)


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

end of thread, other threads:[~2020-12-08 22:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 11:52 [PATCH bpf v2 0/7] selftests/bpf: Restore test_offload.py to working order Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 1/7] xdp: remove the xdp_attachment_flags_ok() callback Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 2/7] selftests/bpf/test_offload.py: Remove check for program load flags match Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 3/7] netdevsim: Add debugfs toggle to reject BPF programs in verifier Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 4/7] selftests/bpf/test_offload.py: only check verifier log on verification fails Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 5/7] selftests/bpf/test_offload.py: fix expected case of extack messages Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 6/7] selftests/bpf/test_offload.py: reset ethtool features after failed setting Toke Høiland-Jørgensen
2020-12-04 11:52 ` [PATCH bpf v2 7/7] selftests/bpf/test_offload.py: filter bpftool internal map when counting maps Toke Høiland-Jørgensen
2020-12-08 14:18 ` [PATCH bpf v2 0/7] selftests/bpf: Restore test_offload.py to working order Toke Høiland-Jørgensen
2020-12-08 17:03   ` Jakub Kicinski
2020-12-08 22:00     ` Toke Høiland-Jørgensen

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