DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] remove prefix to some local macros in apps and examples
@ 2022-10-04  8:01 David Marchand
  2022-10-04 12:58 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2022-10-04  8:01 UTC (permalink / raw)
  To: dev
  Cc: Aman Singh, Yuying Zhang, Chas Williams, Min Hu (Connor),
	Akhil Goyal, Nicolas Chautru, Konstantin Ananyev, Fan Zhang,
	Sunil Kumar Kori, Pavan Nikhilesh, Bruce Richardson, Jerin Jacob,
	Kiran Kumar K, Nithin Dabilpuram, David Hunt, Maxime Coquelin,
	Chenbo Xia

RTE_TEST_[RT]X_DESC_DEFAULT and RTE_TEST_[RT]X_DESC_MAX macros have been
copied in a lot of app/ and examples/ code.
Those macros are local to each program.

They are not related to a DPDK public header/API, drop the RTE_TEST_
prefix.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/testpmd.c                        | 12 ++++++------
 app/test-pmd/testpmd.h                        |  6 +++---
 app/test/test_link_bonding.c                  |  8 ++++----
 app/test/test_pmd_perf.c                      |  8 ++++----
 app/test/test_security_inline_proto.c         |  8 ++++----
 doc/guides/sample_app_ug/link_status_intr.rst |  2 +-
 examples/bbdev_app/main.c                     |  8 ++++----
 examples/ip_fragmentation/main.c              |  8 ++++----
 examples/ip_reassembly/main.c                 |  8 ++++----
 examples/ipv4_multicast/main.c                |  8 ++++----
 examples/l2fwd-crypto/main.c                  |  8 ++++----
 examples/l2fwd-event/l2fwd_common.c           |  4 ++--
 examples/l2fwd-event/l2fwd_common.h           |  4 ++--
 examples/l2fwd-event/main.c                   |  4 ++--
 examples/l2fwd-jobstats/main.c                |  8 ++++----
 examples/l2fwd-keepalive/main.c               |  8 ++++----
 examples/l2fwd/main.c                         |  8 ++++----
 examples/l3fwd-graph/main.c                   |  8 ++++----
 examples/l3fwd-power/main.c                   |  8 ++++----
 examples/l3fwd/l3fwd.h                        |  4 ++--
 examples/l3fwd/main.c                         |  6 +++---
 examples/link_status_interrupt/main.c         |  8 ++++----
 examples/vhost/main.c                         | 10 +++++-----
 examples/vmdq/main.c                          | 16 ++++++++--------
 examples/vmdq_dcb/main.c                      | 14 +++++++-------
 25 files changed, 97 insertions(+), 97 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index de6ad00138..39ee3d331d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -288,10 +288,10 @@ queueid_t nb_txq = 1; /**< Number of TX queues per port. */
  * Configurable number of RX/TX ring descriptors.
  * Defaults are supplied by drivers via ethdev.
  */
-#define RTE_TEST_RX_DESC_DEFAULT 0
-#define RTE_TEST_TX_DESC_DEFAULT 0
-uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; /**< Number of RX descriptors. */
-uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; /**< Number of TX descriptors. */
+#define RX_DESC_DEFAULT 0
+#define TX_DESC_DEFAULT 0
+uint16_t nb_rxd = RX_DESC_DEFAULT; /**< Number of RX descriptors. */
+uint16_t nb_txd = TX_DESC_DEFAULT; /**< Number of TX descriptors. */
 
 #define RTE_PMD_PARAM_UNSET -1
 /*
@@ -1719,9 +1719,9 @@ init_config(void)
 	if (param_total_num_mbufs)
 		nb_mbuf_per_pool = param_total_num_mbufs;
 	else {
-		nb_mbuf_per_pool = RTE_TEST_RX_DESC_MAX +
+		nb_mbuf_per_pool = RX_DESC_MAX +
 			(nb_lcores * mb_mempool_cache) +
-			RTE_TEST_TX_DESC_MAX + MAX_PKT_BURST;
+			TX_DESC_MAX + MAX_PKT_BURST;
 		nb_mbuf_per_pool *= RTE_MAX_ETHPORTS;
 	}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a7b8565a6d..627a42ce3b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -28,9 +28,6 @@
 
 #define RTE_PORT_ALL            (~(portid_t)0x0)
 
-#define RTE_TEST_RX_DESC_MAX    2048
-#define RTE_TEST_TX_DESC_MAX    2048
-
 #define RTE_PORT_STOPPED        (uint16_t)0
 #define RTE_PORT_STARTED        (uint16_t)1
 #define RTE_PORT_CLOSED         (uint16_t)2
@@ -67,6 +64,9 @@ extern uint8_t cl_quit;
 /* The prefix of the mbuf pool names created by the application. */
 #define MBUF_POOL_NAME_PFX "mb_pool"
 
