[PATCH 5/7] drivers/net: fix unused but set variables
David Marchand
david.marchand at redhat.com
Fri Nov 12 17:27:36 CET 2021
On Fri, Nov 12, 2021 at 5:18 PM Ferruh Yigit <ferruh.yigit at intel.com> wrote:
>
> On 11/12/2021 2:01 PM, Conor Walsh wrote:
> > static void
> > vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)
> > {
> > + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> > int completed = 0;
> > + #endif
> > vmxnet3_comp_ring_t *comp_ring = &txq->comp_ring;
> > struct Vmxnet3_TxCompDesc *tcd = (struct Vmxnet3_TxCompDesc *)
> > (comp_ring->base + comp_ring->next2proc);
> >
> > while (tcd->gen == comp_ring->gen) {
> > + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> > completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> > + #endif
And this vmxnet_unmap_pkt does useful work.
We should probably still call it regardless of debug logs.
> >
> > vmxnet3_comp_ring_adv_next2proc(comp_ring);
> > tcd = (struct Vmxnet3_TxCompDesc *)(comp_ring->base +
> > comp_ring->next2proc);
> > }
> >
> > + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> > PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed);
> > + #endif
> > }
>
> 'PMD_TX_LOG' doesn't require 'RTE_LIBRTE_VMXNET3_DEBUG_TX' wrap.
>
--
David Marchand
More information about the dev
mailing list