net/enic: fix completion pointer calculation
authorJohn Daley <johndale@cisco.com>
Mon, 12 Apr 2021 20:50:21 +0000 (13:50 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Apr 2021 10:30:41 +0000 (12:30 +0200)
commit68b6e6e694faa7e76b3451da0d484a955dd6d103
tree18af74440d61317dfdacf5e563f5169b20b56f62
parent8076e40cde3b5230ac488aa44baa4dcf73993aca
net/enic: fix completion pointer calculation

The completion queue index could be implicitly extended past its
uint16_t size when multiplied by the size of the descriptor. While
this should not be a problem, coverity flags it. Do the extension
explicitly by casting the index to uintptr_t.

Coverity issue: 161317
Fixes: 8b428cb5a92e ("net/enic: use 64B completion queue entries if available")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
drivers/net/enic/enic_rxtx.c