[PATCH net-next v2 01/10] netdevsim: fib: Convert the current occupancy to an atomic variable

2021-02-01 Thread Ido Schimmel
variable, so lock is not needed. v2: * Use atomic64_sub() in nsim_nexthop_account()'s error path Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/netdevsim/fib.c | 55 ++--- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/dr

[PATCH net-next v2 07/10] net: Do not call fib6_info_hw_flags_set() when IPv6 is disabled

2021-02-01 Thread Ido Schimmel
From: Amit Cohen With the next patch mlxsw and netdevsim will fail in compilation if CONFIG_IPV6 is disabled. Do not call fib6_info_hw_flags_set() when IPv6 is disabled. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_router.c| 16

[PATCH net-next v2 06/10] net: Pass 'net' struct as first argument to fib6_info_hw_flags_set()

2021-02-01 Thread Ido Schimmel
t argument. Currently, the only callers of this function are mlxsw and netdevsim. Patch the callers to pass net. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Reviewed-by: David Ahern --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 --- drivers/net/netde

[PATCH net-next v2 09/10] selftests: Extend fib tests to run with and without flags notifications

2021-02-01 Thread Ido Schimmel
From: Amit Cohen Run the test cases with both `fib_notify_on_flag_change` sysctls set to '1', and then with both sysctls set to '0' to verify there are no regressions in the test when notifications are added. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- too

[PATCH net-next v2 08/10] net: ipv6: Emit notification when fib hardware flags are changed

2021-02-01 Thread Ido Schimmel
negatively impact the insertion rate. - Not all users are interested in these notifications. Move fib6_info_hw_flags_set() to C file because it is no longer a short function. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Reviewed-by: David Ahern --- Documentation/networking/ip-sysct

[PATCH net-next v2 05/10] net: ipv4: Emit notification when fib hardware flags are changed

2021-02-01 Thread Ido Schimmel
negatively impact the insertion rate. - Not all users are interested in these notifications. Signed-off-by: Amit Cohen Acked-by: Roopa Prabhu Signed-off-by: Ido Schimmel Reviewed-by: David Ahern --- Documentation/networking/ip-sysctl.rst | 20 +++ include/net/netns/ipv4.h

[PATCH net-next v2 10/10] selftests: netdevsim: Add fib_notifications test

2021-02-01 Thread Ido Schimmel
[ OK ] Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Reviewed-by: David Ahern --- .../net/netdevsim/fib_notifications.sh| 300 ++ 1 file changed, 300 insertions(+) create mode 100755 tools/testing/selftests/drivers/net/netdevsim

[PATCH net-next v2 00/10] Add notifications when route hardware flags change

