git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e695b0
)
net/mvpp2: fix port speed overflow
author
Dana Vardi
<danat@marvell.com>
Sun, 11 Jul 2021 13:11:43 +0000
(16:11 +0300)
committer
Jerin Jacob
<jerinj@marvell.com>
Mon, 12 Jul 2021 07:59:52 +0000
(09:59 +0200)
ethtool_cmd_speed return uint32 and after the arithmetic
operation in mrvl_get_max_rate func the result is out of range.
Fixes:
429c394417
("net/mvpp2: support traffic manager")
Cc: stable@dpdk.org
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
drivers/net/mvpp2/mrvl_tm.c
patch
|
blob
|
history
diff --git
a/drivers/net/mvpp2/mrvl_tm.c
b/drivers/net/mvpp2/mrvl_tm.c
index
e98f576
..
7e3c46f
100644
(file)
--- a/
drivers/net/mvpp2/mrvl_tm.c
+++ b/
drivers/net/mvpp2/mrvl_tm.c
@@
-57,7
+57,7
@@
mrvl_get_max_rate(struct rte_eth_dev *dev, uint64_t *rate)
close(fd);
- *rate = ethtool_cmd_speed(&edata) * 1000 * 1000 / 8;
+ *rate =
(uint64_t)
ethtool_cmd_speed(&edata) * 1000 * 1000 / 8;
return 0;
}