Re: [PATCH net-next] mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create()

2017-11-06 Thread Ido Schimmel
igned-off-by: Wei Yongjun <weiyongj...@huawei.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> Thanks

Re: [PATCH net-next 3/3] mlxsw: spectrum_router: Return extack message on abort due to fib rules

2017-10-26 Thread Ido Schimmel
Hi David, On Wed, Oct 25, 2017 at 10:08:05PM -0700, David Ahern wrote: > Adding a FIB rule on a spectrum platform silently aborts FIB offload: > $ ip ru add pref 99 from all to 192.168.1.1 table 10 > $ dmesg -c > [ 623.144736] mlxsw_spectrum :03:00.0: FIB abort triggered. Note >

Re: [PATCH net-next 3/3] mlxsw: spectrum_router: Return extack message on abort due to fib rules

2017-10-26 Thread Ido Schimmel
On Thu, Oct 26, 2017 at 08:26:16AM +0200, Jiri Pirko wrote: > Thu, Oct 26, 2017 at 07:08:05AM CEST, dsah...@gmail.com wrote: > >Adding a FIB rule on a spectrum platform silently aborts FIB offload: > >$ ip ru add pref 99 from all to 192.168.1.1 table 10 > >$ dmesg -c > >[ 623.144736]

[PATCH net v3] ipv4: Fix use-after-free when flushing FIB tables

2017-12-20 Thread Ido Schimmel
e fix more explicit per Dave's and Alex's feedback. Fixes: 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") Signed-off-by: Ido Schimmel <ido...@mellanox.com> Reported-by: Fengguang Wu <fengguang...@intel.com> --- net/ipv4/fib_frontend.c | 9 +++-- 1 file changed, 7 ins

Re: [PATCH net v2] ipv4: Fix use-after-free when flushing FIB tables

2017-12-20 Thread Ido Schimmel
On Wed, Dec 20, 2017 at 07:32:21AM -0800, Alexander Duyck wrote: > I think we might want even more description here. Specifically why > reversing the order allows local to be destroyed before main. I was > thinking something along the lines of: > > Destroy the tables in reverse order to guarantee

[PATCH net-next] mlxsw: spectrum_span: Support LAG under mirror-to-gretap

2018-05-14 Thread Ido Schimmel
achata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c b/drivers/net/ether

[PATCH net-next v2 6/6] mlxsw: spectrum_span: Allow bridge for gretap mirror

2018-04-27 Thread Ido Schimmel
figure the offload to direct the mirrored traffic to that port, possibly with tagging. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 95 -- .../net/ether

[PATCH net-next v2 5/6] mlxsw: Respin SPAN on switchdev events

2018-04-27 Thread Ido Schimmel
; Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 63 -- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ether

[PATCH net-next v2 1/6] net: bridge: Publish bridge accessor functions

2018-04-27 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Add a couple new functions to allow querying FDB and vlan settings of a bridge. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- include/linux/if_bridge.h | 28 ++

[PATCH net-next v2 3/6] mlxsw: spectrum_switchdev: Publish two functions

2018-04-27 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Publish the existing function mlxsw_sp_bridge_port_find(), and add another service accessor mlxsw_sp_bridge_port_stp_state(). Publish both in a new file spectrum_switchdev.h. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next v2 4/6] mlxsw: spectrum: Register SPAN before switchdev

2018-04-27 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Since switchdev events can trigger SPAN respin, it is necessary that the data structures are available. Register SPAN first, with a commentary on what the dependencies are. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next v2 2/6] mlxsw: spectrum: Extract mlxsw_sp_stp_spms_state()

2018-04-27 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Instead of duplicating the decision regarding port forwarding state made by mlxsw_sp_port_vid_stp_set(), extract the decision-making into a new function and reuse. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next v2 0/6] mlxsw: SPAN: Support routes pointing at bridges

2018-04-27 Thread Ido Schimmel
Petr says: When mirroring to a gretap or ip6gretap netdevice, the route that directs the encapsulated packets can reference a bridge. In that case, in the software model, the packet is switched. Thus when offloading mirroring like that, take into consideration FDB, STP, PVID configured at the

