DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix bitmap of link speeds when force speed
@ 2021-04-08 10:22 Min Hu (Connor)
  2021-04-13 17:08 ` Ferruh Yigit
  2021-04-14  3:02 ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
  0 siblings, 2 replies; 5+ messages in thread
From: Min Hu (Connor) @ 2021-04-08 10:22 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, xiaoyun.li

From: Huisong Li <lihuisong@huawei.com>

Currently, when the user sets force link speed through 'link_speeds',
bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED),
which conflicts with the definition.

Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 app/test-pmd/cmdline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f44116b..8c36de2 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1523,6 +1523,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 			printf("Unknown speed parameter\n");
 			return -1;
 		}
+
+		if (*speed != ETH_LINK_SPEED_AUTONEG)
+			*speed |= ETH_LINK_SPEED_FIXED;
 	}
 
 	return 0;
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix bitmap of link speeds when force speed
  2021-04-08 10:22 [dpdk-dev] [PATCH] app/testpmd: fix bitmap of link speeds when force speed Min Hu (Connor)
@ 2021-04-13 17:08 ` Ferruh Yigit
  2021-04-13 17:10   ` Ajit Khaparde
  2021-04-14  3:02 ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
  1 sibling, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2021-04-13 17:08 UTC (permalink / raw)
  To: Min Hu (Connor), dev
  Cc: xiaoyun.li, Andrew Rybchenko, Qi Zhang, Ajit Khaparde

On 4/8/2021 11:22 AM, Min Hu (Connor) wrote:
> From: Huisong Li <lihuisong@huawei.com>
> 
> Currently, when the user sets force link speed through 'link_speeds',
> bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED),
> which conflicts with the definition.
> 
> Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
>   app/test-pmd/cmdline.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index f44116b..8c36de2 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -1523,6 +1523,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
>   			printf("Unknown speed parameter\n");
>   			return -1;
>   		}
> +
> +		if (*speed != ETH_LINK_SPEED_AUTONEG)
> +			*speed |= ETH_LINK_SPEED_FIXED;
>   	}
>   
>   	return 0;
> 

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

This has a history, same patch has been done in the past by Andrew [1], later 
reverted [2] (by me) since some PMDs failed and we were close to release.

In recent discussion [3] already agreed to get the patch again before -rc1, and 
this time there will be time to fix failing PMDs.
Thanks for making the patch.


[1] Commit bdca79053b6a ("app/testpmd: set fixed flag for exact link speed")

[2] Commit f53cc91f412a ("app/testpmd: revert fixed flag for exact link speed")

[3] http://inbox.dpdk.org/dev/43d67012-7f6f-2de8-e5ee-50cbe025d3eb@intel.com/#t

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix bitmap of link speeds when force speed
  2021-04-13 17:08 ` Ferruh Yigit
@ 2021-04-13 17:10   ` Ajit Khaparde
  0 siblings, 0 replies; 5+ messages in thread
From: Ajit Khaparde @ 2021-04-13 17:10 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Min Hu (Connor), dpdk-dev, Xiaoyun Li, Andrew Rybchenko, Qi Zhang

[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]

On Tue, Apr 13, 2021 at 10:08 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 4/8/2021 11:22 AM, Min Hu (Connor) wrote:
> > From: Huisong Li <lihuisong@huawei.com>
> >
> > Currently, when the user sets force link speed through 'link_speeds',
> > bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED),
> > which conflicts with the definition.
> >
> > Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Huisong Li <lihuisong@huawei.com>
> > Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> > ---
> >   app/test-pmd/cmdline.c | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> > index f44116b..8c36de2 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -1523,6 +1523,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
> >                       printf("Unknown speed parameter\n");
> >                       return -1;
> >               }
> > +
> > +             if (*speed != ETH_LINK_SPEED_AUTONEG)
> > +                     *speed |= ETH_LINK_SPEED_FIXED;
> >       }
> >
> >       return 0;
> >
>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

>
> This has a history, same patch has been done in the past by Andrew [1], later
> reverted [2] (by me) since some PMDs failed and we were close to release.
>
> In recent discussion [3] already agreed to get the patch again before -rc1, and
> this time there will be time to fix failing PMDs.
> Thanks for making the patch.
+1

>
>
> [1] Commit bdca79053b6a ("app/testpmd: set fixed flag for exact link speed")
>
> [2] Commit f53cc91f412a ("app/testpmd: revert fixed flag for exact link speed")
>
> [3] http://inbox.dpdk.org/dev/43d67012-7f6f-2de8-e5ee-50cbe025d3eb@intel.com/#t

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

* [dpdk-dev] [PATCH v2] app/testpmd: fix bitmap of link speeds when force speed
  2021-04-08 10:22 [dpdk-dev] [PATCH] app/testpmd: fix bitmap of link speeds when force speed Min Hu (Connor)
  2021-04-13 17:08 ` Ferruh Yigit
@ 2021-04-14  3:02 ` Min Hu (Connor)
  2021-04-14 11:55   ` Ferruh Yigit
  1 sibling, 1 reply; 5+ messages in thread
From: Min Hu (Connor) @ 2021-04-14  3:02 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, xiaoyun.li

From: Huisong Li <lihuisong@huawei.com>

Currently, when the user sets force link speed through 'link_speeds',
bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED),
which conflicts with the definition.

Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
v2:
* When users set 10M and 100M speed, fixed bit is still set.
  v2 fix the bug.
---
 app/test-pmd/cmdline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 56cf0bf..4eff5fd 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1525,6 +1525,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 		}
 	}
 
+	if (*speed != ETH_LINK_SPEED_AUTONEG)
+		*speed |= ETH_LINK_SPEED_FIXED;
+
 	return 0;
 }
 
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix bitmap of link speeds when force speed
  2021-04-14  3:02 ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
@ 2021-04-14 11:55   ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2021-04-14 11:55 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: xiaoyun.li

On 4/14/2021 4:02 AM, Min Hu (Connor) wrote:
> From: Huisong Li <lihuisong@huawei.com>
> 
> Currently, when the user sets force link speed through 'link_speeds',
> bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED),
> which conflicts with the definition.
> 
> Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
> v2:
> * When users set 10M and 100M speed, fixed bit is still set.
>    v2 fix the bug.

Moving acks from previous version
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2021-04-14 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 10:22 [dpdk-dev] [PATCH] app/testpmd: fix bitmap of link speeds when force speed Min Hu (Connor)
2021-04-13 17:08 ` Ferruh Yigit
2021-04-13 17:10   ` Ajit Khaparde
2021-04-14  3:02 ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
2021-04-14 11:55   ` 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).