[PATCH v2 1/3] ethdev: introduce maximum Rx buffer size
lihuisong (C)
lihuisong at huawei.com
Sat Oct 28 03:23:03 CEST 2023
在 2023/10/27 15:40, Morten Brørup 写道:
>> From: Huisong Li [mailto:lihuisong at huawei.com]
>> Sent: Friday, 27 October 2023 06.15
>>
>> The "min_rx_bufsize" in struct rte_eth_dev_info stands for the minimum
>> Rx buffer size supported by hardware. Actually, some engines also have
>> the maximum Rx buffer specification, like, hns3. If mbuf data room size
>> in mempool is greater then the maximum Rx buffer size supported by HW,
>> the data size application used in each mbuf is just as much as the
>> maximum
>> Rx buffer size supported by HW instead of the whole data room size.
>>
>> So introduce maximum Rx buffer size which is not enforced just to
>> report user to avoid memory waste. In addition, fix the comment for
>> the "min_rx_bufsize" to make it be more specific.
>>
>> Signed-off-by: Huisong Li <lihuisong at huawei.com>
>> ---
> [...]
>
>> --- a/lib/ethdev/rte_ethdev.h
>> +++ b/lib/ethdev/rte_ethdev.h
>> @@ -1723,7 +1723,14 @@ struct rte_eth_dev_info {
>> uint16_t min_mtu; /**< Minimum MTU allowed */
>> uint16_t max_mtu; /**< Maximum MTU allowed */
>> const uint32_t *dev_flags; /**< Device flags */
>> - uint32_t min_rx_bufsize; /**< Minimum size of Rx buffer. */
>> + /**< Minimum Rx buffer size per descriptor supported by HW. */
>> + uint32_t min_rx_bufsize;
> The comment was moved above min_rx_bufsize, so you must use "/** " instead of "/**< ".
You are right. will fix it in next version.
>
>> + /**
>> + * Maximum Rx buffer size per descriptor supported by HW.
>> + * The value is not enforced, information only to application to
>> + * optimize mbuf size.
>> + */
>> + uint32_t max_rx_bufsize;
> The comment should mention that the value is UINT32_MAX when not specified by the driver.
Ack
>
> With those to changes,
>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
>
>
> .
More information about the dev
mailing list