2021-02-01 Thread Ido Schimmel
From: Ido Schimmel Routes installed to the kernel can be programmed to capable devices, in which case they are marked with one of two flags. RTM_F_OFFLOAD for routes that offload traffic from the kernel and RTM_F_TRAP for routes that trap packets to the kernel for processing (e.g., host routes

[PATCH net-next v2 02/10] netdevsim: fib: Perform the route programming in a non-atomic context

2021-02-01 Thread Ido Schimmel
uld lead to unexpected failures. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Acked-by: David Ahern --- drivers/net/netdevsim/fib.c | 467 +--- 1 file changed, 327 insertions(+), 140 deletions(-) diff --git a/drivers/net/netdevsim/fib.c b/dr

Re: [RFC PATCH v2 net-next 05/17] net: bridge: implement unicast filtering for the bridge device

2021-03-01 Thread Ido Schimmel
On Wed, Feb 24, 2021 at 01:43:38PM +0200, Vladimir Oltean wrote: > From: Vladimir Oltean > > The bridge device currently goes into promiscuous mode when it has an > upper with a different MAC address than itself. But it could do better: > it could sync the MAC addresses of its uppers to the softw

[PATCH net 0/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-03-04 Thread Ido Schimmel
From: Ido Schimmel Patch #1 prevents blackhole nexthops from being flushed when the loopback device goes down given that as far as user space is concerned, these nexthops do not have a nexthop device. Patch #2 adds a test case. There are no regressions in fib_nexthops.sh with this change

[PATCH net 2/2] selftests: fib_nexthops: Test blackhole nexthops when loopback goes down

2021-03-04 Thread Ido Schimmel
From: Ido Schimmel Test that blackhole nexthops are not flushed when the loopback device goes down. Output without previous patch: # ./fib_nexthops.sh -t basic Basic functional tests -- TEST: List with nothing defined [ OK ] TEST

[PATCH net 1/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-03-04 Thread Ido Schimmel
From: Ido Schimmel As far as user space is concerned, blackhole nexthops do not have a nexthop device and therefore should not be affected by the administrative or carrier state of any netdev. However, when the loopback netdev goes down all the blackhole nexthops are flushed. This happens

Re: [PATCH] net: mellanox: mlxsw: fix error return code of mlxsw_sp_router_nve_promote_decap()

2021-03-07 Thread Ido Schimmel
On Sat, Mar 06, 2021 at 03:32:39PM +0100, Heiner Kallweit wrote: > On 06.03.2021 15:07, Jia-Ju Bai wrote: > > When fib_entry is NULL, no error return code of > > mlxsw_sp_router_nve_promote_decap() is assigned. > > To fix this bug, err is assigned with -EINVAL in this case. > > > Again, are you su

Re: [syzbot] WARNING: ODEBUG bug in net_dm_cmd_trace

2021-03-08 Thread Ido Schimmel
On Sun, Mar 07, 2021 at 06:30:27PM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:d310ec03 Merge tag 'perf-core-2021-02-17' of git://git.ker.. > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=108adb32d0 > kernel

Re: [PATCH net] ipv6: fix suspecious RCU usage warning

2021-03-09 Thread Ido Schimmel
On Mon, Mar 08, 2021 at 07:47:31PM -0700, David Ahern wrote: > [ cc Ido and Petr ] > > On 3/8/21 12:21 PM, Wei Wang wrote: > > diff --git a/include/net/nexthop.h b/include/net/nexthop.h > > index 7bc057aee40b..48956b144689 100644 > > --- a/include/net/nexthop.h > > +++ b/include/net/nexthop.h > >

Re: [PATCH net v2] ipv6: fix suspecious RCU usage warning

2021-03-10 Thread Ido Schimmel
> > Fixes: f88d8ea67fbdb ("ipv6: Plumb support for nexthop object in a fib6_info") > Reported-by: syzbot > Signed-off-by: Wei Wang > Cc: David Ahern > Cc: Ido Schimmel > Cc: Petr Machata > Cc: Eric Dumazet Reviewed-by: Ido Schimmel

Re: [PATCH] netdevsim: fib: Remove redundant code

2021-03-10 Thread Ido Schimmel
On Wed, Mar 10, 2021 at 10:35:27AM +0800, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return > "0" on line 889. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/net/netdevsim/fib.c

[PATCH net] drop_monitor: Perform cleanup upon probe registration failure

2021-03-10 Thread Ido Schimmel
From: Ido Schimmel In the rare case that drop_monitor fails to register its probe on the 'napi_poll' tracepoint, it will not deactivate its hysteresis timer as part of the error path. If the hysteresis timer was armed by the shortly lived 'kfree_skb' probe and user space

[PATCH net-next] sched: act_sample: Implement stats_update callback

2021-03-10 Thread Ido Schimmel
From: Ido Schimmel Implement this callback in order to get the offloaded stats added to the kernel stats. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko --- net/sched/act_sample.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/net/sched

[PATCH net-next 3/6] mlxsw: spectrum: Bump minimum FW version to xx.2008.2406

2021-03-10 Thread Ido Schimmel
. This breaks offload of resilient next-hop groups. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net

[PATCH net-next 2/6] mlxsw: reg: Fix comment about slot_index field in PMAOS register

2021-03-10 Thread Ido Schimmel
From: Amit Cohen The comment did not include the register name. Add `pmaos` to align the comment with other comments. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net-next 6/6] mlxsw: Adjust some MFDE fields shift and size to fw implementation

2021-03-10 Thread Ido Schimmel
reported "0". Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/etherne

[PATCH net-next 5/6] mlxsw: core: Expose MFDE.log_ip to devlink health

2021-03-10 Thread Ido Schimmel
From: Danielle Ratson Add the MFDE.log_ip field to devlink health reporter in order to ease firmware debug. This field encodes the instruction pointer that triggered the CR space timeout. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net

[PATCH net-next 1/6] mlxsw: spectrum: Reword an error message for Q-in-Q veto

2021-03-10 Thread Ido Schimmel
From: Danielle Ratson 'Uppers' is not clear enough for all users when referring to upper devices. Reword the error message so it will be clearer. Signed-off-by: Danielle Ratson Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1

[PATCH net-next 4/6] mlxsw: reg: Extend MFDE register with new log_ip field

2021-03-10 Thread Ido Schimmel
From: Danielle Ratson Extend MFDE (Monitoring FW Debug) register with new field specifying the instruction pointer that triggered the CR space timeout. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 7

[PATCH net-next 0/6] mlxsw: Misc updates

2021-03-10 Thread Ido Schimmel
From: Ido Schimmel This patch set contains miscellaneous updates for mlxsw. Patches #1-#2 reword an extack message to make it clearer and fix a comment. Patch #3 bumps the minimum firmware version enforced by mlxsw. This is needed for two upcoming features: Resilient hashing and per-flow

[PATCH net-next 1/6] mlxsw: spectrum_span: Add SPAN session identifier support

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel When packets are mirrored to the CPU, the trap identifier with which the packets are trapped is determined according to the session identifier of the SPAN agent performing the mirroring. Packets that are trapped for the same logical reason (e.g., buffer drops) should use the

[PATCH net-next 4/6] mlxsw: spectrum_matchall: Split sampling support between ASICs

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel Sampling of ingress packets is supported using a dedicated sampling mechanism on all Spectrum ASICs. However, Spectrum-2 and later ASICs support more sophisticated sampling by mirroring packets to the CPU. As a preparation for more advanced sampling configurations, split the

[PATCH net-next 3/6] mlxsw: spectrum_span: Add SPAN probability rate support

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel Currently, every packet that matches a mirroring trigger (e.g., received packets, buffer dropped packets) is mirrored. Spectrum-2 and later ASICs support mirroring with probability, where every 1 in N matched packets is mirrored. Extend the API that creates the binding

[PATCH net-next 2/6] mlxsw: reg: Extend mirroring registers with probability rate field

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel The MPAR and MPAGR registers are used to configure the binding between the mirroring trigger (e.g., received packet) and the SPAN agent. Add probability rate field, which will allow us to support sampling by mirroring to the CPU. Signed-off-by: Ido Schimmel Reviewed-by: Jiri

[PATCH net-next 0/6] mlxsw: Implement sampling using mirroring

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel So far, sampling was implemented using a dedicated sampling mechanism that is available on all Spectrum ASICs. Spectrum-2 and later ASICs support sampling by mirroring packets to the CPU port with probability. This method has a couple of advantages compared to the legacy

[PATCH net-next 6/6] mlxsw: spectrum_matchall: Implement sampling using mirroring

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel Spectrum-2 and later ASICs support sampling of packets by mirroring to the CPU with probability. There are several advantages compared to the legacy dedicated sampling mechanism: * Extra metadata per-packet: Egress port, egress traffic class, traffic class occupancy and end

[PATCH net-next 5/6] mlxsw: spectrum_trap: Split sampling traps between ASICs

2021-03-11 Thread Ido Schimmel
From: Ido Schimmel Sampling of ingress packets is supported using a dedicated sampling mechanism on all Spectrum ASICs. However, Spectrum-2 and later ASICs support more sophisticated sampling by mirroring packets to the CPU. As a preparation for more advanced sampling configurations, split the

Re: [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing

2021-03-14 Thread Ido Schimmel
On Fri, Mar 12, 2021 at 03:08:28PM +0100, Simon Horman wrote: > This series enhances the TC policer action implementation to allow a > policer action instance to enforce a rate-limit based on > packets-per-second, configurable using a packet-per-second rate and burst > parameters. > > In the hope

Re: [PATCH v2 1/5] thermal/drivers/core: Use a char pointer for the cooling device name

2021-03-14 Thread Ido Schimmel
On Fri, Mar 12, 2021 at 06:03:12PM +0100, Daniel Lezcano wrote: > diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c > index 996c038f83a4..9ef8090eb645 100644 > --- a/drivers/thermal/thermal_core.c > +++ b/drivers/thermal/thermal_core.c > @@ -960,10 +960,7 @@ __thermal_coo

[PATCH net-next 00/11] psample: Add additional metadata attributes

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel This series extends the psample module to expose additional metadata to user space for packets sampled via act_sample. The new metadata (e.g., transit delay) can then be consumed by applications such as hsflowd [1] for better network observability. netdevsim is extended with

[PATCH net-next 02/11] psample: Add additional metadata attributes

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Extend psample to report the following attributes when available: * Output traffic class as a 16-bit value * Output traffic class occupancy in bytes as a 64-bit value * End-to-end latency of the packet in nanoseconds resolution * Software timestamp in nanoseconds resolution

[PATCH net-next 01/11] psample: Encapsulate packet metadata in a struct

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Currently, callers of psample_sample_packet() pass three metadata attributes: Ingress port, egress port and truncated size. Subsequent patches are going to add more attributes (e.g., egress queue occupancy), which also need an indication whether they are valid or not

[PATCH net-next 04/11] selftests: netdevsim: Test psample functionality

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Test various aspects of psample functionality over netdevsim and in particular test that the psample module correctly reports the provided metadata. Example: # ./psample.sh TEST: psample enable / disable [ OK ] TEST: psample group

[PATCH net-next 03/11] netdevsim: Add dummy psample implementation

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Allow netdevsim to report "sampled" packets to the psample module by periodically generating packets from a work queue. The behavior can be enabled / disabled (default) and the various meta data attributes can be controlled via debugfs knobs. This implementation en

[PATCH net-next 06/11] mlxsw: Create dedicated field for Rx metadata in skb control block

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Next patch will need to encode more Rx metadata in the skb control block, so create a dedicated field for it and move the cookie index there. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.h | 6 +- drivers/net

[PATCH net-next 05/11] mlxsw: pci: Add more metadata fields to CQEv2

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel The Completion Queue Element version 2 (CQEv2) includes various metadata fields for packets that are mirrored / sampled to the CPU. Add these fields so that they could be used by a later patch. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet

[PATCH net-next 08/11] mlxsw: spectrum: Remove unnecessary RCU read-side critical section

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Since commit 7d8e8f3433dc ("mlxsw: core: Increase scope of RCU read-side critical section"), all Rx handlers are called from an RCU read-side critical section. Remove the unnecessary rcu_read_lock() / rcu_read_unlock(). Signed-off-by: Ido Schimmel Reviewed-by:

[PATCH net-next 07/11] mlxsw: pci: Set extra metadata in skb control block

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Packets that are mirrored / sampled to the CPU have extra metadata encoded in their corresponding Completion Queue Element (CQE). Retrieve this metadata from the CQE and set it in the skb control block so that it could be accessed by the switch driver (i.e., 'mlxsw_spe

[PATCH net-next 09/11] mlxsw: spectrum: Remove mlxsw_sp_sample_receive()

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel The function resolves the psample sampling group from the Rx port because this is the only form of sampling the driver currently supports. Subsequent patches are going to add support for Tx-based and policy-based sampling, in which case the sampling group would not be resolved

[PATCH net-next 10/11] mlxsw: spectrum: Report extra metadata to psample module

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Make use of the previously added metadata and report it to the psample module. The metadata is read from the skb's control block, which was initialized by the bus driver (i.e., 'mlxsw_pci') after decoding the packet's Completion Queue Element (CQE).

[PATCH net-next 11/11] selftests: mlxsw: Add tc sample tests

2021-03-14 Thread Ido Schimmel
From: Ido Schimmel Test that packets are sampled when tc-sample is used and that reported metadata is correct. Two sets of hosts (with and without LAG) are used, since metadata extraction in mlxsw is a bit different when LAG is involved. # ./tc_sample.sh TEST: tc sample rate (forward

Re: [PATCH v3 1/5] thermal/drivers/core: Use a char pointer for the cooling device name

2021-03-14 Thread Ido Schimmel
bwantysiliogogogoch" > > A village on the island of Anglesey (Wales), known to have the longest > name in Europe. > > Signed-off-by: Daniel Lezcano > Reviewed-by: Lukasz Luba Tested-by: Ido Schimmel

Re: [PATCH net] net: psample: Fix the netlink skb length

2021-02-04 Thread Ido Schimmel
channel for > > packet sampling") > > CC: Yotam Gigi > > Reviewed-by: Ido Schimmel > > Signed-off-by: Chris Mi > > --- > > net/psample/psample.c | 10 ++ > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a

Re: [RFC v5 net-next] net: core: devlink: add 'dropped' stats field for traps

2021-02-06 Thread Ido Schimmel
On Thu, Feb 04, 2021 at 01:41:22PM +0200, Oleksandr Mazur wrote: > Whenever query statistics is issued for trap, devlink subsystem > would also fill-in statistics 'dropped' field. This field indicates > the number of packets HW dropped and failed to report to the device driver, > and thus - to the

[PATCH net-next 00/10] Add support for route offload failure notifications

2021-02-07 Thread Ido Schimmel
From: Ido Schimmel This is a complementary series to the one merged in commit 389cb1ecc86e ("Merge branch 'add-notifications-when-route-hardware-flags-change'"). The previous series added RTM_NEWROUTE notifications to user space whenever a route was successfully installed

[PATCH net-next 01/10] rtnetlink: Add RTM_F_OFFLOAD_FAILED flag

2021-02-07 Thread Ido Schimmel
subsequent patches by netdevsim and mlxsw to indicate to user space that route offload failed, so that users will have better visibility into the offload process. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- include/uapi/linux/rtnetlink.h | 5 + 1 file changed, 5 insertions(+) diff

[PATCH net-next 02/10] IPv4: Add "offload failed" indication to routes

2021-02-07 Thread Ido Schimmel
using unused bit and therefore there is no need to increase structs size. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 ++ drivers/net/netdevsim/fib.c | 1 + include/net/ip_fib.h

[PATCH net-next 03/10] IPv4: Extend 'fib_notify_on_flag_change' sysctl

2021-02-07 Thread Ido Schimmel
them more important. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- Documentation/networking/ip-sysctl.rst | 3 ++- net/ipv4/fib_trie.c| 6 ++ net/ipv4/sysctl_net_ipv4.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documen

[PATCH net-next 04/10] IPv6: Add "offload failed" indication to routes

2021-02-07 Thread Ido Schimmel
no need to increase struct size. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 ++-- drivers/net/netdevsim/fib.c | 2 +- include/net/ip6_fib.h | 5 +++

[PATCH net-next 06/10] netdevsim: fib: Do not warn if route was not found for several events

2021-02-07 Thread Ido Schimmel
Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/netdevsim/fib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index 6b1ec3b4750c..b93bd483cf12 100644 --- a/drivers/net/netdevsim/fib.c +++ b/d

[PATCH net-next 08/10] netdevsim: fib: Add debugfs to debug route offload failure

2021-02-07 Thread Ido Schimmel
D} are triggered and "fail_route_offload" value is true, set the appropriate hardware flag to make the kernel emit RTM_NEWROUTE notification with RTM_F_OFFLOAD_FAILED flag. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/netdevsim/fib.c | 114 +++

[PATCH net-next 05/10] IPv6: Extend 'fib_notify_on_flag_change' sysctl

2021-02-07 Thread Ido Schimmel
them more important. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- Documentation/networking/ip-sysctl.rst | 3 ++- net/ipv6/route.c | 6 ++ net/ipv6/sysctl_net_ipv6.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documen

[PATCH net-next 10/10] selftests: netdevsim: Test route offload failure notifications

2021-02-07 Thread Ido Schimmel
[ OK ] TEST: IPv6 route addition [ OK ] TEST: IPv6 route deletion [ OK ] TEST: IPv6 route replacement[ OK ] TEST: IPv6 route offload failed [ OK ] Signed-off-by: Amit Cohe

[PATCH net-next 09/10] mlxsw: spectrum_router: Set offload_failed flag

2021-02-07 Thread Ido Schimmel
: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_router.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index a5f980b6940e..9ce90841f92d 100644 --- a

[PATCH net-next 07/10] netdevsim: dev: Initialize FIB module after debugfs

2021-02-07 Thread Ido Schimmel
From: Ido Schimmel Initialize the dummy FIB offload module after debugfs, so that the FIB module could create its own directory there. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/netdevsim/dev.c | 40 +++-- 1 file changed, 21

Re: [PATCH net-next v4] net: psample: Introduce stubs to remove NIC driver dependency

2021-02-08 Thread Ido Schimmel
On Mon, Feb 08, 2021 at 09:03:50AM +0200, Leon Romanovsky wrote: > On Mon, Feb 01, 2021 at 08:08:37PM +0200, Ido Schimmel wrote: > > On Mon, Feb 01, 2021 at 09:37:11AM +0800, Chris Mi wrote: > > > Hi Ido, > > > > > > On 1/30/2021 10:42 PM, Ido Schimmel wrote: &

Re: [PATCH net-next v4] net: psample: Introduce stubs to remove NIC driver dependency

2021-02-08 Thread Ido Schimmel
On Mon, Feb 08, 2021 at 11:07:02AM +0200, Leon Romanovsky wrote: > On Mon, Feb 08, 2021 at 10:57:46AM +0200, Ido Schimmel wrote: > > On Mon, Feb 08, 2021 at 09:03:50AM +0200, Leon Romanovsky wrote: > > > On Mon, Feb 01, 2021 at 08:08:37PM +0200, Ido Schimmel wrote: > > >

Re: [PATCH v2 net-next 01/11] net: switchdev: propagate extack to port attributes

2021-02-09 Thread Ido Schimmel
On Tue, Feb 09, 2021 at 05:19:26PM +0200, Vladimir Oltean wrote: > From: Vladimir Oltean > > When a struct switchdev_attr is notified through switchdev, there is no > way to report informational messages, unlike for struct switchdev_obj. > > Signed-off-by: Vladimir Oltean

Re: [PATCH v2 net-next 03/11] net: bridge: don't print in br_switchdev_set_port_flag

2021-02-09 Thread Ido Schimmel
On Tue, Feb 09, 2021 at 07:36:31PM +0200, Vladimir Oltean wrote: > On Tue, Feb 09, 2021 at 05:19:28PM +0200, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > Currently br_switchdev_set_port_flag has two options for error handling > > and neither is good: > > - The driver returns -EOPNOTSUP

Re: [PATCH v2 net-next 04/11] net: bridge: offload initial and final port flags through switchdev

2021-02-09 Thread Ido Schimmel
On Tue, Feb 09, 2021 at 05:19:29PM +0200, Vladimir Oltean wrote: > So switchdev drivers operating in standalone mode should disable address > learning. As a matter of practicality, we can reduce code duplication in > drivers by having the bridge notify through switchdev of the initial and > final b

Re: [PATCH net-next v3] net-loopback: set lo dev initial state to UP

2021-02-09 Thread Ido Schimmel
On Tue, Feb 09, 2021 at 10:49:23AM -0800, Mahesh Bandewar (महेश बंडेवार) wrote: > On Tue, Feb 9, 2021 at 8:23 AM Jakub Kicinski wrote: > > > > On Tue, 9 Feb 2021 12:54:59 +0100 Petr Machata wrote: > > > Jian Yang writes: > > > > > > > From: Jian Yang > > > > > > > > Traditionally loopback device

Re: [PATCH v2 net-next 04/11] net: bridge: offload initial and final port flags through switchdev

2021-02-09 Thread Ido Schimmel
On Tue, Feb 09, 2021 at 10:20:45PM +0200, Vladimir Oltean wrote: > On Tue, Feb 09, 2021 at 08:51:00PM +0200, Ido Schimmel wrote: > > On Tue, Feb 09, 2021 at 05:19:29PM +0200, Vladimir Oltean wrote: > > > So switchdev drivers operating in standalone mode should disable address &g

Re: [PATCH v3 net-next 07/11] net: prep switchdev drivers for concurrent SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

2021-02-10 Thread Ido Schimmel
On Wed, Feb 10, 2021 at 11:14:41AM +0200, Vladimir Oltean wrote: > From: Vladimir Oltean > > Because the bridge will start offloading SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS > while not serialized by any lock such as the br->lock spinlock, existing > drivers that treat that attribute and cache the br

Re: [PATCH v2 net-next 04/11] net: bridge: offload initial and final port flags through switchdev

2021-02-10 Thread Ido Schimmel
On Wed, Feb 10, 2021 at 12:51:53AM +0200, Vladimir Oltean wrote: > On Wed, Feb 10, 2021 at 12:01:24AM +0200, Ido Schimmel wrote: > > On Tue, Feb 09, 2021 at 10:20:45PM +0200, Vladimir Oltean wrote: > > > On Tue, Feb 09, 2021 at 08:51:00PM +0200, Ido Schimmel wrote: > > >

Re: [PATCH v3 net-next 00/11] Cleanup in brport flags switchdev offload for DSA

2021-02-10 Thread Ido Schimmel
On Wed, Feb 10, 2021 at 02:01:06PM +0200, Vladimir Oltean wrote: > On Wed, Feb 10, 2021 at 01:05:57PM +0200, Nikolay Aleksandrov wrote: > > On 10/02/2021 13:01, Vladimir Oltean wrote: > > > On Wed, Feb 10, 2021 at 12:52:33PM +0200, Nikolay Aleksandrov wrote: > > >> On 10/02/2021 12:45, Vladimir Olt

Re: [PATCH v3 net-next 00/11] Cleanup in brport flags switchdev offload for DSA

2021-02-10 Thread Ido Schimmel
On Wed, Feb 10, 2021 at 02:29:36PM +0200, Vladimir Oltean wrote: > On Wed, Feb 10, 2021 at 02:21:05PM +0200, Ido Schimmel wrote: > > On Wed, Feb 10, 2021 at 02:01:06PM +0200, Vladimir Oltean wrote: > > > On Wed, Feb 10, 2021 at 01:05:57PM +0200, Nikolay Aleksandrov wrote: > &

Re: [PATCH v3 net-next 00/11] Cleanup in brport flags switchdev offload for DSA

2021-02-10 Thread Ido Schimmel
On Wed, Feb 10, 2021 at 02:55:01PM +0200, Vladimir Oltean wrote: > On Wed, Feb 10, 2021 at 02:38:23PM +0200, Ido Schimmel wrote: > > On Wed, Feb 10, 2021 at 02:29:36PM +0200, Vladimir Oltean wrote: > > > On Wed, Feb 10, 2021 at 02:21:05PM +0200, Ido Schimmel wrote: > > >

Re: [PATCH net-next 3/3] bonding: 3ad: Use a more verbose warning for unknown speeds

2021-02-10 Thread Ido Schimmel
On Wed, Feb 10, 2021 at 11:44:31AM -0800, Alexander Duyck wrote: > I'm not really sure making the warning consume more text is really > going to solve the problem. I was actually much happier with just the > first error as I don't need a stack trace. Just having the line is > enough information for

Re: [PATCH v2 net-next 04/11] net: bridge: offload initial and final port flags through switchdev

2021-02-11 Thread Ido Schimmel
On Thu, Feb 11, 2021 at 01:23:52AM +0200, Vladimir Oltean wrote: > On Wed, Feb 10, 2021 at 12:59:49PM +0200, Ido Schimmel wrote: > > > > The reverse, during unlinking, would be to refuse unlinking if the upper > > > > has uppers of its own. netdev_upper_dev

Re: [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing

2021-03-16 Thread Ido Schimmel
Sorry for the delay. Was AFK yesterday On Mon, Mar 15, 2021 at 03:41:56PM +0100, Simon Horman wrote: > On Sun, Mar 14, 2021 at 10:17:37AM +0200, Ido Schimmel wrote: > > On Fri, Mar 12, 2021 at 03:08:28PM +0100, Simon Horman wrote: > > > This series enhances the TC policer action

Re: [BUG] Iproute2 batch-mode fails to bring up veth

2021-03-16 Thread Ido Schimmel
+ Petr On Tue, Mar 16, 2021 at 06:22:08AM +1100, Tim Rice wrote: > Hey all, > > Sorry if this isn't the right place to report Iproute2 bugs. It was implied > by README.devel as well as a couple of entries I saw in bugzilla. > > I use iproute2 batch mode to construct network namespaces. Example

Re: [PATCH v2 net-next 11/12] Documentation: networking: switchdev: clarify device driver behavior

2021-03-16 Thread Ido Schimmel
On Tue, Mar 16, 2021 at 01:24:18PM +0200, Vladimir Oltean wrote: > +When the bridge has VLAN filtering enabled and a PVID is not configured on > the > +ingress port, untagged 802.1p tagged packets must be dropped. When the bridge I think you meant "untagged and 802.1p tagged packets" ? Looks goo

Re: [PATCH v2 net-next 12/12] Documentation: networking: switchdev: fix command for static FDB entries

2021-03-16 Thread Ido Schimmel
implementation. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Florian Fainelli Reviewed-by: Ido Schimmel

Re: [PATCH v2 net-next 11/12] Documentation: networking: switchdev: clarify device driver behavior

2021-03-16 Thread Ido Schimmel
On Tue, Mar 16, 2021 at 04:04:31PM +0200, Vladimir Oltean wrote: > On Tue, Mar 16, 2021 at 04:01:13PM +0200, Ido Schimmel wrote: > > On Tue, Mar 16, 2021 at 01:24:18PM +0200, Vladimir Oltean wrote: > > > +When the bridge has VLAN filtering enabled and a PVID is not config

[PATCH net-next 01/10] mlxsw: spectrum_matchall: Propagate extack further

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Due to the differences between Spectrum-1 and later ASICs, some of the checks currently performed at the common code (where extack is available) will need to be pushed to the per-ASIC operations. As a preparation, propagate extack further to maintain proper error reporting

[PATCH net-next 00/10] mlxsw: Add support for egress and policy-based sampling

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel So far mlxsw only supported ingress sampling using matchall classifier. This series adds support for egress sampling and policy-based sampling using flower classifier on Spectrum-2 and newer ASICs. As such, it is now possible to issue these commands: # tc filter add dev swp1

[PATCH net-next 02/10] mlxsw: spectrum_matchall: Push sampling checks to per-ASIC operations

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Push some sampling checks to the per-ASIC operations, as they are no longer relevant for all ASICs. The sampling rate validation against the MPSC maximum rate is only relevant for Spectrum-1, as Spectrum-2 and later ASICs no longer use MPSC register for sampling. The ingress

[PATCH net-next 03/10] mlxsw: spectrum_matchall: Pass matchall entry to sampling operations

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel The entry will be required by the next patches, so pass it. No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 9 --- .../mellanox/mlxsw/spectrum_matchall.c| 27

[PATCH net-next 05/10] mlxsw: spectrum: Start using sampling triggers hash table

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Start using the previously introduced sampling triggers hash table to store sampling parameters instead of storing them as attributes of the sampled port. This makes it easier to introduce new sampling triggers. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko

[PATCH net-next 04/10] mlxsw: spectrum: Track sampling triggers in a hash table

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Currently, mlxsw supports a single sampling trigger type (i.e., received packet). When sampling is configured on an ingress port, the sampling parameters (e.g., pointer to the psample group) are stored as an attribute of the port, so that they could be passed to

[PATCH net-next 08/10] mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Implement support for action sample when used with a flower classifier by implementing the required sampler_add() / sampler_del() callbacks and registering an Rx listener for the sampled packets. The sampler_add() callback returns an error for Spectrum-1 as the functionality

[PATCH net-next 06/10] mlxsw: spectrum_matchall: Add support for egress sampling

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Allow user space to install a matchall classifier with sample action on egress. This is only supported on Spectrum-2 onwards, so Spectrum-1 will continue to return an error. Programming the hardware to sample on egress is identical to ingress sampling with the sole change of

[PATCH net-next 07/10] mlxsw: core_acl_flex_actions: Add mirror sampler action

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Add core functionality required to support mirror sampler action in the policy engine. The switch driver (e.g., 'mlxsw_spectrum') is required to implement the sampler_add() / sampler_del() callbacks that perform the necessary configuration before the sampler act

[PATCH net-next 09/10] selftests: mlxsw: Add tc sample tests for new triggers

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Test that packets are sampled when tc-sample is used with matchall egress binding and flower classifier. Verify that when performing sampling on egress the end-to-end latency is reported as metadata. Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw

[PATCH net-next 10/10] selftests: mlxsw: Test egress sampling limitation on Spectrum-1 only

2021-03-16 Thread Ido Schimmel
From: Ido Schimmel Make sure egress sampling configuration only fails on Spectrum-1, given that mlxsw now supports it on Spectrum-{2,3}. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh | 4 +++- 1 file changed, 3 insertions

[PATCH net-next 2/7] mlxsw: reg: Add Switch Port Egress VLAN EtherType Register

2021-03-17 Thread Ido Schimmel
vely. This allows using dual VxLAN bridges (802.1d and 802.1ad at the same time). Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 36 +++ 1 file changed, 36 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxs

[PATCH net-next 0/7] mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2

2021-03-17 Thread Ido Schimmel
From: Ido Schimmel This patchset allows user space to simultaneously configure both 802.1d and 802.1ad VxLAN bridges on Spectrum-2 and later ASICs. 802.1ad VxLAN bridges are still forbidden on Spectrum-1. The reason for the current limitation is that up until now the EtherType that was pushed

[PATCH net-next 5/7] mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2

2021-03-17 Thread Ido Schimmel
hen port joins / leaves an 802.1ad bridge in different ASICs. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_nve.h| 1 - .../mellanox/mlxsw/spectrum_nve_vxlan.c | 15 ++ .../mellanox/mlxsw/spectrum_switchdev.c | 52 +

[PATCH net-next 6/7] selftests: forwarding: Add test for dual VxLAN bridge

2021-03-17 Thread Ido Schimmel
From: Amit Cohen Configure VxLAN with an 802.1ad bridge and VxLAN with an 802.1d bridge at the same time in same switch, verify that traffic passed as expected. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../net/forwarding/dual_vxlan_bridge.sh | 366 ++ 1

[PATCH net-next 3/7] mlxsw: spectrum: Add mlxsw_sp_port_egress_ethtype_set()

2021-03-17 Thread Ido Schimmel
through it, instead of the default 802.1q EtherType. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 16 drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/drivers

[PATCH net-next 1/7] mlxsw: reg: Add egr_et_set field to SPVID

2021-03-17 Thread Ido Schimmel
and 802.1ad at the same time). Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index 44f836246e33

[PATCH net-next 4/7] mlxsw: Add struct mlxsw_sp_switchdev_ops per ASIC

2021-03-17 Thread Ido Schimmel
;. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 3 +++ .../net/ethernet/mellanox/mlxsw/spectrum.h| 6 + .../mellanox/mlxsw/spectrum_switchdev.c | 22 +++ 3 files changed, 31 insertions(+) diff --git a/d

[PATCH net-next 7/7] selftests: mlxsw: spectrum-2: Remove q_in_vni_veto test

2021-03-17 Thread Ido Schimmel
From: Amit Cohen q_in_vni_veto.sh is not needed anymore because VxLAN with an 802.1ad bridge and VxLAN with an 802.1d bridge can coexist. Remove the test. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/q_in_vni_veto.sh | 77 --- 1 file

<    1   2   3   4   5   6   7   8   9   10   >