[PATCH net-next 3/4] mlxsw: spectrum_span: Support mirror-to-VLAN

2018-05-10 Thread Ido Schimmel
ed--in that case the monitor traffic will be double-tagged, just like in the software path. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 64 ++ 1 file changed,

[PATCH net-next 0/4] mlxsw: Support VLAN devices in mirroring offloads

2018-05-10 Thread Ido Schimmel
Petr says: When offloading "tc action mirred mirror", there are several scenarios where VLAN devices can show up, that mlxsw can offload on Spectrum machines. I) A direct mirror to a VLAN device on top of a front-panel port device (commonly referred to as "RSPAN") II) VLAN device in egress

[PATCH net-next 4/4] mlxsw: spectrum_span: Support VLAN under mirror-to-gretap

2018-05-10 Thread Ido Schimmel
n over vlan-aware bridge where the egress device is phys Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 27 +++--- 1 file changed, 19 insertions(+), 8 deleti

[PATCH net-next 2/4] mlxsw: reg: Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH

2018-05-10 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH to support VLAN-encapsulated port mirroring. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/reg.h

[PATCH net-next 1/4] net: bridge: Allow bridge master in br_vlan_get_info()

2018-05-10 Thread Ido Schimmel
asters as well. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- net/bridge/br_vlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index df37a5137c25..dc832c0934c6 100644 --- a/net/brid

Re: [PATCH] mlxsw: core: Fix an error handling path in 'mlxsw_core_bus_device_register()'

2018-05-10 Thread Ido Schimmel
> > Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> For net: Fixes: ef3116e5403e ("mlxsw: spectrum: Register KVD resources with devlink") Reviewed-by: Ido Schimmel <ido...@mellanox.com> Next time, please indicate the tree you're targeting as explained her

[PATCH net-next 1/2] mlxsw: spectrum_span: Rename misnamed variable l3edev

2018-05-11 Thread Ido Schimmel
o "dev", because that function is just a service routine where the distinction between tunnel and egress device isn't necessary. In mlxsw_sp_span_entry_tunnel_parms_common(), rename to "edev" to emphasize that the routine traces packet egress. Signed-off-by: Petr Machata <pe...@me

[PATCH net-next 0/2] mlxsw: spectrum_span: Two minor adjustments

2018-05-11 Thread Ido Schimmel
Petr says: This patch set fixes a couple of nits in mlxsw's SPAN implementation: two counts of inaccurate variable name and one count of unsuitable error code, fixed, respectively, in patches #1 and #2. Petr Machata (2): mlxsw: spectrum_span: Rename misnamed variable l3edev mlxsw:

[PATCH net-next 2/2] mlxsw: spectrum_span: Use a more fitting error code

2018-05-11 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> ENOENT is suitable when an item is looked for in a collection and can't be found. The failure here is actually a depletion of a resource, where ENOBUFS is the more fitting error code. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed

Re: [net-next 1/6] net/dcb: Add dcbnl buffer attribute

2018-05-24 Thread Ido Schimmel
Hi Jakub, On Wed, May 23, 2018 at 02:23:14AM -0700, Jakub Kicinski wrote: > Are you referring to XOFF/XON thresholds? I don't think the "threshold > type" in devlink API implies we are setting XON/XOFF thresholds > directly :S If PFC is enabled we may be setting them indirectly, > obviously. >

[PATCH net 3/4] mlxsw: spectrum_router: Align with new route replace logic

2018-06-15 Thread Ido Schimmel
Simplify route replace and appending into multipath route") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/

[PATCH net 4/4] mlxsw: spectrum_switchdev: Fix port_vlan refcounting

2018-06-15 Thread Ido Schimmel
tries") Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/ne

[PATCH net 1/4] ipv6: Only emit append events for appended routes

2018-06-15 Thread Ido Schimmel
IPv6 behavior with IPv4, thereby allowing listeners to more easily handle these events. Fixes: f34436a43092 ("net/ipv6: Simplify route replace and appending into multipath route") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- net/ipv6/ip6_fib.c | 5 ++--- 1 file changed, 2

