[dpdk-dev] [v1] ethdev: support Tx queue used count

David Marchand david.marchand at redhat.com
Fri Jan 12 13:11:05 CET 2024


On Fri, Jan 12, 2024 at 12:34 PM Ferruh Yigit <ferruh.yigit at amd.com> wrote:
> > diff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.h
> > index 4bfaf79c6c..d3f09f390d 100644
> > --- a/lib/ethdev/rte_ethdev_core.h
> > +++ b/lib/ethdev/rte_ethdev_core.h
> > @@ -60,6 +60,9 @@ typedef uint16_t (*eth_recycle_tx_mbufs_reuse_t)(void *txq,
> >  /** @internal Refill Rx descriptors with the recycling mbufs */
> >  typedef void (*eth_recycle_rx_descriptors_refill_t)(void *rxq, uint16_t nb);
> >
> > +/** @internal Get number of used descriptors on a transmit queue. */
> > +typedef int (*eth_tx_queue_count_t)(void *txq);
> > +
>
> Can you please move it above 'tx_descriptor_status', to keep same order
> kept in many other locations:
> rx_queue_count
> rx_descriptor_status
> tx_queue_count
> tx_descriptor_status
>
>
> >  /**
> >   * @internal
> >   * Structure used to hold opaque pointers to internal ethdev Rx/Tx
> > @@ -116,7 +119,9 @@ struct rte_eth_fp_ops {
> >       eth_tx_descriptor_status_t tx_descriptor_status;
> >       /** Copy used mbufs from Tx mbuf ring into Rx. */
> >       eth_recycle_tx_mbufs_reuse_t recycle_tx_mbufs_reuse;
> > -     uintptr_t reserved2[2];
> > +     /** Get the number of used Tx descriptors. */
> > +     eth_tx_queue_count_t tx_queue_count;
> >
>
> Similarly, can you please move it above 'tx_descriptor_status'?

Moving fields in rte_eth_fp_ops (where fast-path API ops are) breaks
the applications ABI.


-- 
David Marchand



More information about the dev mailing list