aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-03 13:53:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-03 13:53:20 +0200
commit888dc273ea4e7ca332a6f73d10dfc8f2b212c803 (patch)
tree0c2154dfa92ca6ee761c358e58a3e35831558bb5 /drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
parenttty: cpm_uart: drop unused iflag macro (diff)
parentLinux 5.2-rc3 (diff)
downloadlinux-dev-888dc273ea4e7ca332a6f73d10dfc8f2b212c803.tar.xz
linux-dev-888dc273ea4e7ca332a6f73d10dfc8f2b212c803.zip
Merge 5.2-rc3 into tty-next
We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c11
1 files 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)];