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

Ferruh Yigit ferruh.yigit at amd.com
Fri Jan 12 15:25:39 CET 2024


On 1/12/2024 12:11 PM, David Marchand wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
> 
> 
> 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.
> 

You are right, what about put a TODO note or deprecation notice to move
it in next ABI break release?



More information about the dev mailing list