[PATCH net 0/4] mlxsw: IPv6 and reference counting fixes

2018-06-15 Thread Ido Schimmel
A selftest will be submitted when net-next opens. The last patch fixes a reference count problem of the port_vlan struct. I plan to simplify the code in net-next, so that reference counting is not necessary anymore. Ido Schimmel (3): ipv6: Only emit append events for appended routes mlxsw: spect

[PATCH net 2/4] mlxsw: spectrum_router: Allow appending to dev-only routes

2018-06-15 Thread Ido Schimmel
y route replace and appending into multipath route") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 27 +++--- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_rou

Re: [PATCH net 1/2] ip_tunnel: restore binding to ifaces with a large mtu

2018-05-30 Thread Ido Schimmel
set a mtu > IP_MAX_MTU: > $ ip l s dummy1 mtu 66000 > After that patch, it's also possible to bind an ip tunnel on that kind of > interface. > > CC: Petr Machata > CC: Ido Schimmel > Link: > https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/com

[PATCH net] mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG

2018-05-27 Thread Ido Schimmel
=== Fixes: 9589a7b5d7d9 ("mlxsw: spectrum: Handle VLAN devices linking / unlinking") Suggested-by: Ido Schimmel <ido...@mellanox.com> Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/

[PATCH net-next 2/3] mlxsw: cmd: Handle error after reset gracefully

2018-05-27 Thread Ido Schimmel
: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 16 +++- drivers/net/ethernet/mellanox/mlxsw/core.c | 26 +++--- 2 files changed, 30 insertions(+), 12 deletions(-) diff -

[PATCH net-next 0/3] mlxsw: use MRSR register for FW reset

2018-05-27 Thread Ido Schimmel
Jiri says: Introduce a MRSR register definition and use it to do FW reset instead of existing mechanism using PCI BAR0 register. Jiri Pirko (3): mlxsw: reg: Add Management Reset and Shutdown Register mlxsw: cmd: Handle error after reset gracefully mlxsw: pci: Utilize MRSR register to

[PATCH net-next 1/3] mlxsw: reg: Add Management Reset and Shutdown Register

2018-05-27 Thread Ido Schimmel
From: Jiri Pirko <j...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/net/ether

[PATCH net-next 3/3] mlxsw: pci: Utilize MRSR register to perform FW reset

2018-05-27 Thread Ido Schimmel
t, IRQ initialization needs to be moved as well. As a side effect, the reset move simplifies the devlink reload flow. Signed-off-by: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/core.c | 4 +- drivers/net

Re: [PATCH net-next] rtnetlink: Fix null-ptr-deref in rtnl_newlink

2018-06-01 Thread Ido Schimmel
nk+0x400/0x1110 > [...] > > Fixes: ccf8dbcd062a ("rtnetlink: Remove VLA usage") > Signed-off-by: Prashant Bhole My machine crashed while running regression tests. Thanks for fixing! Tested-by: Ido Schimmel

[PATCH net-next 1/2] mlxsw: spectrum_switchdev: Postpone respin on object deletion

2018-06-02 Thread Ido Schimmel
Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c index 8a15ac49cb5a..e97652c40

[PATCH net-next 2/2] mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED

2018-06-02 Thread Ido Schimmel
VLAN on both branches: set to zero (for unset) when BRIDGE_VLAN_INFO_UNTAGGED, copy the resolved VLAN (e.g. from bridge PVID) otherwise. Fixes: 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap mirror") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/ne

[PATCH net-next 0/2] mlxsw: Fixes in offloading of mirror-to-gretap

2018-06-02 Thread Ido Schimmel
Petr says: These two patches fix issues in offloading of mirror-to-gretap when bridge is present in the underlay. In patch #1, reconsideration of SPAN configuration is not done right at the point that SWITCHDEV_OBJ_ID_PORT_VLAN deletion notification is distributed, but is postponed, because the

Re: [PATCH net-next 3/3] mlxsw: Add extack messages for port_{un,}split failures?

