From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: [dpdk-stable] [PATCH v4 03/11] net/mlx5: fix RSS flow action bounds check
Date: Tue, 10 Apr 2018 18:34:08 +0200 [thread overview]
Message-ID: <20180410161132.8776-4-adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <20180410161132.8776-1-adrien.mazarguil@6wind.com>
The number of queues provided by the application is not checked against
parser's supported maximum.
Fixes: 3d821d6fea40 ("net/mlx5: support RSS action flow rule")
Cc: stable@dpdk.org
Cc: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e6af3243d..f051fbef5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -16,6 +16,7 @@
#pragma GCC diagnostic error "-Wpedantic"
#endif
+#include <rte_common.h>
#include <rte_ethdev_driver.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
@@ -713,6 +714,14 @@ mlx5_flow_convert_actions(struct rte_eth_dev *dev,
return -rte_errno;
}
}
+ if (rss->num > RTE_DIM(parser->queues)) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ actions,
+ "too many queues for RSS"
+ " context");
+ return -rte_errno;
+ }
for (n = 0; n < rss->num; ++n) {
if (rss->queue[n] >= priv->rxqs_n) {
rte_flow_error_set(error, EINVAL,
--
2.11.0
next prev parent reply other threads:[~2018-04-10 16:34 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180323124725.15806-1-adrien.mazarguil@6wind.com>
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 1/9] net/mlx4: fix RSS resource leak in case of error Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 2/9] net/mlx4: fix ignored RSS hash types Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 3/9] app/testpmd: fix flow completion for RSS queues Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 4/9] app/testpmd: fix lack of flow action configuration Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 5/9] app/testpmd: fix RSS " Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 6/9] app/testpmd: fix missing RSS fields in flow action Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 7/9] ethdev: fix shallow copy of flow API RSS action Adrien Mazarguil
2018-03-23 12:58 ` [dpdk-stable] [PATCH v1 8/9] ethdev: fix missing boolean values in flow command Adrien Mazarguil
[not found] ` <20180404144805.11966-1-adrien.mazarguil@6wind.com>
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 01/13] net/mlx4: fix RSS resource leak in case of error Adrien Mazarguil
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 02/13] net/mlx4: fix ignored RSS hash types Adrien Mazarguil
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 03/13] net/mlx5: fix RSS flow action bounds check Adrien Mazarguil
2018-04-05 6:57 ` Nélio Laranjeiro
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 04/13] net/bnxt: fix matching of flow API item masks Adrien Mazarguil
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 05/13] net/sfc: fix endian conversions in flow API Adrien Mazarguil
2018-04-04 15:30 ` Andrew Rybchenko
2018-04-04 16:08 ` Adrien Mazarguil
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 06/13] app/testpmd: fix flow completion for RSS queues Adrien Mazarguil
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 07/13] app/testpmd: fix lack of flow action configuration Adrien Mazarguil
2018-04-05 6:59 ` Nélio Laranjeiro
2018-04-04 14:57 ` [dpdk-stable] [PATCH v2 08/13] app/testpmd: fix RSS " Adrien Mazarguil
2018-04-05 7:39 ` Nélio Laranjeiro
2018-04-04 14:58 ` [dpdk-stable] [PATCH v2 09/13] app/testpmd: fix missing RSS fields in flow action Adrien Mazarguil
2018-04-05 8:15 ` Nélio Laranjeiro
2018-04-04 14:58 ` [dpdk-stable] [PATCH v2 10/13] ethdev: fix shallow copy of flow API RSS action Adrien Mazarguil
2018-04-04 14:58 ` [dpdk-stable] [PATCH v2 11/13] ethdev: fix missing boolean values in flow command Adrien Mazarguil
2018-04-05 8:17 ` Nélio Laranjeiro
2018-04-04 14:58 ` [dpdk-stable] [PATCH v2 13/13] ethdev: fix missing include in flow API Adrien Mazarguil
2018-04-05 8:18 ` Nélio Laranjeiro
[not found] ` <20180406131243.19037-1-adrien.mazarguil@6wind.com>
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 01/11] net/mlx4: fix RSS resource leak in case of error Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 02/11] net/mlx4: fix ignored RSS hash types Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 03/11] net/mlx5: fix RSS flow action bounds check Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 04/11] net/bnxt: fix matching of flow API item masks Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 05/11] app/testpmd: fix flow completion for RSS queues Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 06/11] app/testpmd: fix lack of flow action configuration Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 07/11] app/testpmd: fix RSS " Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 08/11] app/testpmd: fix missing RSS fields in flow action Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 09/11] ethdev: fix shallow copy of flow API RSS action Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 10/11] ethdev: fix missing boolean values in flow command Adrien Mazarguil
2018-04-06 13:22 ` [dpdk-stable] [PATCH v3 11/11] ethdev: fix missing include in flow API Adrien Mazarguil
[not found] ` <20180410161132.8776-1-adrien.mazarguil@6wind.com>
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 01/11] net/mlx4: fix RSS resource leak in case of error Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 02/11] net/mlx4: fix ignored RSS hash types Adrien Mazarguil
2018-04-10 16:34 ` Adrien Mazarguil [this message]
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 04/11] net/bnxt: fix matching of flow API item masks Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 05/11] app/testpmd: fix flow completion for RSS queues Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 06/11] app/testpmd: fix lack of flow action configuration Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 07/11] app/testpmd: fix RSS " Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 08/11] app/testpmd: fix missing RSS fields in flow action Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 09/11] ethdev: fix shallow copy of flow API RSS action Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 10/11] ethdev: fix missing boolean values in flow command Adrien Mazarguil
2018-04-10 16:34 ` [dpdk-stable] [PATCH v4 11/11] ethdev: fix missing include in flow API Adrien Mazarguil
[not found] ` <20180416150058.2620-1-adrien.mazarguil@6wind.com>
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 01/11] net/mlx4: fix RSS resource leak in case of error Adrien Mazarguil
2018-04-17 9:19 ` [dpdk-stable] [dpdk-dev] " Nélio Laranjeiro
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 02/11] net/mlx4: fix ignored RSS hash types Adrien Mazarguil
2018-04-17 9:20 ` [dpdk-stable] [dpdk-dev] " Nélio Laranjeiro
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 03/11] net/mlx5: fix RSS flow action bounds check Adrien Mazarguil
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 04/11] net/bnxt: fix matching of flow API item masks Adrien Mazarguil
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 05/11] app/testpmd: fix flow completion for RSS queues Adrien Mazarguil
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 06/11] app/testpmd: fix lack of flow action configuration Adrien Mazarguil
2018-04-16 16:21 ` [dpdk-stable] [PATCH v5 07/11] app/testpmd: fix RSS " Adrien Mazarguil
2018-04-16 16:22 ` [dpdk-stable] [PATCH v5 08/11] app/testpmd: fix missing RSS fields in flow action Adrien Mazarguil
2018-04-16 16:22 ` [dpdk-stable] [PATCH v5 09/11] ethdev: fix shallow copy of flow API RSS action Adrien Mazarguil
2018-04-17 9:18 ` Nélio Laranjeiro
2018-04-16 16:22 ` [dpdk-stable] [PATCH v5 10/11] ethdev: fix missing boolean values in flow command Adrien Mazarguil
2018-04-16 19:17 ` [dpdk-stable] [dpdk-dev] " Matan Azrad
2018-04-17 8:25 ` Adrien Mazarguil
2018-04-18 17:16 ` Ferruh Yigit
2018-04-19 10:18 ` Adrien Mazarguil
2018-04-16 16:22 ` [dpdk-stable] [PATCH v5 11/11] ethdev: fix missing include in flow API Adrien Mazarguil
[not found] ` <20180419100204.5728-1-adrien.mazarguil@6wind.com>
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 01/11] net/mlx4: fix RSS resource leak in case of error Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 02/11] net/mlx4: fix ignored RSS hash types Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 03/11] net/mlx5: fix RSS flow action bounds check Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 04/11] net/bnxt: fix matching of flow API item masks Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 05/11] app/testpmd: fix flow completion for RSS queues Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 06/11] app/testpmd: fix lack of flow action configuration Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 07/11] app/testpmd: fix RSS " Adrien Mazarguil
2018-05-07 5:23 ` [dpdk-stable] [dpdk-dev] " Peng, Yuan
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 08/11] app/testpmd: fix missing RSS fields in flow action Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 09/11] app/testpmd: fix missing boolean values in flow command Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 10/11] ethdev: fix shallow copy of flow API RSS action Adrien Mazarguil
2018-04-19 10:07 ` [dpdk-stable] [PATCH v6 11/11] ethdev: fix missing include in flow API Adrien Mazarguil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180410161132.8776-4-adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).