[v4,1/5] ethdev: add a field for rxq info structure

Message ID 1599296854-56620-2-git-send-email-tangchengchang@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add Rx buffer size for rxq info structure |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chengchang Tang Sept. 5, 2020, 9:07 a.m. UTC
  Add a field named rx_buf_size in rte_eth_rxq_info to indicate the buffer
size used in receiving packets for HW.

In this way, upper-layer users can get this information by calling
rte_eth_rx_queue_info_get.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.h | 2 ++
 1 file changed, 2 insertions(+)

--
2.7.4
  

Comments

Stephen Hemminger Sept. 5, 2020, 4:50 p.m. UTC | #1
On Sat, 5 Sep 2020 17:07:30 +0800
Chengchang Tang <tangchengchang@huawei.com> wrote:

> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 70295d7..859111a 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -1420,6 +1420,8 @@ struct rte_eth_rxq_info {
>  	struct rte_eth_rxconf conf; /**< queue config parameters. */
>  	uint8_t scattered_rx;       /**< scattered packets RX supported. */
>  	uint16_t nb_desc;           /**< configured number of RXDs. */
> +	/**< Buffer size used for HW when receive packets. */
> +	uint16_t rx_buf_size;

Minor suggestion.
If you shorten the comment (which is not that useful) and use the same
case, then it will fit on the same line and look like the rest of the code.

	uint16_t rx_buf_size;      /**< hardware receive buffer size */
  

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 70295d7..859111a 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1420,6 +1420,8 @@  struct rte_eth_rxq_info {
 	struct rte_eth_rxconf conf; /**< queue config parameters. */
 	uint8_t scattered_rx;       /**< scattered packets RX supported. */
 	uint16_t nb_desc;           /**< configured number of RXDs. */
+	/**< Buffer size used for HW when receive packets. */
+	uint16_t rx_buf_size;
 } __rte_cache_min_aligned;

 /**