2018-06-05 Thread Ido Schimmel
On Tue, Jun 05, 2018 at 09:52:30AM +0200, Jiri Pirko wrote: > Tue, Jun 05, 2018 at 12:15:03AM CEST, dsah...@kernel.org wrote: > > if (!mlxsw_sp_port->split) { > > netdev_err(mlxsw_sp_port->dev, "Port wasn't split\n"); > >+NL_SET_ERR_MSG_MOD(extack, "Port was not

Re: [PATCH net-next 3/3] mlxsw: Add extack messages for port_{un,}split failures

2018-06-04 Thread Ido Schimmel
: Invalid argument > > $ devlink port unsplit swp4 > Error: mlxsw_spectrum: Port was not split. > devlink answers: Invalid argument > > Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Thanks!

Re: [PATCH net] mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG

2018-05-28 Thread Ido Schimmel
On Mon, May 28, 2018 at 05:55:58AM +0200, Andrew Lunn wrote: > > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > > b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > > index ca38a30fbe91..adc6ab2cf429 100644 > > --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > > +++

Re: [PATCH linux-firmware] Mellanox: Add new mlxsw_spectrum firmware 13.1701.2

2018-07-01 Thread Ido Schimmel
On Tue, Jun 19, 2018 at 09:33:06AM +0300, Nir Dotan wrote: > This new firmware contains: > - Support for new types of cables > - Support for flashing future firmware without reboot > - Support for Router ARP BC and UC traps Please disregard the patch. We found a problem with

Re: [PATCH v3,net-next] vlan: implement vlan id and protocol changes

2018-06-26 Thread Ido Schimmel
On Tue, Jun 26, 2018 at 09:33:40AM -0400, Chas Williams wrote: > On Tue, Jun 26, 2018 at 6:32 AM Ido Schimmel wrote: > > > On Mon, Jun 25, 2018 at 02:45:24PM -0600, David Ahern wrote: > > > On 6/25/18 4:30 AM, Chas Williams wrote: > > > > vlan_changelink si

Re: [PATCH v3,net-next] vlan: implement vlan id and protocol changes

2018-06-26 Thread Ido Schimmel
On Tue, Jun 26, 2018 at 09:31:55AM -0400, Chas Williams wrote: > On Mon, Jun 25, 2018 at 4:45 PM David Ahern wrote: > > > On 6/25/18 4:30 AM, Chas Williams wrote: > > > vlan_changelink silently ignores attempts to change the vlan id > > > or protocol id of an existing vlan interface. Implement

Re: [patch net-next v2 7/9] mlxsw: spectrum: Implement chain template hinting

2018-06-26 Thread Ido Schimmel
t what elements are going to be used > and pass that down to mlxsw_sp_acl_tcam_group_add(). Later on, when the > first filter is inserted, the mlxsw_sp_acl_tcam_group_use_patterns() > function would use this element usage information instead of looking > up a pattern. > > Signed-off-

[PATCH net-next 6/6] selftests: forwarding: Test routed bridge interface

2018-06-25 Thread Ido Schimmel
expected to come out tagged at $h1. This tests the fix introduced in the previous patches. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/router_bridge.sh | 113 ++ .../selftests/net/forwarding/router_bridge_vlan.sh | 132

[PATCH net-next 2/6] mlxsw: spectrum_router: Allocate FID according to PVID

2018-06-25 Thread Ido Schimmel
-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 05c52e486330

[PATCH net-next 4/6] mlxsw: spectrum_router: Add mlxsw_sp_rif_fid()

2018-06-25 Thread Ido Schimmel
From: Petr Machata In order to allow querying of the VID for which a RIF was created, add a new function that returns a FID for a given RIF. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 5 + drivers/net/ethernet

[PATCH net-next 5/6] mlxsw: spectrum_switchdev: Ban PVID change if bridge has a RIF

2018-06-25 Thread Ido Schimmel
. This patch guards PVID changes after the RIF was introduced. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 47 +- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next 1/6] mlxsw: spectrum_router: Propagate extack to .fid_get()

2018-06-25 Thread Ido Schimmel
From: Petr Machata In the follow-up patch, mlxsw_sp_rif_vlan_fid_get() will be changed in a way that could fail. Give that function a possibility to explain the failure through extack. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next 0/6] mlxsw: Support bridge router interfaces with non-default VLAN

