[dpdk-dev] [PATCH 1/6] ethdev: add descriptor status API

Olivier Matz olivier.matz at 6wind.com
Thu Mar 2 16:14:06 CET 2017


On Thu, 2 Mar 2017 18:05:52 +0300, Andrew Rybchenko <arybchenko at solarflare.com> wrote:
> On 03/02/2017 05:54 PM, Olivier Matz wrote:
> >>>>> + *
> >>>>> + * @param port_id
> >>>>> + *  The port identifier of the Ethernet device.
> >>>>> + * @param queue_id
> >>>>> + *  The Rx queue identifier on this port.
> >>>>> + * @param offset
> >>>>> + *  The offset of the descriptor starting from tail (0 is the next
> >>>>> + *  packet to be received by the driver).
> >>>>> + * @return
> >>>>> + *  - (RTE_ETH_DESC_AVAIL): Descriptor is available for the hardware to
> >>>>> + *    receive a packet.
> >>>>> + *  - (RTE_ETH_DESC_DONE): Descriptor is done, it is filled by hw, but
> >>>>> + *    not yet processed by the driver (i.e. in the receive queue).
> >>>>> + *  - (RTE_ETH_DESC_USED): Descriptor is unavailable (hold by driver,
> >>>>> + *    not yet returned to hw).  
> >>>> It looks like it is the most suitable for descriptors which are reserved
> >>>> and never used.  
> >>> Can you give some more details about what is a reserved but never
> >>> used descriptor? (same question for Tx)  
> >> Our HW has a requirement to keep few descriptors always unused (i.e.
> >> some gap between tail and head). It is just a few descriptors, but
> >> invalid descriptor status may misguide application. E.g. if Rx queue
> >> size is 512 and offset 510, it will always be unused (since it is
> >> reserved). It is not an indication that core is too slow and can't keep
> >> the pace.  
> > Understood.
> >
> > I can change _USED into _UNAVAIL (add it for Tx), with the following
> > description:
> >
> > - (RTE_ETH_DESC_UNAVAIL): Descriptor is unavailable: either hold by driver
> >    and not yet returned to hw, or reserved by the hardware.  
> 
> Looks good. Do I understand correctly that it will be reported for 
> descriptors which are not refilled (posted to HW) because of rx_free_thresh?
> 

Yes


More information about the dev mailing list