Re: [PATCH v3 net-next 1/7] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Ido Schimmel
cal manner with how it did for the insertion. Then the switchdev > driver would not be required to monitor learn/forget events for its own > ports. It could just delete the rule towards the control interface upon > bridge entry migration. This would make hardware address learning be > possible again. Then it would take a few more packets until the hardware > and software FDB would be in sync again. > > Signed-off-by: Vladimir Oltean > Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel

[PATCH net-next v2 00/15] mlxsw: Introduce initial XM router support

2020-12-14 Thread Ido Schimmel
From: Ido Schimmel This patch set implements initial eXtended Mezzanine (XM) router support. The XM is an external device connected to the Spectrum-{2,3} ASICs using dedicated Ethernet ports. Its purpose is to increase the number of routes that can be offloaded to hardware. This is achieved by

[PATCH net-next v2 12/15] mlxsw: reg: Add Router LPM Cache Enable Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RLPMCE allows disabling the LPM cache. Can be changed on the fly. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/net/ethernet

[PATCH net-next v2 05/15] mlxsw: Ignore ports that are connected to eXtended mezanine

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko Use the info stored in the bus_info struct about the eXtended mezanine connected ports and don't expose them. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 12 drivers/net/ethernet/mellanox/

[PATCH net-next v2 11/15] mlxsw: reg: Add Router LPM Cache ML Delete Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RLCMLD register is used to bulk delete the XLT-LPM cache ML entries. This can be used by SW when L is increased or decreased, thus need to remove entries with old ML values. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next v2 15/15] mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko In case the eXtended mezzanine is present on the system, use it for IPv4 router offload. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c| 4 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h| 1

[PATCH net-next v2 04/15] mlxsw: pci: Obtain info about ports used by eXtended mezanine

2020-12-14 Thread Ido Schimmel
-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 17 ++ drivers/net/ethernet/mellanox/mlxsw/core.h | 7 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 27 +- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH net-next v2 02/15] mlxsw: reg: Add Router XLT Enable Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RXLTE enables XLT (eXtended Lookup Table) LPM lookups if a capable XM is present on the system. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 44 +++ 1 file changed, 44 insertions(+) diff --git

[PATCH net-next v2 06/15] mlxsw: reg: Add Router XLT M select Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RXLTM configures and selects the M for the XM lookups. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 32 +++ 1 file changed, 32 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next v2 08/15] mlxsw: spectrum_router: Introduce per-ASIC XM initialization

2020-12-14 Thread Ido Schimmel
change to better cover the actual inserted routes. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_router.c | 7 ++ .../ethernet/mellanox/mlxsw/spectrum_router.h | 4 + .../mellanox/mlxsw/spectrum_router_xm.c | 77 +++ 3

[PATCH net-next v2 10/15] mlxsw: spectrum_router_xm: Implement L-value tracking for M-index

2020-12-14 Thread Ido Schimmel
Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_router.c | 1 + .../ethernet/mellanox/mlxsw/spectrum_router.h | 1 + .../mellanox/mlxsw/spectrum_router_xm.c | 203 ++ 3 files changed, 205 insertions(+) diff --git a/drivers/net/ethernet/mellanox

[PATCH net-next v2 13/15] mlxsw: spectrum_router_xm: Introduce basic XM cache flushing

2020-12-14 Thread Ido Schimmel
be done. If during this time comes the same flush request, consolidate it to the first one. Implement this queued flushes by a hashtable. v2: * Fix GENMASK() high bit Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../mellanox/mlxsw/spectrum_router_xm.c | 291

[PATCH net-next v2 14/15] mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko Set a profile option to instruct FW to use 1/2 of KVH for XLT cache, not the whole one. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 13 + drivers/net/ethernet/mellanox/mlxsw/core.h | 4

[PATCH net-next v2 09/15] mlxsw: reg: Add XM Router M Table Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The XRMT configures the M-Table for the XLT-LPM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 33 +-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox

[PATCH net-next v2 01/15] mlxsw: reg: Add XM Direct Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The XMDR allows direct access to the XM device via the switch. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 274 +- 1 file changed, 271 insertions(+), 3 deletions(-) diff --git a/drivers/net