2018-06-25 Thread Ido Schimmel
Petr says: When traffic is inserted on a router interface associated with an 802.1q bridge, the VLAN that the traffic appears on is determined by PVID of the bridge device itself. However currently mlxsw always configures such traffic to be forwarded to VLAN 1, regardless of the bridge PVID. Fix

[PATCH net-next 3/6] mlxsw: spectrum_router: Publish mlxsw_sp_rif_find_by_dev()

2018-06-25 Thread Ido Schimmel
Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net

Re: [PATCH net-next] route: add support for directed broadcast forwarding

2018-06-25 Thread Ido Schimmel
Hi Xin, On Mon, Jun 25, 2018 at 10:45:08AM +0800, Xin Long wrote: > This patch implements the feature described in rfc1812#section-5.3.5.2 > and rfc2644. It allows the router to forward directed broadcast when > sysctl mc_forwarding is enabled. You mean bc_forwarding? > > Note that this

Re: [PATCH v3,net-next] vlan: implement vlan id and protocol changes

2018-06-26 Thread Ido Schimmel
On Mon, Jun 25, 2018 at 02:45:24PM -0600, David Ahern wrote: > On 6/25/18 4:30 AM, Chas Williams wrote: > > vlan_changelink silently ignores attempts to change the vlan id > > or protocol id of an existing vlan interface. Implement by adding > > the new vlan id and protocol to the interface's

[PATCH net-next v2 1/2] mlxsw: spectrum_router: Return an error for non-default FIB rules

2018-05-02 Thread Ido Schimmel
00.1 table 10 Error: mlxsw_spectrum: FIB rules not supported. Note that offload is only aborted when non-default FIB rules are already installed and merely replayed during module initialization. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectr

[PATCH net-next v2 0/2] mlxsw: Reject unsupported FIB configurations

2018-05-02 Thread Ido Schimmel
to exceeded resources for example). v2: * Change error code in first patch to -EOPNOTSUPP (David Ahern). Ido Schimmel (2): mlxsw: spectrum_router: Return an error for non-default FIB rules mlxsw: spectrum_router: Return an error for routes added after abort .../net/ethernet/mellanox/mlxsw

[PATCH net-next v2 2/2] mlxsw: spectrum_router: Return an error for routes added after abort

2018-05-02 Thread Ido Schimmel
-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index added380e344..8028d2

