[dpdk-dev] [RFC v2 6/8] test/virtual_pmd: provide descriptor limit info

Ferruh Yigit ferruh.yigit at intel.com
Fri Jul 16 16:27:58 CEST 2021


Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 app/test/virtual_pmd.c | 4 ++++
 app/test/virtual_pmd.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index e0ea213ae231..27c8501b96a7 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -103,6 +103,10 @@ virtual_ethdev_info_get(struct rte_eth_dev *dev __rte_unused,
 
 	dev_info->min_rx_bufsize = 0;
 
+	dev_info->rx_desc_lim.nb_max = VIRTUAL_ETHDEV_MAX_DESC_NUM;
+	dev_info->rx_desc_lim.nb_min = VIRTUAL_ETHDEV_MIN_DESC_NUM;
+	dev_info->rx_desc_lim.nb_align = VIRTUAL_ETHDEV_DESC_ALIGN;
+
 	return 0;
 }
 
diff --git a/app/test/virtual_pmd.h b/app/test/virtual_pmd.h
index 374bb4148f96..7e11d23f598e 100644
--- a/app/test/virtual_pmd.h
+++ b/app/test/virtual_pmd.h
@@ -11,6 +11,10 @@ extern "C" {
 
 #include <rte_ether.h>
 
+#define VIRTUAL_ETHDEV_MAX_DESC_NUM	2048
+#define VIRTUAL_ETHDEV_MIN_DESC_NUM	32
+#define VIRTUAL_ETHDEV_DESC_ALIGN	8
+
 int
 virtual_ethdev_init(void);
 
-- 
2.31.1



More information about the dev mailing list