Skip to content

Commit

Permalink
app/testpmd: fix bitmap of link speeds when force speed
Browse files Browse the repository at this point in the history
[ upstream commit 312312e ]

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: 88fbedc ("app/testpmd: move speed and duplex parsing in a function")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
LiHuiSong1 authored and steevenlee committed May 8, 2021
1 parent be168e4 commit 42c05be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/test-pmd/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,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;
}

Expand Down

0 comments on commit 42c05be

Please sign in to comment.