Re: [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops

2018-05-02 Thread Ido Schimmel
On Wed, May 02, 2018 at 12:58:56PM -0600, David Ahern wrote: > On 5/2/18 12:53 PM, Ido Schimmel wrote: > > > > So this fixes the issue for me. To reproduce: > > > > # ip -6 address add 2001:db8::1/64 dev dummy0 > > # ip -6 address add 2001:db8::1/64 dev dummy1 &

[PATCH net] ipv6: Revert "ipv6: Allow non-gateway ECMP for IPv6"

2018-05-02 Thread Ido Schimmel
is not set for local routes. Revert the commit as it does not fix a bug and has side effects. To reproduce: # ip -6 address add 2001:db8::1/64 dev dummy0 # ip -6 address add 2001:db8::1/64 dev dummy1 Fixes: edd7ceb78296 ("ipv6: Allow non-gateway ECMP for IPv6") Signed-off-by: Ido Schimmel

Re: [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops

2018-05-02 Thread Ido Schimmel
On Wed, May 02, 2018 at 09:43:50AM -0700, Eric Dumazet wrote: > > > On 01/09/2018 07:43 PM, David Ahern wrote: > > On 1/9/18 7:40 AM, Ido Schimmel wrote: > >> Before we convert IPv6 to use hash-threshold instead of modulo-N, we > >> first need each nex

Re: [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops

2018-05-02 Thread Ido Schimmel
On Wed, May 02, 2018 at 08:52:44PM +0300, Ido Schimmel wrote: > On Wed, May 02, 2018 at 08:21:06PM +0300, Ido Schimmel wrote: > > On Wed, May 02, 2018 at 09:43:50AM -0700, Eric Dumazet wrote: > > > > > > > > > On 01/09/2018 07:43 PM, David Ahern wrote: >

Re: [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops

2018-05-02 Thread Ido Schimmel
On Wed, May 02, 2018 at 08:21:06PM +0300, Ido Schimmel wrote: > On Wed, May 02, 2018 at 09:43:50AM -0700, Eric Dumazet wrote: > > > > > > On 01/09/2018 07:43 PM, David Ahern wrote: > > > On 1/9/18 7:40 AM, Ido Schimmel wrote: > > >> Before we convert IP

[PATCH net-next 2/2] selftests: forwarding: Allow running specific tests

2018-05-03 Thread Ido Schimmel
_ipv4 ping_ipv6" # ./bridge_vlan_aware.sh TEST: ping [PASS] TEST: ping6 [PASS] Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../selftests/net/forwa

[PATCH net-next 0/2] selftests: forwarding: Two enhancements

2018-05-03 Thread Ido Schimmel
First patch increases the maximum deviation in the multipath tests which proved to be too low in some cases. Second patch allows user to run only specific tests from each file using the TESTS environment variable. This granularity is needed in setups where not all the tests can pass. Ido

[PATCH net-next 1/2] selftests: forwarding: Increase maximum deviation in multipath test

2018-05-03 Thread Ido Schimmel
1.00 Measured ratio 1.11 Fix this by allowing an up to 15% deviation between both ratios. Another possibility is to increase the number of generated flows, but this will prolong the execution time of the test, which is already quite high. Signed-off-by: Ido Schimmel <ido...@mellanox.

[PATCH net-next 3/6] mlxsw: spectrum_switchdev: Publish two functions

2018-04-26 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Publish the existing function mlxsw_sp_bridge_port_find(), and add another service accessor mlxsw_sp_bridge_port_stp_state(). Publish both in a new file spectrum_switchdev.h. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next 0/6] mlxsw: SPAN: Support routes pointing at bridges

2018-04-26 Thread Ido Schimmel
Petr says: When mirroring to a gretap or ip6gretap netdevice, the route that directs the encapsulated packets can reference a bridge. In that case, in the software model, the packet is switched. Thus when offloading mirroring like that, take into consideration FDB, STP, PVID configured at the

[PATCH net-next 4/6] mlxsw: spectrum: Register SPAN before switchdev

2018-04-26 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Since switchdev events can trigger SPAN respin, it is necessary that the data structures are available. Register SPAN first, with a commentary on what the dependencies are. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next 1/6] net: bridge: Publish bridge accessor functions

2018-04-26 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> To allow querying FDB and vlan settings of a bridge, publish several existing functions and add some new ones. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- include/linu

[PATCH net-next 2/6] mlxsw: spectrum: Extract mlxsw_sp_stp_spms_state()

2018-04-26 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Instead of duplicating the decision regarding port forwarding state made by mlxsw_sp_port_vid_stp_set(), extract the decision-making into a new function and reuse. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next 5/6] mlxsw: Respin SPAN on switchdev events

2018-04-26 Thread Ido Schimmel
; Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 63 -- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ether

[PATCH net] mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list

2018-04-26 Thread Ido Schimmel
the device so that it will continue to forward traffic through that port. Fix a copy-paste error that checked that IGMP snooping is enabled twice instead of checking the port's mrouter state. Fixes: ded711c87a04 ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes") Signed-o

[PATCH net-next 6/6] mlxsw: spectrum_span: Allow bridge for gretap mirror

2018-04-26 Thread Ido Schimmel
figure the offload to direct the mirrored traffic to that port, possibly with tagging. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 102 +++-- .../net/ether

[PATCH iproute2-master] iproute: Parse last nexthop in a multipath route

2018-05-01 Thread Ido Schimmel
nexthop dev dummy0 weight 1 nexthop dev dummy1 weight 1 Fixes: f48e14880a0e ("iproute: refactor multipath print") Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip

Re: [PATCH] ipv6: Allow non-gateway ECMP for IPv6

2018-05-01 Thread Ido Schimmel
On Mon, Apr 30, 2018 at 08:59:10PM -0600, David Ahern wrote: > On 4/30/18 3:15 PM, Thomas Winter wrote: > > It is valid to have static routes where the nexthop > > is an interface not an address such as tunnels. > > For IPv4 it was possible to use ECMP on these routes > > but not for IPv6. > > >

Re: [PATCH net-next 1/2] mlxsw: spectrum_router: Return an error for non-default FIB rules

2018-05-01 Thread Ido Schimmel
On Tue, May 01, 2018 at 09:16:23AM -0600, David Ahern wrote: > On 5/1/18 2:16 AM, Ido Schimmel wrote: > > Since commit 9776d32537d2 ("net: Move call_fib_rule_notifiers up in > > fib_nl_newrule") it is possible to forbid the installation of > > unsupported FIB ru

[PATCH net-next 0/2] mlxsw: Reject unsupported FIB configurations

2018-05-01 Thread Ido Schimmel
to exceeded resources for example). Ido Schimmel (2): mlxsw: spectrum_router: Return an error for non-default FIB rules mlxsw: spectrum_router: Return an error for routes added after abort drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 13 ++--- 1 file changed, 10 insertions

