From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <1913909813@qq.com>
Cc: <dev@dpdk.org>, <hezhiguang3@huawei.com>,
"Wei Hu (Xavier)" <xavier.huwei@huawei.com>,
<linuxarm@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix deadloop when update RSS RETA
Date: Mon, 3 Aug 2020 10:23:28 +0800 [thread overview]
Message-ID: <13361623-2be8-18cf-14e2-2e5d6abce2c9@huawei.com> (raw)
In-Reply-To: <tencent_4FD49847E9C6112495FF444080E6C2D39F06@qq.com>
Hi, Zhiguang He
On 2020/8/2 20:27, 1913909813@qq.com wrote:
> From: Zhiguang He <191390813@qq.com>
>
> when parament reta_size < RTE_RETA_GROUP_SIZE,
> reta_count will be 0. Then this function will
> be deadloop
>
> Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")
> Cc: stable@dpdk.org
>
> Signed-off-by: Zhiguang He <1913909813@qq.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Thank you for fixing this issue.
Xavier
> ---
> drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 116e2f2..cdbd815 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -2935,7 +2935,8 @@ struct bwg_slave {
> return -EINVAL;
>
> /* Copy RETA table */
> - reta_count = reta_size / RTE_RETA_GROUP_SIZE;
> + reta_count = (reta_size + RTE_RETA_GROUP_SIZE - 1) /
> + RTE_RETA_GROUP_SIZE;
>
> for (i = 0; i < reta_count; i++) {
> internals->reta_conf[i].mask = reta_conf[i].mask;
next prev parent reply other threads:[~2020-08-03 2:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-02 12:27 1913909813
2020-08-03 2:23 ` Wei Hu (Xavier) [this message]
2020-08-05 15:49 ` Thomas Monjalon
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=13361623-2be8-18cf-14e2-2e5d6abce2c9@huawei.com \
--to=xavier.huwei@huawei.com \
--cc=1913909813@qq.com \
--cc=dev@dpdk.org \
--cc=hezhiguang3@huawei.com \
--cc=linuxarm@huawei.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).