app/testpmd: fix bitmap of link speeds when force speed
PATCH 1/1 app/testpmd: fix bitmap of link speeds when force speed
From: Huisong Li <[email protected]>
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.
--- app/test-pmd/cmdline.c | 3 +++ 1 file changed, 3 insertions(+)
app/test-pmd/cmdline.c +3 -0
@@ -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 ;
Signature · 1 line
2.7.4
Quoted 21 lines · Min Hu (Connor)
From: Huisong Li <[email protected]>
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")Signed-off-by Huisong Li <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>--- app/test-pmd/cmdline.c | 3 +++ 1 file changed, 3 insertions(+)app/test-pmd/cmdline.c +0
-0
app/test-pmd/cmdline.c parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) · line 1531
Quoted 9 lines
app/test-pmd/cmdline.c +3
-0@@ -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 ;
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")
Ajit Khaparde
Acked-byQuoted 30 lines · Ferruh Yigit
Quoted 28 lines · Min Hu (Connor)
From: Huisong Li <[email protected]>
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")Signed-off-by Huisong Li <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>--- app/test-pmd/cmdline.c | 3 +++ 1 file changed, 3 insertions(+)app/test-pmd/cmdline.c +3
-0@@ -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 ; }
Quoted 4 lines
app/test-pmd/cmdline.c parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) · line 1531
Quoted 2 lines
app/test-pmd/cmdline.c +0
-0return 0 ;Acked-by Ferruh Yigit <[email protected]>
Quoted 7 lines
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
Quoted 7 lines
[1] Commit
bdca79053b6a("app/testpmd: set fixed flag for exact link speed")[2] Commit
f53cc91f412a("app/testpmd: revert fixed flag for exact link speed")
PATCH v2 1/1 app/testpmd: fix bitmap of link speeds when force speed
In reply to Min Hu (Connor)From: Huisong Li <[email protected]>
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.
---
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(+)
app/test-pmd/cmdline.c +3 -0
@@ -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 ; }
Signature · 1 line
2.7.4
Quoted 9 lines · Min Hu (Connor)
From: Huisong Li <[email protected]>
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")
Quoted 6 lines
Signed-off-by Huisong Li <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>---
v2:
* When users set 10M and 100M speed, fixed bit is still set. v2 fix the bug.
Moving acks from previous version
Applied to dpdk-next-net/main, thanks.