[PATCH net-next 2/2] mlxsw: spectrum_router: Return an error for routes added after abort

2018-05-01 Thread Ido Schimmel
-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index baea97560029..c9fce6

[PATCH net-next 1/2] mlxsw: spectrum_router: Return an error for non-default FIB rules

2018-05-01 Thread Ido Schimmel
00.1 table 10 Error: mlxsw_spectrum: FIB rules not supported. Note that offload is only aborted when non-default FIB rules are already installed and merely replayed during module initialization. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spect

[PATCH net-next v3 5/6] mlxsw: Respin SPAN on switchdev events

2018-04-29 Thread Ido Schimmel
; Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 63 -- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ether

[PATCH net-next v3 4/6] mlxsw: spectrum: Register SPAN before switchdev

2018-04-29 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Since switchdev events can trigger SPAN respin, it is necessary that the data structures are available. Register SPAN first, with a commentary on what the dependencies are. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next v3 0/6] mlxsw: SPAN: Support routes pointing at bridges

2018-04-29 Thread Ido Schimmel
Petr says: When mirroring to a gretap or ip6gretap netdevice, the route that directs the encapsulated packets can reference a bridge. In that case, in the software model, the packet is switched. Thus when offloading mirroring like that, take into consideration FDB, STP, PVID configured at the

[PATCH net-next v3 1/6] net: bridge: Publish bridge accessor functions

2018-04-29 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Add a couple new functions to allow querying FDB and vlan settings of a bridge. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- include/linux/if_bridge.h | 28 ++

[PATCH net-next v3 3/6] mlxsw: spectrum_switchdev: Publish two functions

2018-04-29 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Publish the existing function mlxsw_sp_bridge_port_find(), and add another service accessor mlxsw_sp_bridge_port_stp_state(). Publish both in a new file spectrum_switchdev.h. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next v3 2/6] mlxsw: spectrum: Extract mlxsw_sp_stp_spms_state()

2018-04-29 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Instead of duplicating the decision regarding port forwarding state made by mlxsw_sp_port_vid_stp_set(), extract the decision-making into a new function and reuse. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next v3 6/6] mlxsw: spectrum_span: Allow bridge for gretap mirror

2018-04-29 Thread Ido Schimmel
figure the offload to direct the mirrored traffic to that port, possibly with tagging. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 95 -- .../net/ether

[PATCH net-next 2/4] mlxsw: pci: Introduce helpers to work with multiple CQE versions

2018-05-03 Thread Ido Schimmel
From: Jiri Pirko <j...@mellanox.com> Introduce definitions of fields in CQE version 1 and 2. Also, introduce common helpers that would call appropriate version-specific helpers according to the version enum passed. Signed-off-by: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido S

[PATCH net-next 0/4] mlxsw: Introduce support for CQEv1/2

2018-05-03 Thread Ido Schimmel
Jiri says: Current SwitchX2 and Spectrum FWs support CQEv0 and that is what we implement in mlxsw. Spectrum FW also supports CQE v1 and v2. However, Spectrum-2 won't support CQEv0. Prepare for it and setup the CQE versions to use according to what is queried from FW. Jiri Pirko (4): mlxsw:

