Add a testsuite dedicated to testing extack propagation and related
functionality.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
---
.../testing/selftests/drivers/net/mlxsw/extack.sh | 84 ++
1 file changed, 84 insertions(+)
create mode
In order to propagate extack through NETDEV_PRE_UP, add a new function
call_netdevice_notifiers_extack() that primes the extack field of the
notifier info. Convert call_netdevice_notifiers() to a simple wrapper
around the new function that passes NULL for extack.
Signed-off-by: Petr Machata
__dev_change_flags() and dev_open(), where it was propagated in the
previous patches.
Change __dev_open() to call call_netdevice_notifiers_extack() so that
the passed-in extack is attached to the NETDEV_PRE_UP notifier.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
Reviewed
existing users.
Since the function declaration line is changed anyway, name the struct
net_device argument to placate checkpatch.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
include/linux/netdevice.h | 3 ++-
net/core/dev.c
extack argument and
update all users. Most of the calls end up just encoding NULL, but
several sites (VLAN, ipvlan, VRF, rtnetlink) do have extack available.
Since the function declaration line is changed anyway, name the other
function arguments to placate checkpatch.
Signed-off-by: Petr Machata
A follow-up patch will extend dev_change_flags() with an extack
argument. Extend ipvlan_set_port_mode() to have that argument available
for the conversion.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
---
drivers/net/ipvlan/ipvlan_main.c | 7 ---
1 file
A follow-up patch will extend dev_change_flags() with an extack
argument. Extend cycle_netdev() to have that argument available for the
conversion.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
drivers/net/vrf.c | 7 ---
1 file
and update
all users. Most of the calls end up just encoding NULL, but bond and
team drivers have the extack readily available.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
drivers/net/bonding/bond_main.c | 2
ttl 200
# ip link set dev vx2 up
Error: mlxsw_spectrum: Conflicting NVE tunnels configuration.
v2:
- Add David Ahern's tags.
Petr Machata (8):
net: core: dev: Add extack argument to dev_open()
net: vrf: cycle_netdev(): Add an extack argument
net: ipvlan: ipvlan_set_port_mode(): Add
David Miller writes:
> Your CC list is so huge that vger.kernel.org dropped all of your postings.
>
> That CC list is not reasonable at all, trim it down to the most minimum
> set. Probably 2 or 3 mailing lists, primarily netdev, and maybe a small
> handful of specific developers.
>
> Nothing
Test that when a second or following command in a batch fails, tc
reports it correctly. This is a test for the previous patch.
Signed-off-by: Petr Machata
---
testsuite/tests/tc/batch.t | 23 +++
1 file changed, 23 insertions(+)
create mode 100755 testsuite/tests/tc/batch.t
When no error is reported in the first iov, do not prematurely return,
but process further iovs. This fixes batch processing.
Fixes: c60389e4f9ea ("libnetlink: fix leak and using unused memory on error")
Signed-off-by: Petr Machata
---
lib/libnetlink.c | 3 +++
1 file changed, 3
Petr Machata writes:
> An offloading driver may need to have access to switchdev events on
> ports that aren't directly under its control. An example is a VXLAN port
> attached to a bridge offloaded by a driver. The driver needs to know
> about VLANs configured on the VXLAN dev
Due to an explicit check in rocker_world_port_obj_vlan_add(),
dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects
that are added to a device that is not a front-panel port device are
ignored. Therefore this check is immaterial.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
.
Update switchdev_port_obj_del_now() to dispatch to this new function.
Drop __switchdev_port_obj_add() and update switchdev_port_obj_add()
likewise.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 -
drivers/net/ethernet/mscc/ocelot.c
through switchdev_handle_port_obj_add() / _del() to
handle the recursive descend, because Ocelot supports LAG uppers.
Register to the new switchdev blocking notifier chain to get the new
events when they start getting distributed.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
---
drivers/net
the behavior that the switchdev operation based code currently
has. Defer to switchdev_handle_port_obj_add() / _del() to handle the
recursive descend, because mlxsw supports a number of upper types.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../ethernet/mellanox/mlxsw/spectrum_switchdev.c
shed under one master, a scenario
that switchdev currently happily supports. Therefore tolerate any and
all unknown netdevices, whether they are backed by a switchdev driver
or not.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
include/net/switchdev.h | 33 +++
net
case is that the
notification is on a front-panel port netdevice.
To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking
notifier chain. Dispatch to swdev_port_obj_add() resp. _del() to
maintain the behavior that the switchdev operation based code currently
has.
Signed-off-by: Petr
to the blocking notifier chain. In the handler, filter out
notifications on any foreign netdevices. Dispatch the new notifiers to
rocker_port_obj_add() resp. _del() to maintain the behavior that the
switchdev operation based code currently has.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
ethsw currently uses an open-coded comparison of netdev_ops to determine
whether whether a device represents a front panel port. Wrap this into a
named function to simplify reuse.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
---
drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 7 ++-
1 file
that the switchdev operation based code currently
has.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
---
net/dsa/slave.c | 56
1 file changed, 56 insertions(+)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 7d0c19e7edcf..d00a0b6d4ce0 100644
the notifications for which a blocking context
can be assumed.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
Reviewed-by: Ido Schimmel
---
include/net/switchdev.h | 27 +++
net/switchdev/switchdev.c | 26 ++
2 files changed, 53 insertions(+)
diff --git
ides with the member name) to "OBJ". Additionally,
instead of passing "OBJ" to container_of() verbatim, parenthesize it, so
that a comma in the passed-in expression doesn't pollute the
container_of() invocation.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Sc
are kept in place. Following
patches first convert individual clients to the notifier protocol, and
only then are the operations removed.
Signed-off-by: Petr Machata
Acked-by: Jiri Pirko
Reviewed-by: Ido Schimmel
---
include/net/switchdev.h | 10 ++
1 file changed, 10 insertions(+)
diff
Therefore remove it in patch #12.
Petr Machata (12):
switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize
switchdev: Add a blocking notifier chain
switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL
rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL
net: dsa: slave: Handle SWITCHDEV_PO
uot;skbuff: Add the offload_mr_fwd_mark field")
Signed-off-by: Petr Machata
Suggested-by: Ido Schimmel
---
net/core/skbuff.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b4ee5c8b928f..a8217e221e19 100644
--- a/net/core/skbuff.c
+++
David Miller writes:
> From: Ido Schimmel
> Date: Mon, 19 Nov 2018 16:11:07 +
>
>> From: Petr Machata
>>
>> When a packet is trapped and the corresponding SKB marked as
>> already-forwarded, it retains this marking even after it is forwarded
>>
t;
> Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Ido Schimmel writes:
> Test various aspects of VxLAN offloading which are specific to mlxsw,
> such as sanitization of invalid configurations and offload indication.
>
> Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Ido Schimmel writes:
> On Mon, Sep 24, 2018 at 12:04:17AM +0200, Andrew Lunn wrote:
>> But doesn't that mean you reflash the device with the minimum version,
>> when in fact there could be a much newer version in /lib/firmware?
>
> No, because we always enforce the latest version we post to
>
s admitted to the egress buffer.
Fix the configuration by directing the MC TCs into pool 15, which is
dedicated to MC traffic and recognized as such by the silicon.
Fixes: 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
Signed-off-by: Petr Machata
Acked-by: Jiri Pir
David Miller writes:
> From: Jakub Kicinski
> Date: Thu, 2 Aug 2018 10:11:12 -0700
>
>> On Thu, 02 Aug 2018 11:29:12 +0300, Petr Machata wrote:
>>> Could you please clarify your remark?
>>
>> Oh, I think David meant the patches I was objecting to a w
David Miller writes:
> From: Jakub Kicinski
> Date: Wed, 1 Aug 2018 17:00:47 -0700
>
>> On Wed, 1 Aug 2018 14:52:45 -0700, Saeed Mahameed wrote:
>>> - According to the discussion outcome, we are keeping the congestion control
>>> setting as mlx5 device specific for the current HW generation.
eam
device is on egress path of a mirrored packet in a mirror-to-gretap
scenario. In the first one, the team device is in loadbalance mode, in
the second one it's in lacp mode. (The difference in modes necessitates
a different testing strategy, hence two test cases instead of just
parameterizing one.)
Petr
Instead of relying on "arping" being installed everywhere under that
name, introduce a variable $ARPING like the other tools do.
Convert an existing test, mirror_gre_vlan_bridge_1q.sh to
require_command $ARPING and then invoke arping through the variable.
Signed-off-by: Petr Machata
of a device.
Signed-off-by: Petr Machata
---
.../net/forwarding/mirror_gre_lag_lacp.sh | 285 +
1 file changed, 285 insertions(+)
create mode 100755
tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh
diff --git a/tools/testing/selftests/net/forwarding
Signed-off-by: Petr Machata
---
.../net/forwarding/mirror_gre_bridge_1q_lag.sh | 283 +
1 file changed, 283 insertions(+)
create mode 100755
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh
diff --git a/tools/testing/selftests/net/
Add team_create() and team_destroy() to manage team netdevices.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing/selftests/net
any test that
wishes to declare dependence on some command.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing
value).
In combination these two bugs conspire to make the test just work,
except it doesn't really test anything and always passes.
Fix the above two problems in obvious manner.
Signed-off-by: Petr Machata
---
tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh | 4 ++--
1 file changed
y: Jakub Kicinski
Reviewed-by: Petr Machata
hop
like that yield an explicit diagnostic.
Correspondingly, drop the IPv6 parts of GRE multipath test that are
supposed to test that code.
Signed-off-by: Petr Machata
---
.../selftests/net/forwarding/gre_multipath.sh | 113 ++---
1 file changed, 6 insertions(+), 107 deletions(-)
on the VRF rejects it.
Therefore turn off the VRF's RP filter.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_gre_nh.sh | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
b/tools/testing/selftests/net/forwarding
test_gretap_untagged_egress. Decreasing ping cadence in mirror_test()
makes the problem easily reproducible.
Therefore tighten up the match criterion to only count those 802.1q
packets where the next header is IP.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_lib.sh | 2 +-
1 file
to source their deps through $relative_path.
That variable is set up by lib.sh, which should be imported by the test
in question in any case.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_gre_lib.sh | 2 +-
tools/testing/selftests/net/forwarding
Test several aspects of offloading mirror to gretap and ip6gretap
netdevices that are specific to mlxsw, such as requirements for TTL and
TOS values.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
---
.../selftests/drivers/net/mlxsw/mirror_gre.sh | 217 +
1 file
/.
In patch #2, add a test to check handling of several scenarios that
mlxsw is expected to fail to offload.
Petr Machata (2):
selftests: forwarding: Allow importing dependent libraries
selftests: mlxsw: Add mlxsw-specific test for mirror to gretap
.../selftests/drivers/net/mlxsw
Test for "tc action mirred egress mirror" that mirrors to gretap when
the underlay route points at a VLAN-aware bridge (802.1q).
Signed-off-by: Petr Machata
---
.../net/forwarding/mirror_gre_bridge_1q.sh | 126 +
1 file changed, 126 insertions(+)
create m
Test for "tc action mirred egress mirror" that mirrors to gretap when
the underlay route points at a VLAN-unaware bridge (802.1d).
Signed-off-by: Petr Machata
---
.../net/forwarding/mirror_gre_bridge_1d.sh | 132 +
1 file changed, 132 insertions(+)
c
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
-off-by: Yuval Mintz
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/spectrum/resource_scale.sh | 55 ++
1 file changed, 55 insertions(+)
create mode 100755
tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh
diff --git
a/tools/testing/selftests
Add a wrapper around mlxsw/mirror_gre_scale.sh that parameterized number
of offloadable mirrors on Spectrum machines.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
---
.../drivers/net/mlxsw/spectrum/mirror_gre_scale.sh | 13 +
1 file changed, 13 insertions(+)
create
Test that it's possible to offload a given number of mirrors.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
---
.../drivers/net/mlxsw/mirror_gre_scale.sh | 197 +
1 file changed, 197 insertions(+)
create mode 100644
tools/testing/selftests/drivers/net/mlxsw
Add a wrapper around mlxsw/tc_flower_scale.sh that parameterizes the
generic tc flower scale test template with Spectrum-specific target
values.
Signed-off-by: Petr Machata
Reviewed-by: Yuval Mintz
---
.../drivers/net/mlxsw/spectrum/tc_flower_scale.sh | 19 +++
1 file
Add test of capacity to offload flower.
This is a generic portion of the test that is meant to be called from a
driver that supplies a particular number of rules to be tested with.
Signed-off-by: Petr Machata
Reviewed-by: Yuval Mintz
---
.../selftests/drivers/net/mlxsw/tc_flower_scale.sh
From: Yuval Mintz
IPv4 routes in Spectrum are based on the kvd single-hash, but as it's
a hash we need to assume we cannot reach 100% of its capacity.
Add a wrapper that provides us with good/bad target numbers for the
Spectrum ASIC.
Signed-off-by: Yuval Mintz
Reviewed-by: Petr Machata
[pe
Reviewed-by: Petr Machata
Signed-off-by: Petr Machata
---
.../selftests/drivers/net/mlxsw/router_scale.sh| 167 +
1 file changed, 167 insertions(+)
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/router_scale.sh
diff --git a/tools/testing/selftests/drivers/net
to be provided
first.
Signed-off-by: Yuval Mintz
[pe...@mellanox.com: Extracted two patches out of this patch. Tweaked
commit message.]
Signed-off-by: Petr Machata
---
.../net/mlxsw/spectrum/devlink_resources.sh| 117 +
1 file changed, 117 insertions(+)
create mode 100755
-by: Petr Machata
---
MAINTAINERS| 1 +
.../net/mlxsw/spectrum/devlink_lib_spectrum.sh | 119 +
2 files changed, 120 insertions(+)
create mode 100644
tools/testing/selftests/drivers/net/mlxsw/spectrum/devlink_lib_spectrum.sh
diff
This helper library contains wrappers to devlink functionality agnostic
to the underlying device.
Signed-off-by: Yuval Mintz
[pe...@mellanox.com: Split this out from another patch.]
Signed-off-by: Petr Machata
---
.../selftests/net/forwarding/devlink_lib.sh| 108
() and tc_offload_check() an optional
parameter with a number of interfaces to probe. Fall back to global
NUM_NETIFS if the parameter is not given.
Signed-off-by: Petr Machata
Reviewed-by: Yuval Mintz
---
tools/testing/selftests/net/forwarding/lib.sh | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing/selftests/net/forwarding/lib.sh
index d1f14f83979e..59272824ef37 100644
of the
first argument, should_fail.
Signed-off-by: Petr Machata
Reviewed-by: Yuval Mintz
---
tools/testing/selftests/net/forwarding/lib.sh | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing/selftests/net/forwarding/lib.sh
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()
When running the test on soft devices, there's no mechanism to
gratuitously start resolving the neighbor for remote tunnel endpoint.
So instead of passively waiting, wait for the device to be up, and then
probe the neighbor with a ping.
Signed-off-by: Petr Machata
---
tools/testing/selftests
out GRE packet. Drop the corresponding condition.
- Because the above fixes the filters to match in slow path as well,
they need to be made skip_hw so as not to double-count packets.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh | 6
is actually a soft device not backed by
an ASIC.
Therefore try to trap if possible, but fall back to inserting a continue
if not.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git
, 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
Split out of setup_wait() a function setup_wait_dev() that waits for a
single device. This gives tests the opportunity to wait for a selected
device after they tinkered with its upness.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 25
the
interconnects from the script itself proves to be difficult.
Therefore state the requirement for topology ASCII art in README.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
tools/testing/selftests/net/forwarding/README | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing
The GRE multipath tests need stats on an egress counter. Change
tc_rule_stats_get() to take direction as an optional argument, with
default of ingress.
Take the opportunity to change line continuation character from | to \.
Move the | to the next line, which indent.
Signed-off-by: Petr Machata
Add a GRE-tunneling test such that there are two tunnels involved, with
a multipath route listing both as next hops. Similarly to
router_multipath.sh, test that the distribution of traffic to the
tunnels honors the configured weights.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
and address de/initialization
logic to a new pair of helpers __simple_if_init() / __simple_if_fini(),
and defer to these helpers from simple_if_init() and simple_if_fini().
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
tools/testing/selftests/net/forwarding/lib.sh | 32
This function will be useful for the GRE multipath test that is coming
later.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
tools/testing/selftests/net/forwarding/lib.sh | 39 ++
.../selftests/net/forwarding/router_multipath.sh | 39
- Change the indentation of the function body from 7 spaces to one tab.
- Move initialization of weights_ratio up so that it can be referenced
from the error message about packet difference being zero.
- Move |'s consistently to continuation line, which reindent.
Signed-off-by: Petr Machata
, a requirement to add diagrams to selftests is
documented.
Petr Machata (6):
selftests: forwarding: Move multipath_eval() to lib.sh
selftests: forwarding: multipath_eval(): Improve style
selftests: forwarding: tc_rule_stats_get: Parameterize direction
selftests: forwarding: lib: Extract
.
Fixes: 9c7c8a82442c ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add
more tests")
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh| 9 +
1 file changed, 9 insertions(+)
diff --git
a/tools/testing
two patches included snippets that reproduced the issues. This
patch elevates the snippets to a full-fledged test case.
Suggested-by: David Miller
Signed-off-by: Petr Machata
---
Notes:
Changes between v1 and v2:
- Move tunnel construction to setup() and destruction to cleanup().
too
Petr Machata writes:
> When libraries are sourced from elsewhere from the tree, such as the
> testing/selftests/drivers/net/mlxsw subdirectory, sourcing their own
Sorry, I didn't realize the mirror_bridge.sh is not upstream yet. This
patch is thus immaterial, it will be sent to
, and source the file using
relative path appropriate for the subdirectory.
Fixes: d5ea2bfc806a ("selftests: forwarding: mirror_gre_lib: Extract generic
functions")
Fixes: 74ed089d48a4 ("selftests: forwarding: Split mirror_gre_topo_lib.sh")
Signed-off-by: Petr Machata
---
too
The test description is displayed with the PASS/FAIL resolution after
the test is ran. There however already is one other test described
exactly like this, which makes it unclear which of the tests passed or
failed. Make the description unique.
Signed-off-by: Petr Machata
---
tools/testing
in suite is renamed to differentiate it from another
test of the same name.
Petr Machata (2):
selftests: forwarding: mirror_vlan: Uninstall trap
selftests: forwarding: mirror_vlan: Change test description
tools/testing/selftests/net/forwarding/mirror_vlan.sh | 4 ++--
1 file changed, 2 insert
Instead of installing a trap before tests run and uninstalling it after
they run, mirror_vlan.sh installs it twice due to a typo. Fix the typo.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_vlan.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
To test offloading of mirror-to-gretap in mlxsw for cases that a
VLAN-unaware bridge is in underlay packet path, test that the STP status
of bridge egress port is reflected.
Signed-off-by: Petr Machata
---
.../selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh| 12
1 file
that similarly check "egress untagged"
- fdb_roaming tests that check whether learning FDB on a different port
is reflected
- stp tests for handling port STP status of bridge egress port
Signed-off-by: Petr Machata
---
.../net/forwarding/mirror_gre_vlan_bridge_1q.sh| 129 +++
Rename test_gretap_forbidden() and test_ip6gretap_forbidden() to a more
specific test_gretap_forbidden_cpu() and test_ip6gretap_forbidden_cpu().
This will make it clearer which is which when further down a patch is
introduced that forbids a VLAN on regular bridge port.
Signed-off-by: Petr Machata
After the final change reestablishes the original configuration, make
sure the traffic flows again as it should.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/tools
The "ip6gretap" in the test name refers to the tunnel device type that
the test is supposed to be testing. However test_ip6gretap_forbidden()
tests, due to a typo, a gretap tunnel. Fix the typo.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/mirror_gre_vlan_br
.
Petr Machata (9):
selftests: forwarding: lib: Move here vlan_capture_{,un}install()
selftests: forwarding: mirror_lib: Move here
do_test_span_vlan_dir_ips()
selftests: forwarding: mirror_lib: skip_hw the VLAN capture
selftests: forwarding: mirror_gre_lib: Add STP test
selftests
Add a reusable full test that toggles STP state of a given bridge port
and checks that the mirroring reacts appropriately. The test will be
used by bridge tests in follow-up patches.
Signed-off-by: Petr Machata
---
.../selftests/net/forwarding/mirror_gre_lib.sh | 32
When the VLAN capture is installed on a front panel device and not a
soft device, the packets are counted twice: once in fast path, and once
after they are trapped to the kernel. Resolve the problem by passing
skip_hw flag to vlan_capture_install().
Signed-off-by: Petr Machata
---
tools/testing
Move the function do_test_span_vlan_dir_ips() from mirror_vlan.sh test
to a library file mirror_lib.sh to allow reuse. Fill in other entry
points similar to other testing functions in mirror_lib.sh, they will be
useful in following patches.
Signed-off-by: Petr Machata
---
.../testing/selftests
Move vlan_capture_install() and vlan_capture_uninstall() from
mirror_vlan.sh test to lib.sh so that it can be reused in other tests.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 23 ++
.../selftests/net/forwarding/mirror_vlan.sh
Nikolay Aleksandrov writes:
> Fixes: 4d4fd36126d6 ("net: bridge: Publish bridge accessor functions")
Correct.
Thanks,
Petr
Callers of br_fdb_find() need to hold the hash lock, which
br_fdb_find_port() doesn't do. Add the missing lock/unlock
pair.
Signed-off-by: Petr Machata <pe...@mellanox.com>
---
net/bridge/br_fdb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/bridge/br_fdb.c b/net/bridge/br
Ignore VLAN events where the orig_dev is the bridge device itself.
Signed-off-by: Petr Machata <pe...@mellanox.com>
---
drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
b/drivers/staging/fsl-dpaa2
Ignore VLAN events where the orig_dev is the bridge device itself.
Signed-off-by: Petr Machata <pe...@mellanox.com>
Reviewed-by: Ido Schimmel <ido...@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a
port or a bridge.
Signed-off-by: Petr Machata <pe...@mellanox.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>
Tested-by: Florian Fainel
Ignore VLAN events where the orig_dev is the bridge device itself.
Signed-off-by: Petr Machata <pe...@mellanox.com>
---
drivers/net/ethernet/rocker/rocker_main.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/rocker/rocker_main.c
b/drivers/net/ethernet/
1 - 100 of 200 matches
Mail list logo