net/ionic: fix sign extension in queue allocation

(uint16_t * uint16_t) promoted to uint64_t has a sign extension
problem reported by Coverity. Cast one arg to uint64_t first
to eliminate the sign extension.

Coverity issue: 381617
Coverity issue: 381618
Fixes: 7b20fc2f3c ("net/ionic: overhaul Rx for performance")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
This commit is contained in:
Andrew Boyer 2022-11-03 06:49:08 -07:00 committed by Andrew Rybchenko
parent 0cfde775a6
commit 4b53e9802b

View File

@ -610,8 +610,8 @@ ionic_qcq_alloc(struct ionic_lif *lif,
/* Most queue types will store 1 ptr per descriptor */
new->q.info = rte_calloc_socket("ionic",
num_descs * num_segs, sizeof(void *),
page_size, socket_id);
(uint64_t)num_descs * num_segs,
sizeof(void *), page_size, socket_id);
if (!new->q.info) {
IONIC_PRINT(ERR, "Cannot allocate queue info");
err = -ENOMEM;