[PATCH net-next 1/4] mlxsw: resources: Add CQE versions resources

2018-05-03 Thread Ido Schimmel
From: Jiri Pirko <j...@mellanox.com> Add resources that FW uses to report supported CQE versions. Signed-off-by: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/resources.h | 6 ++ 1 file changed, 6 i

[PATCH net-next 3/4] mlxsw: pci: Allow to use CQEs of version 1 and version 2

2018-05-03 Thread Ido Schimmel
ed-off-by: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 24 -- drivers/net/ethernet/mellanox/mlxsw/pci.c | 78 +++ 2 files changed, 91 insertions(+), 11 deletions(-) di

[PATCH net-next 4/4] mlxsw: pci: Check number of CQEs for CQE version 2

2018-05-03 Thread Ido Schimmel
From: Jiri Pirko <j...@mellanox.com> Check number of CQEs for CQE version 2 reported by QUERY_AQ_CAP command. Signed-off-by: Jiri Pirko <j...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 7 ++- drivers/net

Re: [PATCH v2 net-next 2/3] net: Add extack to fib_notifier_info

2017-10-28 Thread Ido Schimmel
ff-by: David Ahern <dsah...@gmail.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com>

Re: [PATCH v2 net-next 3/3] mlxsw: spectrum_router: Return extack message on abort due to fib rules

2017-10-28 Thread Ido Schimmel
is used to abort the offload. Change the rule delete handling to just > return since it does nothing at the moment. > > Signed-off-by: David Ahern <dsah...@gmail.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> I'll follow-up with a patch to notify about IPv6 source-s

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-03 Thread Ido Schimmel
On Mon, Jul 02, 2018 at 03:03:12PM -0700, dsah...@kernel.org wrote: > From: David Ahern > > NetworkManager likes to manage linklocal prefix routes and does so with > the NLM_F_APPEND flag, breaking attempts to simplify the IPv6 route > code and by extension enable multipath routes with device

[RFC PATCH net-next 09/19] ipv6: Ignore dead routes during lookup

2017-12-31 Thread Ido Schimmel
sure dead routes are skipped during route lookup, so as to not cause packet loss. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- net/ipv6/route.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 2bef8d

[RFC PATCH net-next 12/19] ipv6: Teach tree walker to skip multipath routes

2017-12-31 Thread Ido Schimmel
., not all siblings are dead), then we should just skip the multipath route as our work is done. Have the tree walker jump to the last sibling when it is determined that the multipath route needs to be skipped. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- net/ipv6/ip6_fib.

[RFC PATCH net-next 16/19] ipv6: Flush multipath routes when all siblings are dead

2017-12-31 Thread Ido Schimmel
to update the sernum of the affected tree nodes, so as to prevent the use of wrong dst entries. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- net/ipv6/route.c | 53 ++--- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/ne

[RFC PATCH net-next 10/19] ipv6: Report dead flag during route dump

2017-12-31 Thread Ido Schimmel
. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- net/ipv6/route.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0927b02b2819..4d0d32309bcc 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4049,6 +4049,9 @@ static size_t rt6_nlms

[RFC PATCH net-next 03/19] ipv6: Clear nexthop flags upon netdev up

2017-12-31 Thread Ido Schimmel
Previous patch marked nexthops with the 'dead' and 'linkdown' flags. Clear these flags when the netdev comes back up. Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- include/net/ip6_route.h | 1 + net/ipv6/addrconf.c | 3 +++ net/ipv6/route.c

[RFC PATCH net-next 01/19] ipv6: Remove redundant route flushing during namespace dismantle

2017-12-31 Thread Ido Schimmel
. Thus, all the routing tables in the namespace are empty by the time fib6_net_exit() is invoked and the call to rt6_ifdown() can be removed. This allows us to simplify the condition in fib6_ifdown() as it's only ever called with an actual netdev. Signed-off-by: Ido Schimmel <ido...@mellanox.

<    1   2   3   4   5   6   7   8   >