[PATCH net-next v2 03/15] mlxsw: spectrum_router: Introduce XM implementation of router low-level ops

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko In order to offload entries to XM, implement a set of low-level functions to work with LPM trees in XM and also to pack and write FIB entries into XM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/Makefile | 1

[PATCH net-next v2 07/15] mlxsw: reg: Add XM Lookup Table Query Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The XLTQ is used to query HW for XM-related info. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 66 +-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox

Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

2020-12-14 Thread Ido Schimmel
On Mon, Dec 14, 2020 at 02:12:31AM +0200, Vladimir Oltean wrote: > On Sun, Dec 13, 2020 at 10:18:27PM +0100, Tobias Waldekranz wrote: > > On Sat, Dec 12, 2020 at 16:26, Vladimir Oltean wrote: > > > On Fri, Dec 11, 2020 at 09:50:24PM +0100, Tobias Waldekranz wrote: > > >> 2. The issue Vladimir ment

Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

2020-12-16 Thread Ido Schimmel
On Wed, Dec 16, 2020 at 04:15:03PM +0100, Tobias Waldekranz wrote: > On Mon, Dec 14, 2020 at 13:42, Ido Schimmel wrote: > > On Mon, Dec 14, 2020 at 02:12:31AM +0200, Vladimir Oltean wrote: > >> On Sun, Dec 13, 2020 at 10:18:27PM +0100, Tobias Waldekranz wrote: > >> >

Re: [PATCH v5 2/3] net: add kcov handle to skb extensions

2020-11-30 Thread Ido Schimmel
On Mon, Nov 30, 2020 at 05:52:48PM -0800, Jakub Kicinski wrote: > On Sat, 21 Nov 2020 18:09:41 +0200 Ido Schimmel wrote: > > + Florian > > > > On Thu, Oct 29, 2020 at 05:36:19PM +, Aleksandr Nogikh wrote: > > > From: Aleksandr Nogikh > > > > &

[PATCH net-next 2/7] selftests: mlxsw: Test RIF's reference count when joining a LAG

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel Test that the reference count of a router interface (RIF) configured for a LAG is incremented / decremented when ports join / leave the LAG. Use the offload indication on routes configured on the RIF to understand if it was created / destroyed. The test fails without the

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

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel This patch set contains various updates for mlxsw in various areas. Patch #1 fixes a corner case in router interface (RIF) configuration. Targeted at net-next since this is not a regression. Patch #2 adds a test case. Patch #3 enables tracing of EMAD events via

[PATCH net-next 3/7] mlxsw: core: Trace EMAD events

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel Currently, mlxsw triggers the 'devlink:devlink_hwmsg' tracepoint whenever a request is sent to the device and whenever a response is received from it. However, the tracepoint is not triggered when an event (e.g., port up / down) is received from the device. Also

[PATCH net-next 1/7] mlxsw: spectrum: Apply RIF configuration when joining a LAG

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel In case a router interface (RIF) is configured for a LAG, make sure its configuration is applied on the new LAG member. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 17 -- .../net/ethernet/mellanox/mlxsw

[PATCH net-next 5/7] mlxsw: core_acl: Use an array instead of a struct with a zero-length array

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel Suppresses the following coccinelle warning: drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c:139:3-7: WARNING use flexible-array member instead Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../mellanox/mlxsw/core_acl_flex_keys.c | 26

[PATCH net-next 7/7] mlxsw: spectrum_router: Reduce mlxsw_sp_ipip_fib_entry_op_gre4()

2020-12-06 Thread Ido Schimmel
mlxsw_sp_ipip_fib_entry_op_gre4_rtdp() make the ipip decap op code similar to nve. Signed-off-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_ipip.c | 45 ++- .../ethernet/mellanox/mlxsw/spectrum_ipip.h | 8 +--- .../ethernet

[PATCH net-next 4/7] mlxsw: spectrum_mr: Use flexible-array member instead of zero-length array

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel Suppresses the following coccinelle warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c:18:15-19: WARNING use flexible-array member instead Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 2 +- 1 file changed, 1 insertion(+), 1

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

