From patchwork Tue Oct 4 08:01:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 117282 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0F5AA0543; Tue, 4 Oct 2022 10:01:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0FA040DDC; Tue, 4 Oct 2022 10:01:34 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BF08C40A87 for ; Tue, 4 Oct 2022 10:01:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664870492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t/gXXe0EWj8JHEog9moVORneBudDFzFEsdLPnUHVCu4=; b=Oc8fgkRHEGEUFXeyyVwZNwbbzezS2S4q+/4L0NicqoO+bBRwaODqavV0Nr1uCR/Hu7BMf1 NqforgOUhHFqsukMtmVX1Zqq6KlgVIyoA4GTGfze4ZEpKARf1OwNpJZS9Yfu9rTG15w72H 9bc6G/LfTouaFK6sMJdpRlBGJVg5yo0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-656-uHVHT7g0Ocmcsod8EEQNKQ-1; Tue, 04 Oct 2022 04:01:31 -0400 X-MC-Unique: uHVHT7g0Ocmcsod8EEQNKQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9973B802801; Tue, 4 Oct 2022 08:01:30 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEB7F492B04; Tue, 4 Oct 2022 08:01:25 +0000 (UTC) From: David Marchand To: dev@dpdk.org 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 Subject: [PATCH] remove prefix to some local macros in apps and examples Date: Tue, 4 Oct 2022 10:01:16 +0200 Message-Id: <20221004080116.181096-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Ferruh Yigit --- 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;