netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5e: Fix actions_match_supported() return
@ 2020-03-20 13:23 Dan Carpenter
  2020-03-20 14:33 ` Leon Romanovsky
  2020-03-21  2:43 ` Saeed Mahameed
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2020-03-20 13:23 UTC (permalink / raw)
  To: Saeed Mahameed, Paul Blakey
  Cc: Leon Romanovsky, David S. Miller, Roi Dayan, Oz Shlomo, netdev,
	linux-rdma, kernel-janitors

The actions_match_supported() function returns a bool, true for success
and false for failure.  This error path is returning a negative which
is cast to true but it should return false.

Fixes: 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 044891a03be3..e5de7d2bac2b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -3058,7 +3058,7 @@ static bool actions_match_supported(struct mlx5e_priv *priv,
 			 */
 			NL_SET_ERR_MSG_MOD(extack,
 					   "Can't offload mirroring with action ct");
-			return -EOPNOTSUPP;
+			return false;
 		}
 	} else {
 		actions = flow->nic_attr->action;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-23 17:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-20 13:23 [PATCH net-next] net/mlx5e: Fix actions_match_supported() return Dan Carpenter
2020-03-20 14:33 ` Leon Romanovsky
2020-03-21  2:43 ` Saeed Mahameed
2020-03-23 10:02   ` Dan Carpenter
2020-03-23 17:01     ` Jakub Kicinski

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).