On 4/12/2019 2:12 PM, Andrew Rybchenko wrote: > Setting exact link speed makes sense if auto-negotiation is > disabled. Fixed flag is required to disable auto-negotiation.
Hi Andrew, Fixed link speed is not supported by all PMDs and this change is breaking them to set the speed in testpmd. As long as device speed set correct, I believe the command doesn't really care about if link mode is auto-negotiation or not. I am for reverting this commit, is there any objection to revert it? > > Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a > function") > Cc: sta...@dpdk.org > > Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com> > --- > app/test-pmd/cmdline.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 2ab03c111..691d818a6 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -1440,17 +1440,17 @@ parse_and_check_speed_duplex(char *speedstr, char > *duplexstr, uint32_t *speed) > return -1; > } > if (!strcmp(speedstr, "1000")) { > - *speed = ETH_LINK_SPEED_1G; > + *speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED; > } else if (!strcmp(speedstr, "10000")) { > - *speed = ETH_LINK_SPEED_10G; > + *speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED; > } else if (!strcmp(speedstr, "25000")) { > - *speed = ETH_LINK_SPEED_25G; > + *speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED; > } else if (!strcmp(speedstr, "40000")) { > - *speed = ETH_LINK_SPEED_40G; > + *speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED; > } else if (!strcmp(speedstr, "50000")) { > - *speed = ETH_LINK_SPEED_50G; > + *speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED; > } else if (!strcmp(speedstr, "100000")) { > - *speed = ETH_LINK_SPEED_100G; > + *speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED; > } else if (!strcmp(speedstr, "auto")) { > *speed = ETH_LINK_SPEED_AUTONEG; > } else { >