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:
parent
0cfde775a6
commit
4b53e9802b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user