DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: fix deadloop when update RSS RETA
@ 2020-08-02 12:27 1913909813
  2020-08-03  2:23 ` Wei Hu (Xavier)
  0 siblings, 1 reply; 3+ messages in thread
From: 1913909813 @ 2020-08-02 12:27 UTC (permalink / raw)
  To: dev; +Cc: hezhiguang3

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>
---
 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;
-- 
1.8.3.1



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

* Re: [dpdk-dev] [PATCH] net/bonding: fix deadloop when update RSS RETA
  2020-08-02 12:27 [dpdk-dev] [PATCH] net/bonding: fix deadloop when update RSS RETA 1913909813
@ 2020-08-03  2:23 ` Wei Hu (Xavier)
  2020-08-05 15:49   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Hu (Xavier) @ 2020-08-03  2:23 UTC (permalink / raw)
  To: 1913909813; +Cc: dev, hezhiguang3, Wei Hu (Xavier), linuxarm

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;


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

* Re: [dpdk-dev] [PATCH] net/bonding: fix deadloop when update RSS RETA
  2020-08-03  2:23 ` Wei Hu (Xavier)
@ 2020-08-05 15:49   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-08-05 15:49 UTC (permalink / raw)
  To: 1913909813, hezhiguang3, 191390813; +Cc: dev, Wei Hu (Xavier), linuxarm

03/08/2020 04:23, Wei Hu (Xavier):
> 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>

This email is different of the one in From line:
	1913909813@qq.com
	191390813@qq.com
I will assume your correct email is a third one, Cc'ed:
	hezhiguang3@huawei.com


> Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> 
> Thank you for fixing this issue.

Applied with Huawei identity.



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

end of thread, other threads:[~2020-08-05 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 12:27 [dpdk-dev] [PATCH] net/bonding: fix deadloop when update RSS RETA 1913909813
2020-08-03  2:23 ` Wei Hu (Xavier)
2020-08-05 15:49   ` Thomas Monjalon

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