app/testpmd: set fixed flag for exact link speed
Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.
Fixes: 88fbedcd5e
("app/testpmd: move speed and duplex parsing in a function")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
This commit is contained in:
parent
d1cd4eb2d4
commit
bdca79053b
@ -1440,17 +1440,17 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!strcmp(speedstr, "1000")) {
|
if (!strcmp(speedstr, "1000")) {
|
||||||
*speed = ETH_LINK_SPEED_1G;
|
*speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED;
|
||||||
} else if (!strcmp(speedstr, "10000")) {
|
} else if (!strcmp(speedstr, "10000")) {
|
||||||
*speed = ETH_LINK_SPEED_10G;
|
*speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED;
|
||||||
} else if (!strcmp(speedstr, "25000")) {
|
} else if (!strcmp(speedstr, "25000")) {
|
||||||
*speed = ETH_LINK_SPEED_25G;
|
*speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED;
|
||||||
} else if (!strcmp(speedstr, "40000")) {
|
} else if (!strcmp(speedstr, "40000")) {
|
||||||
*speed = ETH_LINK_SPEED_40G;
|
*speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED;
|
||||||
} else if (!strcmp(speedstr, "50000")) {
|
} else if (!strcmp(speedstr, "50000")) {
|
||||||
*speed = ETH_LINK_SPEED_50G;
|
*speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED;
|
||||||
} else if (!strcmp(speedstr, "100000")) {
|
} else if (!strcmp(speedstr, "100000")) {
|
||||||
*speed = ETH_LINK_SPEED_100G;
|
*speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED;
|
||||||
} else if (!strcmp(speedstr, "auto")) {
|
} else if (!strcmp(speedstr, "auto")) {
|
||||||
*speed = ETH_LINK_SPEED_AUTONEG;
|
*speed = ETH_LINK_SPEED_AUTONEG;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user