net/hns3: constrain TM peak rate
authorChengwen Feng <fengchengwen@huawei.com>
Wed, 3 Feb 2021 12:23:50 +0000 (20:23 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 4 Feb 2021 17:19:37 +0000 (18:19 +0100)
commit3e5c397ce40c5468f14d0e61bae20b9ebc79a8ae
treebd1cbb911acf29920d0a2c6bc7d2d743e9c04828
parent0fce2c46dc16294dd193dd5bb84506e4570566b1
net/hns3: constrain TM peak rate

User could config Port or TC's peak rate by TM ops, but hardware does
not support peak rate which lower than 1Mbps. So we constraint TM
peak rate must be at least 1Mbps.

Fixes: c09c7847d892 ("net/hns3: support traffic management")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
drivers/net/hns3/hns3_tm.c