git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/hns3: fix possible mismatched response of mailbox
[dpdk.git]
/
drivers
/
net
/
hns3
/
hns3_tm.c
diff --git
a/drivers/net/hns3/hns3_tm.c
b/drivers/net/hns3/hns3_tm.c
index
d1639d4
..
165d1fb
100644
(file)
--- a/
drivers/net/hns3/hns3_tm.c
+++ b/
drivers/net/hns3/hns3_tm.c
@@
-1,5
+1,5
@@
/* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020-202
0 His
ilicon Limited.
+ * Copyright(c) 2020-202
1 HiS
ilicon Limited.
*/
#include <rte_malloc.h>
*/
#include <rte_malloc.h>
@@
-200,6
+200,12
@@
hns3_tm_shaper_profile_param_check(struct rte_eth_dev *dev,
return -EINVAL;
}
return -EINVAL;
}
+ if (profile->peak.rate < hns3_tm_rate_convert_firmware2tm(1)) {
+ error->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_RATE;
+ error->message = "peak rate must be at least 1Mbps";
+ return -EINVAL;
+ }
+
if (profile->peak.size) {
error->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_SIZE;
error->message = "peak bucket size not supported";
if (profile->peak.size) {
error->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_SIZE;
error->message = "peak bucket size not supported";