* [PATCH net 0/2] mlxsw: Two small fixes
@ 2019-05-29 7:59 Ido Schimmel
2019-05-29 7:59 ` [PATCH net 1/2] mlxsw: spectrum_acl: Avoid warning after identical rules insertion Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Ido Schimmel @ 2019-05-29 7:59 UTC (permalink / raw)
To: netdev; +Cc: davem, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@mellanox.com>
Patch #1 from Jiri fixes an issue specific to Spectrum-2 where the
insertion of two identical flower filters with different priorities
would trigger a warning.
Patch #2 from Amit prevents the driver from trying to configure a port
with a speed of 56Gb/s and autoneg off as this is not supported and
results in error messages from firmware.
Please consider patch #1 for stable.
Amit Cohen (1):
mlxsw: spectrum: Prevent force of 56G
Jiri Pirko (1):
mlxsw: spectrum_acl: Avoid warning after identical rules insertion
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++
.../net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 11 +++++------
2 files changed, 9 insertions(+), 6 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net 1/2] mlxsw: spectrum_acl: Avoid warning after identical rules insertion
2019-05-29 7:59 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
@ 2019-05-29 7:59 ` Ido Schimmel
2019-05-29 7:59 ` [PATCH net 2/2] mlxsw: spectrum: Prevent force of 56G Ido Schimmel
2019-05-30 19:31 ` [PATCH net 0/2] mlxsw: Two small fixes David Miller
2 siblings, 0 replies; 8+ messages in thread
From: Ido Schimmel @ 2019-05-29 7:59 UTC (permalink / raw)
To: netdev; +Cc: davem, jiri, mlxsw, Ido Schimmel
From: Jiri Pirko <jiri@mellanox.com>
When identical rules are inserted, the latter one goes to C-TCAM. For
that, a second eRP with the same mask is created. These 2 eRPs by the
nature cannot be merged and also one cannot be parent of another.
Teach mlxsw_sp_acl_erp_delta_fill() about this possibility and handle it
gracefully.
Reported-by: Alex Kushnarov <alexanderk@mellanox.com>
Fixes: c22291f7cf45 ("mlxsw: spectrum: acl: Implement delta for ERP")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
.../net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
index c1a9cc9a3292..4c98950380d5 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
@@ -1171,13 +1171,12 @@ mlxsw_sp_acl_erp_delta_fill(const struct mlxsw_sp_acl_erp_key *parent_key,
return -EINVAL;
}
if (si == -1) {
- /* The masks are the same, this cannot happen.
- * That means the caller is broken.
+ /* The masks are the same, this can happen in case eRPs with
+ * the same mask were created in both A-TCAM and C-TCAM.
+ * The only possible condition under which this can happen
+ * is identical rule insertion. Delta is not possible here.
*/
- WARN_ON(1);
- *delta_start = 0;
- *delta_mask = 0;
- return 0;
+ return -EINVAL;
}
pmask = (unsigned char) parent_key->mask[__MASK_IDX(si)];
mask = (unsigned char) key->mask[__MASK_IDX(si)];
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net 2/2] mlxsw: spectrum: Prevent force of 56G
2019-05-29 7:59 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
2019-05-29 7:59 ` [PATCH net 1/2] mlxsw: spectrum_acl: Avoid warning after identical rules insertion Ido Schimmel
@ 2019-05-29 7:59 ` Ido Schimmel
2019-05-30 19:31 ` [PATCH net 0/2] mlxsw: Two small fixes David Miller
2 siblings, 0 replies; 8+ messages in thread
From: Ido Schimmel @ 2019-05-29 7:59 UTC (permalink / raw)
To: netdev; +Cc: davem, jiri, mlxsw, Amit Cohen, Ido Schimmel
From: Amit Cohen <amitc@mellanox.com>
Force of 56G is not supported by hardware in Ethernet devices. This
configuration fails with a bad parameter error from firmware.
Add check of this case. Instead of trying to set 56G with autoneg off,
return a meaningful error.
Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Amit Cohen <amitc@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index dbb425717f5e..dfe6b44baf63 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3128,6 +3128,10 @@ mlxsw_sp_port_set_link_ksettings(struct net_device *dev,
ops->reg_ptys_eth_unpack(mlxsw_sp, ptys_pl, ð_proto_cap, NULL, NULL);
autoneg = cmd->base.autoneg == AUTONEG_ENABLE;
+ if (!autoneg && cmd->base.speed == SPEED_56000) {
+ netdev_err(dev, "56G not supported with autoneg off\n");
+ return -EINVAL;
+ }
eth_proto_new = autoneg ?
ops->to_ptys_advert_link(mlxsw_sp, cmd) :
ops->to_ptys_speed(mlxsw_sp, cmd->base.speed);
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Two small fixes
2019-05-29 7:59 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
2019-05-29 7:59 ` [PATCH net 1/2] mlxsw: spectrum_acl: Avoid warning after identical rules insertion Ido Schimmel
2019-05-29 7:59 ` [PATCH net 2/2] mlxsw: spectrum: Prevent force of 56G Ido Schimmel
@ 2019-05-30 19:31 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2019-05-30 19:31 UTC (permalink / raw)
To: idosch; +Cc: netdev, jiri, mlxsw, idosch
From: Ido Schimmel <idosch@idosch.org>
Date: Wed, 29 May 2019 10:59:43 +0300
> From: Ido Schimmel <idosch@mellanox.com>
>
> Patch #1 from Jiri fixes an issue specific to Spectrum-2 where the
> insertion of two identical flower filters with different priorities
> would trigger a warning.
>
> Patch #2 from Amit prevents the driver from trying to configure a port
> with a speed of 56Gb/s and autoneg off as this is not supported and
> results in error messages from firmware.
Series applied.
> Please consider patch #1 for stable.
Queued up, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net 0/2] mlxsw: Two small fixes
@ 2019-07-31 6:33 Ido Schimmel
2019-07-31 15:24 ` David Miller
0 siblings, 1 reply; 8+ messages in thread
From: Ido Schimmel @ 2019-07-31 6:33 UTC (permalink / raw)
To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@mellanox.com>
Patch #1 from Jiri fixes the error path of the module initialization
function. Found during manual code inspection.
Patch #2 from Petr further reduces the default shared buffer pool sizes
in order to work around a problem that was originally described in
commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on
Spectrum-2").
Jiri Pirko (1):
mlxsw: spectrum: Fix error path in mlxsw_sp_module_init()
Petr Machata (1):
mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Two small fixes
2019-07-31 6:33 Ido Schimmel
@ 2019-07-31 15:24 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2019-07-31 15:24 UTC (permalink / raw)
To: idosch; +Cc: netdev, jiri, petrm, mlxsw, idosch
From: Ido Schimmel <idosch@idosch.org>
Date: Wed, 31 Jul 2019 09:33:13 +0300
> From: Ido Schimmel <idosch@mellanox.com>
>
> Patch #1 from Jiri fixes the error path of the module initialization
> function. Found during manual code inspection.
>
> Patch #2 from Petr further reduces the default shared buffer pool sizes
> in order to work around a problem that was originally described in
> commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on
> Spectrum-2").
Series applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net 0/2] mlxsw: Two small fixes
@ 2021-11-23 7:52 Ido Schimmel
2021-11-23 11:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 8+ messages in thread
From: Ido Schimmel @ 2021-11-23 7:52 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
Patch #1 fixes a recent regression that prevents the driver from loading
with old firmware versions.
Patch #2 protects the driver from a NULL pointer dereference when
working on top of a buggy firmware. This was never observed in an actual
system, only on top of an emulator during development.
Amit Cohen (1):
mlxsw: spectrum: Protect driver from buggy firmware
Danielle Ratson (1):
mlxsw: spectrum: Allow driver to load with old firmware versions
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Two small fixes
2021-11-23 7:52 Ido Schimmel
@ 2021-11-23 11:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-23 11:50 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, jiri, mlxsw, idosch
Hello:
This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 23 Nov 2021 09:52:54 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Patch #1 fixes a recent regression that prevents the driver from loading
> with old firmware versions.
>
> Patch #2 protects the driver from a NULL pointer dereference when
> working on top of a buggy firmware. This was never observed in an actual
> system, only on top of an emulator during development.
>
> [...]
Here is the summary with links:
- [net,1/2] mlxsw: spectrum: Allow driver to load with old firmware versions
https://git.kernel.org/netdev/net/c/ce4995bc6c8e
- [net,2/2] mlxsw: spectrum: Protect driver from buggy firmware
https://git.kernel.org/netdev/net/c/63b08b1f6834
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-23 11:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-29 7:59 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
2019-05-29 7:59 ` [PATCH net 1/2] mlxsw: spectrum_acl: Avoid warning after identical rules insertion Ido Schimmel
2019-05-29 7:59 ` [PATCH net 2/2] mlxsw: spectrum: Prevent force of 56G Ido Schimmel
2019-05-30 19:31 ` [PATCH net 0/2] mlxsw: Two small fixes David Miller
-- strict thread matches above, loose matches on Subject: below --
2019-07-31 6:33 Ido Schimmel
2019-07-31 15:24 ` David Miller
2021-11-23 7:52 Ido Schimmel
2021-11-23 11:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).