net/softnic: fix integer overflow
Fixed integer overflow by casting hard_rate to uint64_t type.
Coverity issue: 195020
Fixes: 8316b9816b
("net/softnic: support traffic management")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
da101321e7
commit
762be1b25b
@ -47,7 +47,7 @@
|
||||
int
|
||||
tm_params_check(struct pmd_params *params, uint32_t hard_rate)
|
||||
{
|
||||
uint64_t hard_rate_bytes_per_sec = hard_rate * BYTES_IN_MBPS;
|
||||
uint64_t hard_rate_bytes_per_sec = (uint64_t)hard_rate * BYTES_IN_MBPS;
|
||||
uint32_t i;
|
||||
|
||||
/* rate */
|
||||
|
Loading…
Reference in New Issue
Block a user