+#define RX_DESC_MAX    2048
+#define TX_DESC_MAX    2048
+
 #define MAX_PKT_BURST 512
 #define DEF_PKT_BURST 32
 
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 194ed5a7ec..c28c1ada46 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -47,8 +47,8 @@
 #define MBUF_CACHE_SIZE (250)
 #define BURST_SIZE (32)
 
-#define RTE_TEST_RX_DESC_MAX	(2048)
-#define RTE_TEST_TX_DESC_MAX	(2048)
+#define RX_DESC_MAX	(2048)
+#define TX_DESC_MAX	(2048)
 #define MAX_PKT_BURST			(512)
 #define DEF_PKT_BURST			(16)
 
@@ -225,8 +225,8 @@ test_setup(void)
 				"Ethernet header struct allocation failed!");
 	}
 
-	nb_mbuf_per_pool = RTE_TEST_RX_DESC_MAX + DEF_PKT_BURST +
-			RTE_TEST_TX_DESC_MAX + MAX_PKT_BURST;
+	nb_mbuf_per_pool = RX_DESC_MAX + DEF_PKT_BURST +
+			TX_DESC_MAX + MAX_PKT_BURST;
 	if (test_params->mbuf_pool == NULL) {
 		test_params->mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL",
 			nb_mbuf_per_pool, MBUF_CACHE_SIZE, 0,
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index ec3dc251d1..10dba0da88 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -18,8 +18,8 @@
 #define NB_SOCKETS                      (2)
 #define MEMPOOL_CACHE_SIZE 250
 #define MAX_PKT_BURST                   (32)
-#define RTE_TEST_RX_DESC_DEFAULT        (1024)
-#define RTE_TEST_TX_DESC_DEFAULT        (1024)
+#define RX_DESC_DEFAULT        (1024)
+#define TX_DESC_DEFAULT        (1024)
 #define RTE_PORT_ALL            (~(uint16_t)0x0)
 
 /* how long test would take at full line rate */
@@ -703,8 +703,8 @@ test_pmd_perf(void)
 	init_mbufpool(NB_MBUF);
 
 	if (sc_flag == SC_CONTINUOUS) {
-		nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-		nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+		nb_rxd = RX_DESC_DEFAULT;
+		nb_txd = TX_DESC_DEFAULT;
 	}
 	printf("CONFIG RXD=%d TXD=%d\n", nb_rxd, nb_txd);
 
diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 81cac2f0a8..b891527615 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -37,8 +37,8 @@ test_event_inline_ipsec(void)
 #define NB_ETHPORTS_USED		1
 #define MEMPOOL_CACHE_SIZE		32
 #define MAX_PKT_BURST			32
-#define RTE_TEST_RX_DESC_DEFAULT	1024
-#define RTE_TEST_TX_DESC_DEFAULT	1024
+#define RX_DESC_DEFAULT	1024
+#define TX_DESC_DEFAULT	1024
 #define RTE_PORT_ALL		(~(uint16_t)0x0)
 
 #define RX_PTHRESH 8 /**< Default values of RX prefetch threshold reg. */
@@ -1520,8 +1520,8 @@ inline_ipsec_testsuite_setup(void)
 
 	printf("Generate %d packets\n", MAX_TRAFFIC_BURST);
 
-	nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-	nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+	nb_rxd = RX_DESC_DEFAULT;
+	nb_txd = TX_DESC_DEFAULT;
 
 	/* configuring port 0 for the test is enough */
 	port_id = 0;
diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst
index c9ce3cf57e..a4c0712bd9 100644
--- a/doc/guides/sample_app_ug/link_status_intr.rst
+++ b/doc/guides/sample_app_ug/link_status_intr.rst
@@ -203,7 +203,7 @@ The global configuration for TX queues is stored in a static structure:
             .hthresh = TX_HTHRESH,
             .wthresh = TX_WTHRESH,
         },
-        .tx_free_thresh = RTE_TEST_TX_DESC_DEFAULT + 1, /* disable feature */
+        .tx_free_thresh = TX_DESC_DEFAULT + 1, /* disable feature */
     };
 
 Receive, Process and Transmit Packets
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8174..da3f6c928c 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -49,8 +49,8 @@
 #define CRC_24B_LEN 3
 
 /* Configurable number of RX/TX ring descriptors */
