This patchset adds two more tests where the mirror-to-gretap has a
bridge in underlay packet path, without a VLAN above or below that
bridge.
In patch #1, a non-VLAN-filtering bridge is tested.
In patch #2, a VLAN-filtering bridge is tested.
Petr Machata (2):
selftests: forwarding: Test mirror-to-gretap w/ UL 802.1d
selftests: forwarding: Test mirror-to-gretap w/ UL 802.1q
.../net/forwarding/mirror_gre_bridge_1d.sh | 132 +++++++++++++++++++++
.../net/forwarding/mirror_gre_bridge_1q.sh | 126 ++++++++++++++++++++
2 files changed, 258 insertions(+)
create mode 100755 tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d.sh
create mode 100755 tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh
--
2.4.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tests test_tunnel.sh fails due to config fragments ins't enabled.
Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
All tests passes except ip6gretap that still fails. I'm unsure why.
Ideas?
Cheers,
Anders
tools/testing/selftests/bpf/config | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 1eefe211a4a8..7eb613ffef55 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -7,3 +7,13 @@ CONFIG_CGROUP_BPF=y
CONFIG_NETDEVSIM=m
CONFIG_NET_CLS_ACT=y
CONFIG_NET_SCH_INGRESS=y
+CONFIG_NET_IPIP=y
+CONFIG_IPV6=y
+CONFIG_NET_IPGRE_DEMUX=y
+CONFIG_NET_IPGRE=y
+CONFIG_IPV6_GRE=y
+CONFIG_CRYPTO_USER_API_HASH=m
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_VXLAN=y
+CONFIG_GENEVE=y
--
2.17.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
There are a number of tests that check features of the Linux networking
stack. By running them on suitable interfaces, one can exercise the
mlxsw offloading code. However none of these tests attempts to push
mlxsw to the limits supported by the ASIC.
As an additional wrinkle, the "limits supported by the ASIC" themselves
may not be a set of fixed numbers, but rather depend on a profile that
determines how the ASIC resources are allocated for different purposes.
This patchset introduces several tests that verify capability of mlxsw
to offload amounts of routes, flower rules, and mirroring sessions that
match predicted ASIC capacity, at different configuration profiles.
Additionally they verify that amounts exceeding the predicted capacity
can *not* be offloaded.
These are not generic tests, but ones that are tailored for mlxsw
specifically. For that reason they are not added to net/forwarding
selftests subdirectory, but rather to a newly-added drivers/net/mlxsw.
Patches #1, #2 and #3 tweak the generic forwarding/lib.sh to support the
new additions.
In patches #4 and #5, new libraries for interfacing with devlink are
introduced, first a generic one, then a Spectrum-specific one.
In patch #6, a devlink resource test is introduced.
Patches #7 and #8, #9 and #10, and #11 and #12 introduce three scale
tests: router, flower and mirror-to-gretap. The first of each pair of
patches introduces a generic portion of the test (mlxsw-specific), the
second introduces a Spectrum-specific wrapper.
Patch #13 then introduces a scale test driver that runs (possibly a
subset of) the tests introduced by patches from previous paragraph.
Arkadi Sharshevsky (1):
selftests: mlxsw: Add router test
Petr Machata (8):
selftests: forwarding: lib: Add check_err_fail()
selftests: forwarding: lib: Parameterize NUM_NETIFS in two functions
selftests: forwarding: Add devlink_lib.sh
selftests: mlxsw: Add devlink_lib_spectrum.sh
selftests: mlxsw: Add tc flower scale test
selftests: mlxsw: Add target for tc flower test on spectrum
selftests: mlxsw: Add scale test for mirror-to-gretap
selftests: mlxsw: Add target for mirror-to-gretap test on spectrum
Yuval Mintz (4):
selftests: forwarding: Allow lib.sh sourcing from other directories
selftests: mlxsw: Add devlink KVD resource test
selftests: mlxsw: Add target for router test on spectrum
selftests: mlxsw: Add scale test for resources
MAINTAINERS | 1 +
.../drivers/net/mlxsw/mirror_gre_scale.sh | 197 +++++++++++++++++++++
.../selftests/drivers/net/mlxsw/router_scale.sh | 167 +++++++++++++++++
.../net/mlxsw/spectrum/devlink_lib_spectrum.sh | 119 +++++++++++++
.../net/mlxsw/spectrum/devlink_resources.sh | 117 ++++++++++++
.../drivers/net/mlxsw/spectrum/mirror_gre_scale.sh | 13 ++
.../drivers/net/mlxsw/spectrum/resource_scale.sh | 55 ++++++
.../drivers/net/mlxsw/spectrum/router_scale.sh | 18 ++
.../drivers/net/mlxsw/spectrum/tc_flower_scale.sh | 19 ++
.../selftests/drivers/net/mlxsw/tc_flower_scale.sh | 134 ++++++++++++++
.../selftests/net/forwarding/devlink_lib.sh | 108 +++++++++++
tools/testing/selftests/net/forwarding/lib.sh | 30 +++-
12 files changed, 974 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/router_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/devlink_lib_spectrum.sh
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum/devlink_resources.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/router_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/tc_flower_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
create mode 100644 tools/testing/selftests/net/forwarding/devlink_lib.sh
--
2.4.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
The forwarding selftests infrastructure makes it possible to run the
individual tests on a purely software netdevices. Names of interfaces to
run the test with can be passed as command line arguments to a test.
lib.sh then creates veth pairs backing the interfaces if none exist in
the system.
However, the tests need to recognize that they might be run on a soft
device. Many mirror-to-gretap tests are buggy in this regard. This patch
set aims to fix the problems in running mirror-to-gretap tests on veth
devices.
In patch #1, a service function is split out of setup_wait().
In patch #2, installing a trap is made optional.
In patch #3, tc filters in several tests are tweaked to work with veth.
In patch #4, the logic for waiting for neighbor is fixed for veth.
Petr Machata (4):
selftests: forwarding: lib: Split out setup_wait_dev()
selftests: forwarding: lib: Avoid trapping soft devices
selftests: forwarding: Tweak tc filters for mirror-to-gretap tests
selftests: forwarding: mirror_gre_changes: Fix waiting for neighbor
tools/testing/selftests/net/forwarding/lib.sh | 41 +++++++++++++++-------
.../net/forwarding/mirror_gre_bridge_1d_vlan.sh | 6 ++--
.../selftests/net/forwarding/mirror_gre_changes.sh | 11 ++----
.../selftests/net/forwarding/mirror_gre_lib.sh | 2 +-
.../net/forwarding/mirror_gre_vlan_bridge_1q.sh | 6 ++--
5 files changed, 39 insertions(+), 27 deletions(-)
--
2.4.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Add a description that kernel config options should be added into a
config file that is placed next to the newly added test.
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
Documentation/dev-tools/kselftest.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index 3bf371a938d0..4c546a35bd58 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -156,6 +156,9 @@ Contributing new tests (details)
installed by the distro on the system should be the primary focus to be able
to find regressions.
+ * If a new test needs specific kernel options, they should be enabled in
+ then config file in the same directory where the test is added.
+
Test Harness
============
--
2.18.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Joel Fernandes (Google)" <joel(a)joelfernandes.org>
This is a posting of v9 preempt/irq tracepoint clean up series rebased
onto v4.18-rc2. No changes in the series, just a rebase + repost.
All patches have a Reviewed-by tags now from reviewers. This series has
been well tested and is a simplification/refactoring of existing code,
along with giving a speed-up for tracepoints using the rcu-idle API.
With this our users will find it easier to use tools depending on
existing preempt tracepoints since it simplifies the configuration for
them.
Future enhancements/fixes I am developing for preempt-off tracer will
depend on these patches, so I suggest prioritizing these well reviewed
and tested patches for that reason as well.
Introduction to the series:
The preempt/irq tracepoints exist but not everything in the kernel is using it
whenever they need to be notified that a preempt disable/enable or an irq
disable/enable has occurred. This makes things not work simultaneously (for
example, only either lockdep or irqsoff trace-events can be used at a time).
This is particularly painful to deal with, since turning on lockdep breaks
tracers that install probes on IRQ events, such as the BCC atomic critical
section tracer [1]. This constraint also makes it impossible to use synthetic
events to trace irqsoff sections with lockdep simulataneously turned on.
This series solves that, and also results in a nice clean up of relevant parts
of the kernel. Several ifdefs are simpler, and the design is more unified and
better. Also as a result of this, we also speeded performance all rcuidle
tracepoints since their handling is simpler.
[1] https://github.com/iovisor/bcc/blob/master/tools/criticalstat_example.txt
v8->v9:
- Small style changes to tracepoint code (Mathieu)
- Minor style fix to use PTR_ERR_OR_ZERO (0-day bot)
- Minor fix to test_atomic_sections to use unsigned long.
- Added Namhyung's, Mathieu's Reviewed-by to some patches.
- Added Acks from Matsami
v7->v8:
- Refactored irqsoff tracer probe defines (Namhyung)
v6->v7:
- Added a module to simulate an atomic section, a kselftest to load and
and trigger it which verifies the preempt-tracer and this series.
- Fixed a new warning after I rebased in early boot, this is because
early_boot_irqs_disabled was set too early, I moved it after the lockdep
initialization.
- added back the softirq fix since it appears it wasn't picked up.
- Ran Ingo's locking API selftest suite which are passing with this
series.
- Mathieu suggested ifdef'ing the tracepoint_synchronize_unregister
function incase tracepoints aren't enabled, did that.
Joel Fernandes (Google) (6):
srcu: Add notrace variant of srcu_dereference
trace/irqsoff: Split reset into separate functions
tracepoint: Make rcuidle tracepoint callers use SRCU
tracing: Centralize preemptirq tracepoints and unify their usage
lib: Add module to simulate atomic sections for testing preemptoff
tracers
kselftests: Add tests for the preemptoff and irqsoff tracers
Paul McKenney (1):
srcu: Add notrace variants of srcu_read_{lock,unlock}
include/linux/ftrace.h | 11 +-
include/linux/irqflags.h | 11 +-
include/linux/lockdep.h | 8 +-
include/linux/preempt.h | 2 +-
include/linux/srcu.h | 22 ++
include/linux/tracepoint.h | 49 +++-
include/trace/events/preemptirq.h | 23 +-
init/main.c | 5 +-
kernel/locking/lockdep.c | 35 +--
kernel/sched/core.c | 2 +-
kernel/trace/Kconfig | 22 +-
kernel/trace/Makefile | 2 +-
kernel/trace/trace_irqsoff.c | 253 ++++++------------
kernel/trace/trace_preemptirq.c | 71 +++++
kernel/tracepoint.c | 16 +-
lib/Kconfig.debug | 8 +
lib/Makefile | 1 +
lib/test_atomic_sections.c | 77 ++++++
tools/testing/selftests/ftrace/config | 3 +
.../test.d/preemptirq/irqsoff_tracer.tc | 73 +++++
20 files changed, 453 insertions(+), 241 deletions(-)
create mode 100644 kernel/trace/trace_preemptirq.c
create mode 100644 lib/test_atomic_sections.c
create mode 100644 tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
--
2.18.0.rc2.346.g013aa6912e-goog
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
fib_tests.sh became non-executable at some point. This is
what happens:
selftests: net: fib_tests.sh: Warning: file fib_tests.sh is
not executable, correct this.
not ok 1..11 selftests: net: fib_tests.sh [FAIL]
Fixes: d69faad76584 ("selftests: fib_tests: Add prefix route tests with metric")
Signed-off-by: Daniel Díaz <daniel.diaz(a)linaro.org>
---
tools/testing/selftests/net/fib_tests.sh | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 tools/testing/selftests/net/fib_tests.sh
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
old mode 100644
new mode 100755
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Fix up the existing ipsec selftest and add tests for
the ipsec offload driver API.
v2: addressed formatting nits in netdevsim from Jakub Kicinski
v3: a couple more nits from Jakub
Shannon Nelson (4):
selftests: rtnetlink: clear the return code at start of ipsec test
selftests: rtnetlink: use dummydev as a test device
netdevsim: add ipsec offload testing
selftests: rtnetlink: add ipsec offload API test
drivers/net/netdevsim/Makefile | 4 +
drivers/net/netdevsim/ipsec.c | 345 +++++++++++++++++++++++++++++++
drivers/net/netdevsim/netdev.c | 7 +
drivers/net/netdevsim/netdevsim.h | 37 ++++
tools/testing/selftests/net/rtnetlink.sh | 132 +++++++++++-
5 files changed, 518 insertions(+), 7 deletions(-)
create mode 100644 drivers/net/netdevsim/ipsec.c
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Joel Fernandes (Google)" <joel(a)joelfernandes.org>
This is a posting of v9 preempt/irq tracepoint clean up series rebased
onto v4.18-rc1. No changes in the series, just a rebase + repost.
Maintainers, this series has been well tested and is a simplification/
refactoring of existing code, along with giving a speed-up for
tracepoints using the rcu-idle API. I'm hoping for your consideration of
this series for the kernel. I am also eager for this so that our users
will find it easier to use tools depending on existing preempt
tracepoints since it simplifies the configuration for them.
All patches now have a Reviewed-by tag except for the kselftest script (7/7).
Peter, Ingo, Steve, others, your feedback and Acks are welcomed.
Introduction to the series:
The preempt/irq tracepoints exist but not everything in the kernel is using it
whenever they need to be notified that a preempt disable/enable or an irq
disable/enable has occurred. This makes things not work simultaneously (for
example, only either lockdep or irqsoff trace-events can be used at a time).
This is particularly painful to deal with, since turning on lockdep breaks
tracers that install probes on IRQ events, such as the BCC atomic critical
section tracer [2]. This constraint also makes it not possible to use synthetic
events to trace irqsoff sections with lockdep simulataneously turned on.
This series solves that, and also results in a nice clean up of relevant parts
of the kernel. Several ifdefs are simpler, and the design is more unified and
better. Also as a result of this, we also speeded performance all rcuidle
tracepoints since their handling is simpler.
[1] https://lkml.org/lkml/2018/6/7/1135
[2] https://github.com/iovisor/bcc/pull/1801/
v8->v9:
- Small style changes to tracepoint code (Mathieu)
- Minor style fix to use PTR_ERR_OR_ZERO (0-day bot)
- Minor fix to test_atomic_sections to use unsigned long.
- Added Namhyung's, Mathieu's Reviewed-by to some patches.
v7->v8:
- Refactored irqsoff tracer probe defines (Namhyung)
v6->v7:
- Added a module to simulate an atomic section, a kselftest to load and
and trigger it which verifies the preempt-tracer and this series.
- Fixed a new warning after I rebased in early boot, this is because
early_boot_irqs_disabled was set too early, I moved it after the lockdep
initialization.
- added back the softirq fix since it appears it wasn't picked up.
- Ran Ingo's locking API selftest suite which are passing with this
series.
- Mathieu suggested ifdef'ing the tracepoint_synchronize_unregister
function incase tracepoints aren't enabled, did that.
Joel Fernandes (Google) (6):
srcu: Add notrace variant of srcu_dereference
trace/irqsoff: Split reset into separate functions
tracepoint: Make rcuidle tracepoint callers use SRCU
tracing: Centralize preemptirq tracepoints and unify their usage
lib: Add module to simulate atomic sections for testing preemptoff
tracers
kselftests: Add tests for the preemptoff and irqsoff tracers
Paul McKenney (1):
srcu: Add notrace variants of srcu_read_{lock,unlock}
include/linux/ftrace.h | 11 +-
include/linux/irqflags.h | 11 +-
include/linux/lockdep.h | 8 +-
include/linux/preempt.h | 2 +-
include/linux/srcu.h | 22 ++
include/linux/tracepoint.h | 49 +++-
include/trace/events/preemptirq.h | 23 +-
init/main.c | 5 +-
kernel/locking/lockdep.c | 35 +--
kernel/sched/core.c | 2 +-
kernel/trace/Kconfig | 22 +-
kernel/trace/Makefile | 2 +-
kernel/trace/trace_irqsoff.c | 253 ++++++------------
kernel/trace/trace_preemptirq.c | 71 +++++
kernel/tracepoint.c | 16 +-
lib/Kconfig.debug | 8 +
lib/Makefile | 1 +
lib/test_atomic_sections.c | 77 ++++++
tools/testing/selftests/ftrace/config | 3 +
.../test.d/preemptirq/irqsoff_tracer.tc | 74 +++++
20 files changed, 454 insertions(+), 241 deletions(-)
create mode 100644 kernel/trace/trace_preemptirq.c
create mode 100644 lib/test_atomic_sections.c
create mode 100644 tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
--
2.18.0.rc2.346.g013aa6912e-goog
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jun 25, 2018 at 6:23 PM Li Zhijian <zhijianx.li(a)intel.com> wrote:
>
> On 6/25/2018 11:40 PM, Andy Lutomirski wrote:
> > On Mon, Jun 25, 2018 at 1:41 AM Li Zhijian <zhijianx.li(a)intel.com> wrote:
> >> Hi
> >>
> >> Intel 0Day noticed that test_syscall_vdso_32 failed since 8bb2610bc4967f19672444a7b0407367f1540028(x86/entry/64/compat: Preserve r8-r11 in int $0x80)
> >>
[snipped]
Indeed.
Hi Thomas-
Something went wrong when you applied the patch mentioned above. The
original patch is here:
https://lore.kernel.org/lkml/d4c4d9985fbe64f8c9e19291886453914b48caee.15239…
but somehow it got applied with huge offset -- the same exact change
was made, but it was made to the entirely wrong function! I'm a
little nervous about sending a fixup patch because there are three
copies of that code in the file, and I don't want to just move the
problem around. What's the right thing to do here?
Clearly this needs to get fixed somehow, and the fix should go to -stable.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html