[PATCH 4/5] net/hns3: fix variable overflow
Jie Hai
haijie1 at huawei.com
Wed Apr 3 12:16:22 CEST 2024
From: Dengdui Huang <huangdengdui at huawei.com>
the function strtoul() returns an unsigned long, which should
be received using the variable uint64_t.
Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")
Cc: stable at dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
Signed-off-by: Jie Hai <haijie1 at huawei.com>
---
drivers/net/hns3/hns3_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 28c26b049cf9..5e6cdfdaa019 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -224,7 +224,7 @@ hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
static int
hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
{
- uint32_t val;
+ uint64_t val;
RTE_SET_USED(key);
--
2.30.0
More information about the dev
mailing list