net/ionic: fix false positive forward-null in Tx
If tx_pkts is NULL, nb_pkts must be 0. Coverity doesn't know
this so it thinks this is a forward-NULL violation.
Make things more clear by checking for nb_pkts instead.
Coverity issue: 381614
Coverity issue: 381619
Fixes: e86a6fcc7c
("net/ionic: add optimized non-scattered Rx/Tx")
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
This commit is contained in:
parent
4b53e9802b
commit
3c02593c9e
@ -175,7 +175,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
|
||||
rte_prefetch0(&desc_base[q->head_idx]);
|
||||
rte_prefetch0(IONIC_INFO_PTR(q, q->head_idx));
|
||||
|
||||
if (tx_pkts) {
|
||||
if (nb_pkts) {
|
||||
rte_mbuf_prefetch_part1(tx_pkts[0]);
|
||||
rte_mbuf_prefetch_part2(tx_pkts[0]);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
|
||||
rte_prefetch0(&desc_base[q->head_idx]);
|
||||
rte_prefetch0(&q->info[q->head_idx]);
|
||||
|
||||
if (tx_pkts) {
|
||||
if (nb_pkts) {
|
||||
rte_mbuf_prefetch_part1(tx_pkts[0]);
|
||||
rte_mbuf_prefetch_part2(tx_pkts[0]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user