在 2023/10/27 15:40, Morten Brørup 写道:
From: Huisong Li [mailto:lihuis...@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 <lihuis...@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 <m...@smartsharesystems.com>
.