2020-12-06 Thread Ido Schimmel
tr 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/ethernet/mellanox/mlxsw/spectrum.c index 65e8407f4646..963eb0b1d9dd 10

[PATCH net-next 00/13] mlxsw: Add support for Q-in-VNI

2020-12-08 Thread Ido Schimmel
From: Ido Schimmel This patch set adds support for Q-in-VNI over Spectrum-{2,3} ASICs. Q-in-VNI is like regular VxLAN encapsulation with the sole difference that overlay packets can contain a VLAN tag. In Linux, this is achieved by adding the VxLAN device to a 802.1ad bridge instead of a 802.1q

[PATCH net-next 04/13] mlxsw: spectrum_switchdev: Create common function for joining VxLAN to VLAN-aware bridge

2020-12-08 Thread Ido Schimmel
Machata Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index

[PATCH net-next 02/13] mlxsw: reg: Add Switch Port VLAN Stacking Register

2020-12-08 Thread Ido Schimmel
Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 104 ++ 1 file changed, 104 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index 0a3c5f89268c..ad6798c2169d

[PATCH net-next 06/13] mlxsw: Save EtherType as part of mlxsw_sp_nve_config

2020-12-08 Thread Ido Schimmel
ype to use. This field is needed to configure which EtherType will be used when VLAN is pushed at ingress of the tunnel port. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c | 2 +- drivers/net/

[PATCH net-next 03/13] mlxsw: reg: Add support for tunnel port in SPVID register

2020-12-08 Thread Ido Schimmel
Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index ad6798c2169d..2a89b3261f00

[PATCH net-next 07/13] mlxsw: spectrum: Publish mlxsw_sp_ethtype_to_sver_type()

2020-12-08 Thread Ido Schimmel
From: Amit Cohen Declare mlxsw_sp_ethtype_to_sver_type() in spectrum.h to enable using it in other files. It will be used in the next patch to map between EtherType and the relevant value configured by SVER register. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido

[PATCH net-next 05/13] mlxsw: Save EtherType as part of mlxsw_sp_nve_params

2020-12-08 Thread Ido Schimmel
802.1q bridges. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 7 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a

[PATCH net-next 09/13] mlxsw: spectrum_switchdev: Use ops->vxlan_join() when adding VLAN to VxLAN device

2020-12-08 Thread Ido Schimmel
802.1q. Call ops->vxlan_join(), so mlxsw_sp_bridge_802{1q, 1ad}_vxlan_join() will be called according to bridge type. This is needed to ensure that VxLAN with 802.1ad bridge will be vetoed in Spectrum-1 with the next patch. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by:

[PATCH net-next 01/13] mlxsw: Use one enum for all registers that contain tunnel_port field

2020-12-08 Thread Ido Schimmel
them also. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 32 ++- .../ethernet/mellanox/mlxsw/spectrum_nve.c| 2 +- .../mellanox/mlxsw/spectrum_nve_vxlan.c | 2 +- 3 files changed, 11

[PATCH net-next 11/13] mlxsw: spectrum_switchdev: Allow joining VxLAN to 802.1ad bridge

2020-12-08 Thread Ido Schimmel
From: Amit Cohen The previous patches added support for VxLAN device enslaved to 802.1ad bridge in Spectrum-2 ASIC and vetoed it in Spectrum-1. Do not veto VxLAN with 802.1ad bridge. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet

[PATCH net-next 08/13] mlxsw: spectrum_nve_vxlan: Add support for Q-in-VNI for Spectrum-2 ASIC

2020-12-08 Thread Ido Schimmel
SPVID register to use EtherType saved in mlxsw_sp_nve_config when VLAN is pushed for the NVE tunnel. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../mellanox/mlxsw/spectrum_nve_vxlan.c | 42 +++ 1 file changed, 42 insertions(+) diff

[PATCH net-next 10/13] mlxsw: Veto Q-in-VNI for Spectrum-1 ASIC

