patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] app/test: fix LACP handshake overtime
@ 2022-08-18  5:43 Ke Zhang
  2022-09-23  0:58 ` humin (Q)
  2024-04-17 10:25 ` Ferruh Yigit
  0 siblings, 2 replies; 5+ messages in thread
From: Ke Zhang @ 2022-08-18  5:43 UTC (permalink / raw)
  To: chas3, humin29, dev; +Cc: Ke Zhang, stable

Increase the loop count so that there is a longer
threshold time for the LACP handshake process.

Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
Cc: stable@dpdk.org

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
---
 app/test/test_link_bonding_mode4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index d9b9c323c7..bfdd18cdd1 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -613,7 +613,7 @@ bond_handshake(void)
 
 	/* Exchange LACP frames */
 	all_slaves_done = 0;
-	for (i = 0; i < 30 && all_slaves_done == 0; ++i) {
+	for (i = 0; i < 60 && all_slaves_done == 0; ++i) {
 		rte_delay_ms(delay);
 
 		all_slaves_done = 1;
-- 
2.25.1


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

* Re: [PATCH] app/test: fix LACP handshake overtime
  2022-08-18  5:43 [PATCH] app/test: fix LACP handshake overtime Ke Zhang
@ 2022-09-23  0:58 ` humin (Q)
  2022-09-30  1:27   ` Zhang, Ke1X
  2024-04-17 10:25 ` Ferruh Yigit
  1 sibling, 1 reply; 5+ messages in thread
From: humin (Q) @ 2022-09-23  0:58 UTC (permalink / raw)
  To: Ke Zhang, chas3, dev; +Cc: stable

Hi, Zhang,

     Why LACP handshake "overtime" in your test?

     Maybe in other occasions, 60 * delay is also not enough.

     BTW, how about config "conf.update_timeout_ms" for the test?

在 2022/8/18 13:43, Ke Zhang 写道:
> Increase the loop count so that there is a longer
> threshold time for the LACP handshake process.
>
> Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
> ---
>   app/test/test_link_bonding_mode4.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
> index d9b9c323c7..bfdd18cdd1 100644
> --- a/app/test/test_link_bonding_mode4.c
> +++ b/app/test/test_link_bonding_mode4.c
> @@ -613,7 +613,7 @@ bond_handshake(void)
>   
>   	/* Exchange LACP frames */
>   	all_slaves_done = 0;
> -	for (i = 0; i < 30 && all_slaves_done == 0; ++i) {
> +	for (i = 0; i < 60 && all_slaves_done == 0; ++i) {
>   		rte_delay_ms(delay);
>   
>   		all_slaves_done = 1;

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

* RE: [PATCH] app/test: fix LACP handshake overtime
  2022-09-23  0:58 ` humin (Q)
@ 2022-09-30  1:27   ` Zhang, Ke1X
  2022-10-21  7:33     ` Zhang, Ke1X
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang, Ke1X @ 2022-09-30  1:27 UTC (permalink / raw)
  To: humin (Q), chas3, dev; +Cc: stable

Hi humin:

Thanks for your comments, I test the case, I try to change

for (i = 0; i < 30 && all_slaves_done == 0; ++i)
to
for (i = 0; i < 32 && all_slaves_done == 0; ++i)

it works good, so I think 60 is enough.

And the "conf.update_timeout_ms" seems to be used as a base unit to compute in many places as below:

Test_link_bonding_mode4.c (app\test):	return conf.update_timeout_ms;
Test_link_bonding_mode4.c (app\test):	old_delay = conf.update_timeout_ms;
Test_link_bonding_mode4.c (app\test):	conf.update_timeout_ms = 10;
Test_link_bonding_mode4.c (app\test):	for (i = 0; i < old_delay/conf.update_timeout_ms * 2; i++) {
Test_link_bonding_mode4.c (app\test):		rte_delay_ms(conf.update_timeout_ms);
Test_link_bonding_mode4.c (app\test):	for (j = 0; j < conf.long_timeout_ms/conf.update_timeout_ms + 2; j++) {
Test_link_bonding_mode4.c (app\test):		rte_delay_ms(conf.update_timeout_ms);

So I didn't change the value, please confirming , many thanks.

BR
Zhangke

> -----Original Message-----
> From: humin (Q) <humin29@huawei.com>
> Sent: Friday, September 23, 2022 8:58 AM
> To: Zhang, Ke1X <ke1x.zhang@intel.com>; chas3@att.com; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: Re: [PATCH] app/test: fix LACP handshake overtime
> 
> Hi, Zhang,
> 
>      Why LACP handshake "overtime" in your test?
> 
>      Maybe in other occasions, 60 * delay is also not enough.
> 
>      BTW, how about config "conf.update_timeout_ms" for the test?
> 
> 在 2022/8/18 13:43, Ke Zhang 写道:
> > Increase the loop count so that there is a longer threshold time for
> > the LACP handshake process.
> >
> > Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
> > ---
> >   app/test/test_link_bonding_mode4.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/app/test/test_link_bonding_mode4.c
> > b/app/test/test_link_bonding_mode4.c
> > index d9b9c323c7..bfdd18cdd1 100644
> > --- a/app/test/test_link_bonding_mode4.c
> > +++ b/app/test/test_link_bonding_mode4.c
> > @@ -613,7 +613,7 @@ bond_handshake(void)
> >
> >   	/* Exchange LACP frames */
> >   	all_slaves_done = 0;
> > -	for (i = 0; i < 30 && all_slaves_done == 0; ++i) {
> > +	for (i = 0; i < 60 && all_slaves_done == 0; ++i) {
> >   		rte_delay_ms(delay);
> >
> >   		all_slaves_done = 1;

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

* RE: [PATCH] app/test: fix LACP handshake overtime
  2022-09-30  1:27   ` Zhang, Ke1X
@ 2022-10-21  7:33     ` Zhang, Ke1X
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Ke1X @ 2022-10-21  7:33 UTC (permalink / raw)
  To: humin (Q), chas3, dev; +Cc: stable

Hi humin:

Maybe in other occasions, 60 * delay is also not enough.
===================================================
Yes, maybe it is not enough for other occasions, so what value is set in you opinion?

BTW, how about config "conf.update_timeout_ms" for the test?
====================================================================================
conf.update_timeout_ms is 100 default, it is a basic unit , it is used in other place, if I changed the value, the other code logic is changed.

Thanks.

Br
Zhangke

> -----Original Message-----
> From: Zhang, Ke1X
> Sent: Friday, September 30, 2022 9:28 AM
> To: humin (Q) <humin29@huawei.com>; chas3@att.com; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH] app/test: fix LACP handshake overtime
> 
> Hi humin:
> 
> Thanks for your comments, I test the case, I try to change
> 
> for (i = 0; i < 30 && all_slaves_done == 0; ++i) to for (i = 0; i < 32 &&
> all_slaves_done == 0; ++i)
> 
> it works good, so I think 60 is enough.
> 
> And the "conf.update_timeout_ms" seems to be used as a base unit to
> compute in many places as below:
> 
> Test_link_bonding_mode4.c (app\test):	return
> conf.update_timeout_ms;
> Test_link_bonding_mode4.c (app\test):	old_delay =
> conf.update_timeout_ms;
> Test_link_bonding_mode4.c (app\test):	conf.update_timeout_ms =
> 10;
> Test_link_bonding_mode4.c (app\test):	for (i = 0; i <
> old_delay/conf.update_timeout_ms * 2; i++) {
> Test_link_bonding_mode4.c (app\test):
> 	rte_delay_ms(conf.update_timeout_ms);
> Test_link_bonding_mode4.c (app\test):	for (j = 0; j <
> conf.long_timeout_ms/conf.update_timeout_ms + 2; j++) {
> Test_link_bonding_mode4.c (app\test):
> 	rte_delay_ms(conf.update_timeout_ms);
> 
> So I didn't change the value, please confirming , many thanks.
> 
> BR
> Zhangke
> 
> > -----Original Message-----
> > From: humin (Q) <humin29@huawei.com>
> > Sent: Friday, September 23, 2022 8:58 AM
> > To: Zhang, Ke1X <ke1x.zhang@intel.com>; chas3@att.com; dev@dpdk.org
> > Cc: stable@dpdk.org
> > Subject: Re: [PATCH] app/test: fix LACP handshake overtime
> >
> > Hi, Zhang,
> >
> >      Why LACP handshake "overtime" in your test?
> >
> >      Maybe in other occasions, 60 * delay is also not enough.
> >
> >      BTW, how about config "conf.update_timeout_ms" for the test?
> >
> > 在 2022/8/18 13:43, Ke Zhang 写道:
> > > Increase the loop count so that there is a longer threshold time for
> > > the LACP handshake process.
> > >
> > > Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
> > > ---
> > >   app/test/test_link_bonding_mode4.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/app/test/test_link_bonding_mode4.c
> > > b/app/test/test_link_bonding_mode4.c
> > > index d9b9c323c7..bfdd18cdd1 100644
> > > --- a/app/test/test_link_bonding_mode4.c
> > > +++ b/app/test/test_link_bonding_mode4.c
> > > @@ -613,7 +613,7 @@ bond_handshake(void)
> > >
> > >   	/* Exchange LACP frames */
> > >   	all_slaves_done = 0;
> > > -	for (i = 0; i < 30 && all_slaves_done == 0; ++i) {
> > > +	for (i = 0; i < 60 && all_slaves_done == 0; ++i) {
> > >   		rte_delay_ms(delay);
> > >
> > >   		all_slaves_done = 1;

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

* Re: [PATCH] app/test: fix LACP handshake overtime
  2022-08-18  5:43 [PATCH] app/test: fix LACP handshake overtime Ke Zhang
  2022-09-23  0:58 ` humin (Q)
@ 2024-04-17 10:25 ` Ferruh Yigit
  1 sibling, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2024-04-17 10:25 UTC (permalink / raw)
  To: Ke Zhang, chas3, humin29, dev; +Cc: stable

On 8/18/2022 6:43 AM, Ke Zhang wrote:
> Increase the loop count so that there is a longer
> threshold time for the LACP handshake process.
> 
> Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
>

Patch seems to fix unit test where LACP times out, but I can't reproduce
the failure, keeping old timeout value.

If this still needs to change, please send a new version describing why
change is required.

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

end of thread, other threads:[~2024-04-17 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  5:43 [PATCH] app/test: fix LACP handshake overtime Ke Zhang
2022-09-23  0:58 ` humin (Q)
2022-09-30  1:27   ` Zhang, Ke1X
2022-10-21  7:33     ` Zhang, Ke1X
2024-04-17 10:25 ` Ferruh Yigit

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