diff mbox series

[RFC,v2,6/8] test/virtual_pmd: provide descriptor limit info

Message ID 20210716142800.3853651-6-ferruh.yigit@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers show
Series [RFC,v2,1/8] test/virtual_pmd: clean rings on close | expand

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Ferruh Yigit July 16, 2021, 2:27 p.m. UTC
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test/virtual_pmd.c | 4 ++++
 app/test/virtual_pmd.h | 4 ++++
 2 files changed, 8 insertions(+)
diff mbox series

Patch

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);