2020-12-08 Thread Ido Schimmel
From: Amit Cohen Implementation of Q-in-VNI is different between ASIC types, this set adds support only for Spectrum-2. Return an error when trying to create VxLAN device and enslave it to 802.1ad bridge in Spectrum-1. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido

[PATCH net-next 13/13] selftests: mlxsw: Add Q-in-VNI veto tests

2020-12-08 Thread Ido Schimmel
From: Amit Cohen Add tests to ensure that the forbidden and unsupported cases are indeed vetoed by mlxsw driver. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/q_in_vni_veto.sh | 77 +++ .../net/mlxsw/spectrum

[PATCH net-next 12/13] selftests: forwarding: Add Q-in-VNI test

2020-12-08 Thread Ido Schimmel
From: Petr Machata Add test to check Q-in-VNI traffic. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/q_in_vni.sh | 347 ++ 1 file changed, 347 insertions(+) create mode 100755 tools/testing/selftests/net/forwarding/q_in_vni.sh

Re: [PATCH net-next] mlxsw: spectrum_router: Fix a double free on error

2020-11-18 Thread Ido Schimmel
On Wed, Nov 18, 2020 at 04:00:48PM +0300, Dan Carpenter wrote: > There is a double free here because mlxsw_sp_nexthop6_group_create() and > mlxsw_sp_nexthop6_group_info_init() free "nh_grp". It should only be > freed in the create function. > > Fixes: 7f7a417e6a11 ("mlxsw: spectrum_router: Split

[PATCH net-next 0/8] mlxsw: Add support for nexthop objects

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel This patch set adds support for nexthop objects in mlxsw. Nexthop objects are treated as another front-end for programming nexthops, in addition to the existing IPv4 and IPv6 front-ends. Patch #1 registers a listener to the nexthop notification chain and parses the nexthop

[PATCH net-next 1/8] mlxsw: spectrum_router: Add support for nexthop objects

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel Register a listener to the nexthop notification chain and parse notified nexthop objects into the existing mlxsw nexthop data structures. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../ethernet/mellanox/mlxsw/spectrum_router.c | 453

[PATCH net-next 2/8] mlxsw: spectrum_router: Enable resolution of nexthop groups from nexthop objects

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel If the FIB info (i.e, 'struct fib_info', 'struct fib6_info') uses a nexthop object, then use the object's identifier to resolve the nexthop group. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../ethernet/mellanox/mlx

[PATCH net-next 8/8] selftests: forwarding: Add multipath tunneling nexthop test

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel Add a nexthop objects version of gre_multipath.sh. Unlike the original test, it also tests IPv6 overlay which is not possible with the legacy nexthop implementation. See commit 9a2ad3623868 ("selftests: forwarding: gre_multipath: Drop IPv6 tests") for more info. Sig

[PATCH net-next 6/8] selftests: forwarding: Test IPv4 routes with IPv6 link-local nexthops

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel In addition to IPv4 multipath tests with IPv4 nexthops, also test IPv4 multipath with nexthops that use IPv6 link-local addresses. Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/router_mpath_nh.sh | 11 +++ 1 file changed, 11 insertions(+) diff

[PATCH net-next 3/8] mlxsw: spectrum_router: Allow programming routes with nexthop objects

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel Now that the driver supports nexthop objects, the check is no longer necessary. Remove it. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers

[PATCH net-next 4/8] selftests: mlxsw: Add nexthop objects configuration tests

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel Test that unsupported nexthop objects are rejected and that offload indication is correctly set on: nexthop objects, nexthop group objects and routes associated these objects. Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/rtnetlink.sh | 189

[PATCH net-next 5/8] selftests: forwarding: Do not configure nexthop objects twice

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel routing_nh_obj() is used to configure the nexthop objects employed by the test, but it is called twice resulting in "RTNETLINK answers: File exists" messages. Remove the first call, so that the function is only called after setup_wait(), when all the interfaces

[PATCH net-next 7/8] selftests: forwarding: Add device-only nexthop test

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel In a similar fashion to router_multipath.sh and its nexthop objects version router_mpath_nh.sh, create a nexthop objects version of router.sh. It reuses the same topology, but uses device-only nexthop objects instead of legacy ones. Signed-off-by: Ido Schimmel

[PATCH iproute2-next 0/2] ip: Nexthop flags extensions

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel Patch #1 prints the recently added 'RTNH_F_TRAP' flag. Patch #2 makes sure that nexthop flags are always printed for nexthop objects. Even when the nexthop does not have a device, such as a blackhole nexthop or a group. Example output with netdevsim: # ip nextho

[PATCH iproute2-next 2/2] nexthop: Always print nexthop flags

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel Currently, the nexthop flags are only printed when the nexthop has a nexthop device. The offload / trap indication is therefore not printed for nexthop groups. Instead, always print the nexthop flags, regardless if the nexthop has a nexthop device or not. Signed-off-by: Ido

[PATCH iproute2-next 1/2] ip route: Print "trap" nexthop indication

2020-11-19 Thread Ido Schimmel
From: Ido Schimmel The kernel can now signal that a nexthop is trapping packets instead of forwarding them. Print the flag to help users understand the offload state of each nexthop. Signed-off-by: Ido Schimmel --- ip/iproute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ip

Re: [PATCH v5 2/3] net: add kcov handle to skb extensions

2020-11-21 Thread Ido Schimmel
+ Florian On Thu, Oct 29, 2020 at 05:36:19PM +, Aleksandr Nogikh wrote: > From: Aleksandr Nogikh > > Remote KCOV coverage collection enables coverage-guided fuzzing of the > code that is not reachable during normal system call execution. It is > especially helpful for fuzzing networking subs

Re: [PATCH net-next 2/3] mlxsw: spectrum_ptp: use PTP wide message type definitions

2020-11-22 Thread Ido Schimmel
On Sun, Nov 22, 2020 at 08:29:22PM +0100, Christian Eggers wrote: > On Sunday, 22 November 2020, 15:35:55 CET, Ido Schimmel wrote: > > On Sun, Nov 22, 2020 at 09:26:35AM +0100, Christian Eggers wrote: > > > Use recently introduced PTP wide defines instead of a driver internal

Re: [PATCH net-next 2/3] mlxsw: spectrum_ptp: use PTP wide message type definitions

2020-11-22 Thread Ido Schimmel
On Sun, Nov 22, 2020 at 04:35:58PM +0200, Ido Schimmel wrote: > Anyway, I added all six patches to our regression as we have some PTP > tests. Will let you know tomorrow. Looks good

[PATCH net-next 02/10] mlxsw: spectrum_router: Use different trap identifier for unresolved nexthops

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Unresolved nexthops are currently written to the adjacency table with a discard action. Packets hitting such entries are trapped to the CPU via the 'DISCARD_ROUTER3' trap which can be enabled or disabled on demand, but is always enabled in order to ensure the

[PATCH net-next 00/10] mlxsw: Add support for blackhole nexthops

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel This patch set adds support for blackhole nexthops in mlxsw. These nexthops are exactly the same as other nexthops, but instead of forwarding packets to an egress router interface (RIF), they are programmed to silently drop them. Patches #1-#4 are preparations. Patch #5 adds

[PATCH net-next 04/10] mlxsw: spectrum_router: Resolve RIF from nexthop struct instead of neighbour

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel The two are the same, but for blackhole nexthops we will not have an associated neighbour struct, so resolve the RIF from the nexthop struct itself instead. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2

[PATCH net-next 05/10] mlxsw: spectrum_router: Add support for blackhole nexthops

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Add support for blackhole nexthops by programming them to the adjacency table with a discard action. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../ethernet/mellanox/mlxsw/spectrum_dpipe.c | 9 ++-- .../ethernet/mellanox/mlxsw/spectrum_router.c | 48

[PATCH net-next 07/10] selftests: forwarding: Add blackhole nexthops tests

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Test that IPv4 and IPv6 ping fail when the route is using a blackhole nexthop or a group with a blackhole nexthop. Test that ping passes when the route starts using a valid nexthop. Signed-off-by: Ido Schimmel --- .../net/forwarding/router_mpath_nh.sh | 58

[PATCH net-next 09/10] mlxsw: spectrum_trap: Add blackhole_nexthop trap

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Register with devlink the blackhole_nexthop trap so that mlxsw will be able to report packets dropped due to a blackhole nexthop. The internal trap identifier is "DISCARD_ROUTER3", which traps packets dropped in the adjacency table. Signed-off-by: Ido Schimmel R

[PATCH net-next 10/10] selftests: mlxsw: Add blackhole_nexthop trap test

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Test that packets hitting a blackhole nexthop are trapped to the CPU when the trap is enabled. Test that packets are not reported when the trap is disabled. Signed-off-by: Ido Schimmel --- .../net/mlxsw/devlink_trap_l3_drops.sh| 36 +++ 1 file

[PATCH net-next 03/10] mlxsw: spectrum_router: Use loopback RIF for unresolved nexthops

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Now that the driver creates a loopback RIF during its initialization, it can be used to program the adjacency entries for unresolved nexthops instead of other RIFs. The loopback RIF is guaranteed to exist for the entire life time of the driver, unlike other RIFs that come and

[PATCH net-next 06/10] selftests: mlxsw: Add blackhole nexthop configuration tests

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Test the mlxsw allows blackhole nexthops to be installed and that the nexthops are marked as offloaded. Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/rtnetlink.sh | 25 --- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a

[PATCH net-next 08/10] devlink: Add blackhole_nexthop trap

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Add a packet trap to report packets that were dropped due to a blackhole nexthop. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- Documentation/networking/devlink/devlink-trap.rst | 4 include/net/devlink.h | 4 +++- net/core

[PATCH net-next 01/10] mlxsw: spectrum_router: Create loopback RIF during initialization

2020-11-22 Thread Ido Schimmel
From: Ido Schimmel Up until now RIFs (router interfaces) were created on demand (e.g., when an IP address was added to a netdev). However, sometimes the device needs to be provided with a RIF when one might not be available. For example, adjacency entries that drop packets need to be programmed

Re: [PATCH net-next] net: sfp: add debugfs support

2020-11-24 Thread Ido Schimmel
On Tue, Nov 24, 2020 at 01:14:31AM +0100, Andrew Lunn wrote: > On Mon, Nov 23, 2020 at 10:06:16PM +, Russell King wrote: > > Add debugfs support to SFP so that the internal state of the SFP state > > machines and hardware signal state can be viewed from userspace, rather > > than having to comp

Re: [PATCH net-next] net: sfp: add debugfs support

2020-11-24 Thread Ido Schimmel
On Tue, Nov 24, 2020 at 09:49:16AM +, Russell King - ARM Linux admin wrote: > On Tue, Nov 24, 2020 at 10:41:51AM +0200, Ido Schimmel wrote: > > On Tue, Nov 24, 2020 at 01:14:31AM +0100, Andrew Lunn wrote: > > > On Mon, Nov 23, 2020 at 10:06:16PM +, Russell King wrote: &

[PATCH net-next 0/5] mlxsw: Update adjacency index more efficiently

2020-11-25 Thread Ido Schimmel
From: Ido Schimmel The device supports an operation that allows the driver to issue one request to update the adjacency index for all the routes in a given virtual router (VR) from old index and size to new ones. This is useful in case the configuration of a certain nexthop group is updated and

[PATCH net-next 1/5] mlxsw: spectrum_router: Fix error handling issue

2020-11-25 Thread Ido Schimmel
From: Ido Schimmel Return error to the caller instead of suppressing it. Fixes: e3ddfb45bacd ("mlxsw: spectrum_router: Allow returning errors from mlxsw_sp_nexthop_group_refresh()") Addresses-Coverity: ("Error handling issues (CHECKED_RETURN)") Signed-off-by: Ido Schimm

[PATCH net-next 3/5] mlxsw: spectrum_router: Rollback virtual router adjacency pointer update

2020-11-25 Thread Ido Schimmel
From: Ido Schimmel In the rare case where the adjacency pointer cannot be updated for a given virtual router, rollback the operation so that virtual routers that are already using the new index will use the old one again. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- .../net

[PATCH net-next 4/5] mlxsw: spectrum_router: Track nexthop group virtual router membership

2020-11-25 Thread Ido Schimmel
From: Ido Schimmel For each nexthop group, track in which virtual routers (VRs) the group is used. This is going to be used by the next patch to perform a more efficient adjacency index update whenever the group's adjacency index changes. Signed-off-by: Ido Schimmel Reviewed-by: Jiri

[PATCH net-next 2/5] mlxsw: spectrum_router: Pass virtual router parameters directly instead of pointer

2020-11-25 Thread Ido Schimmel
From: Ido Schimmel mlxsw_sp_adj_index_mass_update_vr() only needs the virtual router's identifier and protocol, so pass them directly. In a subsequent patch the caller will not have access to the pointer. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mel

[PATCH net-next 5/5] mlxsw: spectrum_router: Update adjacency index more efficiently

2020-11-25 Thread Ido Schimmel
From: Ido Schimmel The device supports an operation that allows the driver to issue one request to update the adjacency index for all the routes in a given virtual router (VR) from old index and size to new ones. This is useful in case the configuration of a certain nexthop group is updated and

[PATCH net-next 1/9] mlxsw: reg: Add Switch Port VLAN Classification Register

2020-11-29 Thread Ido Schimmel
-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 99 +++ 1 file changed, 99 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index fcf9095b3f55

[PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging

2020-11-29 Thread Ido Schimmel
From: Ido Schimmel 802.1ad, also known as QinQ, is an extension to the 802.1q standard, which is concerned with passing possibly 802.1q-tagged packets through another VLAN-like tunnel. The format of 802.1ad tag is the same as 802.1q, except it uses the EtherType of 0x88a8, unlike 802.1q's 0

[PATCH net-next 8/9] mlxsw: Add QinQ configuration vetoes

2020-11-29 Thread Ido Schimmel
to treat 802.1q packets as untagged packets. Veto all those unsupported scenarios and return suitable messages. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 44 +++ .../ethernet

[PATCH net-next 4/9] mlxsw: Make EtherType configurable when pushing VLAN at ingress

2020-11-29 Thread Ido Schimmel
-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 +- .../net/ethernet/mellanox/mlxsw/spectrum.c| 41 +++ .../net/ethernet/mellanox/mlxsw/spectrum.h| 3 +- .../mellanox/mlxsw

[PATCH net-next 7/9] bridge: switchdev: Notify about VLAN protocol changes

2020-11-29 Thread Ido Schimmel
atson Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel --- include/net/switchdev.h | 2 ++ net/bridge/br_vlan.c| 16 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/net/switchdev.h b/include/net/switchdev.h

[PATCH net-next 2/9] mlxsw: reg: Add et_vlan field to SPVID register

2020-11-29 Thread Ido Schimmel
Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index 5248532c3999..bea919b92f76 100644 --- a/drivers/net/ethernet/mellanox

[PATCH net-next 9/9] selftests: forwarding: Add QinQ veto testing

2020-11-29 Thread Ido Schimmel
addition to 802.1ad bridge [ OK ] TEST: switch bridge protocol[ OK ] Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../drivers/net/mlxsw/q_in_q_veto.sh | 296 ++ 1 file

[PATCH net-next 5/9] mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge

2020-11-29 Thread Ido Schimmel
-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../mellanox/mlxsw/spectrum_switchdev.c | 29 ++- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet

[PATCH net-next 6/9] mlxsw: spectrum_switchdev: Add support of QinQ traffic

2020-11-29 Thread Ido Schimmel
with 802.1ad bridge, so return an error with an appropriate extack message. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 2 +- .../net/ethernet/mellanox/mlxsw/spectrum.h| 4 ++ .../mellanox/

[PATCH net-next 3/9] mlxsw: spectrum: Only treat 802.1q packets as tagged packets

2020-11-29 Thread Ido Schimmel
: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 26 +++ 1 file changed, 26 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index

Re: [PATCH net-next 05/18] rtnetlink: Add RTNH_F_TRAP flag

2020-11-09 Thread Ido Schimmel
On Fri, Nov 06, 2020 at 11:12:21AM -0800, Jakub Kicinski wrote: > On Wed, 4 Nov 2020 15:30:27 +0200 Ido Schimmel wrote: > > *flags |= (nhc->nhc_flags & RTNH_F_ONLINK); > > if (nhc->nhc_flags & RTNH_F_OFFLOAD) > > *flags |= RTNH_F_

Re: [PATCH net-next 00/18] nexthop: Add support for nexthop objects offload

2020-11-09 Thread Ido Schimmel
On Fri, Nov 06, 2020 at 11:31:59AM -0800, Jakub Kicinski wrote: > On Wed, 4 Nov 2020 15:30:22 +0200 Ido Schimmel wrote: > > From: Ido Schimmel > > > > This patch set adds support for nexthop objects offload with a dummy > > implementation over netdevsim. mlxsw

[PATCH net-next 06/15] mlxsw: spectrum: Export RALUE pack helper and use it from IPIP

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko As the RALUE packing is going to be put into op, make the user from IPIP code use the same helper as the router code does. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 17 ++--- .../ethernet/mellanox

[PATCH net-next 07/15] mlxsw: spectrum_router: Pass destination IP as a pointer to mlxsw_reg_ralue_pack4()

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Instead of passing destination IP as a u32 value, pass it as pointer to u32. Avoid using local variable for the pointer store. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 ++-- drivers/net/ethernet

[PATCH net-next 13/15] mlxsw: spectrum_router: Introduce fib_entry priv for low-level ops

2020-11-10 Thread Ido Schimmel
related fib_entry gets freed in the middle. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_ipip.c | 12 +- .../ethernet/mellanox/mlxsw/spectrum_ipip.h | 3 +- .../ethernet/mellanox/mlxsw/spectrum_router.c | 185 ++ .../ethernet

[PATCH net-next 10/15] mlxsw: spectrum: Push RALUE packing and writing into low-level router ops

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko With follow-up introduction of XM implementation, XMDR register is going to be optionally used instead of RALUE register. Push the RALUE packing helpers and write call into low-level router ops. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox

[PATCH net-next 11/15] mlxsw: spectrum_router: Prepare work context for possible bulking

2020-11-10 Thread Ido Schimmel
event. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 15 +-- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next 00/15] mlxsw: spectrum: Prepare for XM implementation - prefix insertion and removal

2020-11-10 Thread Ido Schimmel
From: Ido Schimmel Jiri says: This is a preparation patchset for follow-up support of boards with extended mezzanine (XM), which is going to allow extended (scale-wise) router offload. XM requires a separate PRM register named XMDR to be used instead of RALUE to insert/update/remove FIB

[PATCH net-next 08/15] mlxsw: reg: Allow to pass NULL pointer to mlxsw_reg_ralue_pack4/6()

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko In preparation for the change that is going to be done in the next patch, allow to pass NULL pointer to mlxsw_reg_ralue_pack4() and mlxsw_reg_ralue_pack6() helpers. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 6

[PATCH net-next 14/15] mlxsw: spectrum_router: Track FIB entry committed state and skip uncommitted on delete

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko In case bulking is used, the entry that was previously added may not be yet committed to the HW as it waits in the queue for bulk send. For such entries, skip the deletion. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next 15/15] mlxsw: spectrum_router: Introduce FIB entry update op

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Follow-up patchset introducing XMDR implementation is going to need to distinguish write and update ops. Therefore introduce "update op" and call "write op" only when new FIB entry is inserted. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .

[PATCH net-next 09/15] mlxsw: spectrum_router: Use RALUE pack helper from abort function

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Unify the RALUE register payload packing and use the __mlxsw_sp_fib_entry_ralue_pack() helper from __mlxsw_sp_router_set_abort_trap(). Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 ++-- 1 file changed, 2

[PATCH net-next 01/15] mlxsw: spectrum_router: Pass non-register proto enum to __mlxsw_sp_router_set_abort_trap()

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Don't pass RALXX register enum and rather pass enum mlxsw_sp_l3proto to __mlxsw_sp_router_set_abort_trap(). This is in preparation to fib entry pack implementation by XMDR register. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/

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