From: Alejandro Lucero Date: Mon, 8 Apr 2019 09:39:56 +0000 (+0100) Subject: net/nfp: fix potential integer overflow X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3243f7c0d8e445fe7607a2dcac24bffffa830cae;p=dpdk.git net/nfp: fix potential integer overflow Coverity issue: 277204 Fixes: defb9a5dd156 ("nfp: introduce driver initialization") Cc: stable@dpdk.org Signed-off-by: Alejandro Lucero --- diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 50058e0564..d4c94d7ccd 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2855,9 +2855,9 @@ nfp_net_init(struct rte_eth_dev *eth_dev) case PCI_DEVICE_ID_NFP6000_PF_NIC: case PCI_DEVICE_ID_NFP6000_VF_NIC: start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ); - tx_bar_off = start_q * NFP_QCP_QUEUE_ADDR_SZ; + tx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ; start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ); - rx_bar_off = start_q * NFP_QCP_QUEUE_ADDR_SZ; + rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ; break; default: PMD_DRV_LOG(ERR, "nfp_net: no device ID matching");