From: Yongseok Koh <yskoh@mellanox.com>
To: <ferruh.yigit@intel.com>, <thomas.monjalon@6wind.com>
Cc: <dev@dpdk.org>, <adrien.mazarguil@6wind.com>,
<nelio.laranjeiro@6wind.com>, Yongseok Koh <yskoh@mellanox.com>
Subject: [dpdk-dev] [PATCH v2 1/3] lib/librte_ether: remove requirement of aligned RETA size
Date: Mon, 20 Mar 2017 16:04:33 -0700 [thread overview]
Message-ID: <7783e46e840052a9abdd4e8962eede598ab848af.1490050764.git.yskoh@mellanox.com> (raw)
In-Reply-To: <cover.1490050764.git.yskoh@mellanox.com>
In rte_eth_check_reta_mask(), it is required to align the size of the RETA
table to RTE_RETA_GROUP_SIZE but as the size can be less than the limit,
this should be removed. The change is also applied to a command of testpmd.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
app/test-pmd/cmdline.c | 4 +++-
lib/librte_ether/rte_ethdev.c | 8 +-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 47f935d20..463a77e5a 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2063,7 +2063,9 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
char s[256];
char *end;
char *str_fld[8];
- uint16_t i, num = nb_entries / RTE_RETA_GROUP_SIZE;
+ uint16_t i;
+ uint16_t num = (nb_entries + RTE_RETA_GROUP_SIZE - 1) /
+ RTE_RETA_GROUP_SIZE;
int ret;
p = strchr(p0, '(');
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index eb0a94a9a..806fff6ec 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1935,13 +1935,7 @@ rte_eth_check_reta_mask(struct rte_eth_rss_reta_entry64 *reta_conf,
if (!reta_conf)
return -EINVAL;
- if (reta_size != RTE_ALIGN(reta_size, RTE_RETA_GROUP_SIZE)) {
- RTE_PMD_DEBUG_TRACE("Invalid reta size, should be %u aligned\n",
- RTE_RETA_GROUP_SIZE);
- return -EINVAL;
- }
-
- num = reta_size / RTE_RETA_GROUP_SIZE;
+ num = (reta_size + RTE_RETA_GROUP_SIZE - 1) / RTE_RETA_GROUP_SIZE;
for (i = 0; i < num; i++) {
if (reta_conf[i].mask)
return 0;
--
2.11.0
next prev parent reply other threads:[~2017-03-20 23:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 22:40 [dpdk-dev] [PATCH 0/3] net/mlx5: fix updating RETA Yongseok Koh
2017-03-16 22:40 ` [dpdk-dev] [PATCH 1/3] lib/librte_ether: remove requirement of aligned RETA size Yongseok Koh
2017-03-17 17:19 ` Yongseok Koh
2017-03-16 22:40 ` [dpdk-dev] [PATCH 2/3] net/mlx5: use correct RETA table size Yongseok Koh
2017-03-16 22:40 ` [dpdk-dev] [PATCH 3/3] net/mlx5: rebuild flows on updating RETA Yongseok Koh
2017-03-17 9:11 ` Nélio Laranjeiro
2017-03-17 17:14 ` Yongseok Koh
2017-03-20 7:56 ` Nélio Laranjeiro
2017-03-20 23:04 ` [dpdk-dev] [PATCH v2 0/3] net/mlx5: fix " Yongseok Koh
2017-03-20 23:04 ` Yongseok Koh [this message]
2017-03-30 0:37 ` [dpdk-dev] [PATCH v2 1/3] lib/librte_ether: remove requirement of aligned RETA size Thomas Monjalon
2017-03-31 7:33 ` Zhang, Helin
2017-04-01 7:28 ` Lu, Wenzhuo
2017-04-03 10:02 ` Ferruh Yigit
2017-03-20 23:04 ` [dpdk-dev] [PATCH v2 2/3] net/mlx5: use correct RETA table size Yongseok Koh
2017-03-20 23:04 ` [dpdk-dev] [PATCH v2 3/3] net/mlx5: rebuild flows on updating RETA Yongseok Koh
2017-03-21 7:45 ` [dpdk-dev] [PATCH v2 0/3] net/mlx5: fix " Nélio Laranjeiro
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=7783e46e840052a9abdd4e8962eede598ab848af.1490050764.git.yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=nelio.laranjeiro@6wind.com \
--cc=thomas.monjalon@6wind.com \
/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).