Fixed overflow by casting txq->cmd_ring.next2fill to uint64_t type.
Coverity issue: 143457
Fixes:
01fef6e3c181 ("net/vmxnet3: allow variable length Tx data ring")
Cc: stable@dpdk.org
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
*/
gdesc = txq->cmd_ring.base + txq->cmd_ring.next2fill;
if (copy_size) {
- uint64 offset = txq->cmd_ring.next2fill *
- txq->txdata_desc_size;
+ uint64 offset =
+ (uint64)txq->cmd_ring.next2fill *
+ txq->txdata_desc_size;
gdesc->txd.addr =
rte_cpu_to_le_64(txq->data_ring.basePA +
offset);