-#define RTE_TEST_RX_DESC_DEFAULT 128
-#define RTE_TEST_TX_DESC_DEFAULT 512
+#define RX_DESC_DEFAULT 128
+#define TX_DESC_DEFAULT 512
 
 #define BBDEV_ASSERT(a) do { \
 	if (!(a)) { \
@@ -467,7 +467,7 @@ initialize_ports(struct app_config_params *app_params,
 	/* initialize RX queues for encoder */
 	for (q = 0; q < app_params->num_enc_cores; q++) {
 		ret = rte_eth_rx_queue_setup(port_id, q,
-			RTE_TEST_RX_DESC_DEFAULT,
+			RX_DESC_DEFAULT,
 			rte_eth_dev_socket_id(port_id),
 			NULL, ethdev_mbuf_mempool);
 		if (ret < 0) {
@@ -479,7 +479,7 @@ initialize_ports(struct app_config_params *app_params,
 	/* initialize TX queues for decoder */
 	for (q = 0; q < app_params->num_dec_cores; q++) {
 		ret = rte_eth_tx_queue_setup(port_id, q,
-			RTE_TEST_TX_DESC_DEFAULT,
+			TX_DESC_DEFAULT,
 			rte_eth_dev_socket_id(port_id), NULL);
 		if (ret < 0) {
 			printf("rte_eth_tx_queue_setup: err=%d, queue=%u\n",
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 78205d2e12..f8988faddf 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -84,10 +84,10 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 3ebf895aa0..e3a662df7a 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -87,11 +87,11 @@ static uint32_t max_flow_ttl = DEF_FLOW_TTL;
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index bdcaa3bcd1..6b6da41038 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -76,10 +76,10 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr ports_eth_addr[MAX_PORTS];
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index bf4b862379..ae02368fad 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -72,11 +72,11 @@ enum cdev_type {
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
index 03983b3bd7..a535217b30 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -7,8 +7,8 @@
 int
 l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
 {
-	uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-	uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+	uint16_t nb_rxd = RX_DESC_DEFAULT;
+	uint16_t nb_txd = TX_DESC_DEFAULT;
 	struct rte_eth_conf port_conf = {
 		.rxmode = {
 			.split_hdr_size = 0,
diff --git a/examples/l2fwd-event/l2fwd_common.h b/examples/l2fwd-event/l2fwd_common.h
index bff3b65abf..07f84cbac1 100644
--- a/examples/l2fwd-event/l2fwd_common.h
+++ b/examples/l2fwd-event/l2fwd_common.h
@@ -46,8 +46,8 @@
 #define MAX_RX_QUEUE_PER_LCORE 16
 #define MAX_TX_QUEUE_PER_PORT 16
 
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
 #define MEMPOOL_CACHE_SIZE 256
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 44303d10c2..7600b9e9cf 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -660,8 +660,8 @@ main(int argc, char **argv)
 			rte_panic("Invalid port pair config\n");
 	}
 
-	nb_mbufs = RTE_MAX(nb_ports * (RTE_TEST_RX_DESC_DEFAULT +
-				       RTE_TEST_TX_DESC_DEFAULT +
+	nb_mbufs = RTE_MAX(nb_ports * (RX_DESC_DEFAULT +
+				       TX_DESC_DEFAULT +
 				       MAX_PKT_BURST + rte_lcore_count() *
 				       MEMPOOL_CACHE_SIZE), 8192U);
 
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 9e71ba2d4e..aa64360ac4 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -45,10 +45,10 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index bd0aa7ea7a..ab3e378b08 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -51,10 +51,10 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 281c6b7a3f..6b8a4b95a7 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -55,10 +55,10 @@ static int promiscuous_on;
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 7f00c65609..412382e06c 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -43,8 +43,8 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
 #define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
 #define MAX_RX_QUEUE_PER_PORT 128
@@ -56,8 +56,8 @@
 #define NB_SOCKETS 8
 
 /* Static global variables used within this file. */
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /**< Ports set in promiscuous mode off by default. */
 static int promiscuous_on;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 887c6eae3f..ec7b55416a 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -121,8 +121,8 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
 /*
  * These two thresholds were decided on by running the training algorithm on
@@ -134,8 +134,8 @@
 
 #define NUM_TELSTATS RTE_DIM(telstats_strings)
 
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index 40b5f32a9e..e7ad6d1dbd 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -20,8 +20,8 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
 #define MAX_PKT_BURST     32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index e090328fcc..406a9ba81a 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -53,8 +53,8 @@
 
 #define MAX_LCORE_PARAMS 1024
 
-uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+uint16_t nb_rxd = RX_DESC_DEFAULT;
+uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /**< Ports set in promiscuous mode off by default. */
 static int promiscuous_on;
@@ -445,7 +445,7 @@ print_usage(const char *prgname)
 		"                    another is route entry at while line leads with character '%c'.\n"
 		"  --rule_ipv6=FILE: Specify the ipv6 rules entries file.\n"
 		"  --alg: ACL classify method to use, one of: %s.\n\n",
-		prgname, RTE_TEST_RX_DESC_DEFAULT, RTE_TEST_TX_DESC_DEFAULT,
+		prgname, RX_DESC_DEFAULT, TX_DESC_DEFAULT,
 		ACL_LEAD_CHAR, ROUTE_LEAD_CHAR, alg);
 }
 
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9699e14ce6..4736a47997 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -45,10 +45,10 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
+static uint16_t nb_rxd = RX_DESC_DEFAULT;
+static uint16_t nb_txd = TX_DESC_DEFAULT;
 
 /* ethernet addresses of ports */
 static struct rte_ether_addr lsi_ports_eth_addr[RTE_MAX_ETHPORTS];
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 195ef84b3b..82c1c19d7b 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -57,8 +57,8 @@
 #define DEVICE_SAFE_REMOVE	2
 
 /* Configurable number of RX/TX ring descriptors */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 512
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 512
 
 #define INVALID_PORT_ID 0xFF
 #define INVALID_DMA_ID -1
@@ -445,8 +445,8 @@ port_init(uint16_t port)
 	/*configure the number of supported virtio devices based on VMDQ limits */
 	num_devices = dev_info.max_vmdq_pools;
 
-	rx_ring_size = RTE_TEST_RX_DESC_DEFAULT;
-	tx_ring_size = RTE_TEST_TX_DESC_DEFAULT;
+	rx_ring_size = RX_DESC_DEFAULT;
+	tx_ring_size = TX_DESC_DEFAULT;
 
 	tx_rings = (uint16_t)rte_lcore_count();
 
@@ -493,7 +493,7 @@ port_init(uint16_t port)
 			"for port %u: %s.\n", port, strerror(-retval));
 		return retval;
 	}
-	if (rx_ring_size > RTE_TEST_RX_DESC_DEFAULT) {
+	if (rx_ring_size > RX_DESC_DEFAULT) {
 		RTE_LOG(ERR, VHOST_PORT, "Mbuf pool has an insufficient size "
 			"for Rx queues on port %u.\n", port);
 		return -1;
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 10410b8783..6c78964c8c 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -38,8 +38,8 @@
  * 1024 queues require to meet the needs of a large number of vmdq_pools.
  * (RX/TX_queue_nb * RX/TX_ring_descriptors_nb) per port.
  */
-#define NUM_MBUFS_PER_PORT (MAX_QUEUES * RTE_MAX(RTE_TEST_RX_DESC_DEFAULT, \
-						RTE_TEST_TX_DESC_DEFAULT))
+#define NUM_MBUFS_PER_PORT (MAX_QUEUES * RTE_MAX(RX_DESC_DEFAULT, \
+						TX_DESC_DEFAULT))
 #define MBUF_CACHE_SIZE 64
 
 #define MAX_PKT_BURST 32
@@ -47,8 +47,8 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
 #define INVALID_PORT_ID 0xFF
 
@@ -177,8 +177,8 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 	struct rte_eth_txconf *txconf;
 	struct rte_eth_conf port_conf;
 	uint16_t rxRings, txRings;
-	uint16_t rxRingSize = RTE_TEST_RX_DESC_DEFAULT;
-	uint16_t txRingSize = RTE_TEST_TX_DESC_DEFAULT;
+	uint16_t rxRingSize = RX_DESC_DEFAULT;
+	uint16_t txRingSize = TX_DESC_DEFAULT;
 	int retval;
 	uint16_t q;
 	uint16_t queues_per_pool;
@@ -269,8 +269,8 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 				&txRingSize);
 	if (retval != 0)
 		return retval;
-	if (RTE_MAX(rxRingSize, txRingSize) > RTE_MAX(RTE_TEST_RX_DESC_DEFAULT,
-			RTE_TEST_TX_DESC_DEFAULT)) {
+	if (RTE_MAX(rxRingSize, txRingSize) > RTE_MAX(RX_DESC_DEFAULT,
+			TX_DESC_DEFAULT)) {
 		printf("Mbuf pool has an insufficient size for port %u.\n",
 			port);
 		return -1;
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index d2218f2cf7..e6efd06f8e 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -39,8 +39,8 @@
  * 1024 queues require to meet the needs of a large number of vmdq_pools.
  * (RX/TX_queue_nb * RX/TX_ring_descriptors_nb) per port.
  */
-#define NUM_MBUFS_PER_PORT (MAX_QUEUES * RTE_MAX(RTE_TEST_RX_DESC_DEFAULT, \
-						RTE_TEST_TX_DESC_DEFAULT))
+#define NUM_MBUFS_PER_PORT (MAX_QUEUES * RTE_MAX(RX_DESC_DEFAULT, \
+						TX_DESC_DEFAULT))
 #define MBUF_CACHE_SIZE 64
 
 #define MAX_PKT_BURST 32
@@ -48,8 +48,8 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 1024
-#define RTE_TEST_TX_DESC_DEFAULT 1024
+#define RX_DESC_DEFAULT 1024
+#define TX_DESC_DEFAULT 1024
 
 #define INVALID_PORT_ID 0xFF
 
@@ -191,8 +191,8 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_conf port_conf = {0};
-	uint16_t rxRingSize = RTE_TEST_RX_DESC_DEFAULT;
-	uint16_t txRingSize = RTE_TEST_TX_DESC_DEFAULT;
+	uint16_t rxRingSize = RX_DESC_DEFAULT;
+	uint16_t txRingSize = TX_DESC_DEFAULT;
 	int retval;
 	uint16_t q;
 	uint16_t queues_per_pool;
@@ -300,7 +300,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 	if (retval != 0)
 		return retval;
 	if (RTE_MAX(rxRingSize, txRingSize) >
-	    RTE_MAX(RTE_TEST_RX_DESC_DEFAULT, RTE_TEST_TX_DESC_DEFAULT)) {
+	    RTE_MAX(RX_DESC_DEFAULT, TX_DESC_DEFAULT)) {
 		printf("Mbuf pool has an insufficient size for port %u.\n",
 			port);
 		return -1;
-- 
2.37.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove prefix to some local macros in apps and examples
  2022-10-04  8:01 [PATCH] remove prefix to some local macros in apps and examples David Marchand
@ 2022-10-04 12:58 ` Ferruh Yigit
  2022-10-05 19:37   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2022-10-04 12:58 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: Aman Singh, Yuying Zhang, Chas Williams, Min Hu (Connor),
	Akhil Goyal, Nicolas Chautru, Konstantin Ananyev, Fan Zhang,
	Sunil Kumar Kori, Pavan Nikhilesh, Bruce Richardson, Jerin Jacob,
	Kiran Kumar K, Nithin Dabilpuram, David Hunt, Maxime Coquelin,
	Chenbo Xia

On 10/4/2022 9:01 AM, David Marchand wrote:
> RTE_TEST_[RT]X_DESC_DEFAULT and RTE_TEST_[RT]X_DESC_MAX macros have been
> copied in a lot of app/ and examples/ code.
> Those macros are local to each program.
> 
> They are not related to a DPDK public header/API, drop the RTE_TEST_
> prefix.
> 
> Signed-off-by: David Marchand<david.marchand@redhat.com>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove prefix to some local macros in apps and examples
  2022-10-04 12:58 ` Ferruh Yigit
@ 2022-10-05 19:37   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2022-10-05 19:37 UTC (permalink / raw)
  To: David Marchand
  Cc: Ferruh Yigit, dev, Aman Singh, Yuying Zhang, Chas Williams,
	Min Hu (Connor),
	Akhil Goyal, Nicolas Chautru, Konstantin Ananyev, Fan Zhang,
	Sunil Kumar Kori, Pavan Nikhilesh, Bruce Richardson, Jerin Jacob,
	Kiran Kumar K, Nithin Dabilpuram, David Hunt, Maxime Coquelin,
	Chenbo Xia

On Tue, Oct 4, 2022 at 2:58 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 10/4/2022 9:01 AM, David Marchand wrote:
> > RTE_TEST_[RT]X_DESC_DEFAULT and RTE_TEST_[RT]X_DESC_MAX macros have been
> > copied in a lot of app/ and examples/ code.
> > Those macros are local to each program.
> >
> > They are not related to a DPDK public header/API, drop the RTE_TEST_
> > prefix.
> >
> > Signed-off-by: David Marchand<david.marchand@redhat.com>
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-05 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  8:01 [PATCH] remove prefix to some local macros in apps and examples David Marchand
2022-10-04 12:58 ` Ferruh Yigit
2022-10-05 19:37   ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).