From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0BEEAA04F2 for ; Mon, 30 Dec 2019 14:00:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C251A1C031; Mon, 30 Dec 2019 14:00:55 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 1C4231C031 for ; Mon, 30 Dec 2019 14:00:54 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Dec 2019 15:00:50 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xBUD0oRP017109; Mon, 30 Dec 2019 15:00:50 +0200 From: Dekel Peled To: stable@dpdk.org Date: Mon, 30 Dec 2019 14:59:56 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 Subject: [dpdk-stable] [PATCH 18.11] net/mlx5: block RSS action without Rx queue X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" [ upstream commit 15c80155874e ("net/mlx5: block RSS action without Rx queue") ] This patch modifies function mlx5_flow_validate_action_rss(), to prevent the setting of rule with rss action, but without specifying any queues. For example: flow create 0 ingress pattern end actions rss queues end / end Signed-off-by: Dekel Peled --- drivers/net/mlx5/mlx5_flow.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f19b27e..369689c 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -943,6 +943,10 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, &rss->types, "some RSS protocols are not" " supported"); + if (!rss->queue_num) + return rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION_CONF, + NULL, "No queues configured"); for (i = 0; i != rss->queue_num; ++i) { if (!(*priv->rxqs)[rss->queue[i]]) return rte_flow_error_set -- 1.8.3.1