Increase default RX/TX ring sizes
cover Increase default RX/TX ring sizes
Increasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
Kevin Laatz (3):
examples: increase rx and tx default ring sizes app/testpmd: increase rx and tx default ring sizes
test: increase rx and tx default ring sizes
app/test-pmd/testpmd.c | 4 ++-- examples/bond/main.c | 4 ++-- examples/distributor/main.c | 4 ++-- examples/ethtool/ethtool-app/main.c | 4 ++-- examples/exception_path/main.c | 4 ++-- examples/flow_classify/flow_classify.c | 4 ++-- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 4 ++-- examples/l2fwd-crypto/main.c | 4 ++-- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 4 ++-- examples/l2fwd/main.c | 4 ++-- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-vf/main.c | 4 ++-- examples/l3fwd/main.c | 4 ++-- examples/link_status_interrupt/main.c | 4 ++-- examples/multi_process/client_server_mp/mp_server/init.c | 4 ++-- examples/multi_process/l2fwd_fork/main.c | 4 ++-- examples/multi_process/symmetric_mp/main.c | 4 ++-- examples/packet_ordering/main.c | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- examples/ptpclient/ptpclient.c | 4 ++-- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/main.h | 4 ++-- examples/quota_watermark/include/conf.h | 4 ++-- examples/rxtx_callbacks/main.c | 4 ++-- examples/skeleton/basicfwd.c | 4 ++-- examples/vm_power_manager/main.c | 4 ++-- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 4 ++-- test/test/test_kni.c | 4 ++-- test/test/test_link_bonding.c | 4 ++-- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_pmd_perf.c | 4 ++-- 38 files changed, 76 insertions(+), 76 deletions(-)
Signature · 1 line
2.9.4
PATCH 1/3 examples: increase rx and tx default ring sizes
Increase the default RX/TX ring sizes to 1024/1024 to accomodate for NICs with higher throughput (25G, 40G etc)
---
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- examples/bond/main.c | 4 ++-- examples/distributor/main.c | 4 ++-- examples/ethtool/ethtool-app/main.c | 4 ++-- examples/exception_path/main.c | 4 ++-- examples/flow_classify/flow_classify.c | 4 ++-- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 4 ++-- examples/l2fwd-crypto/main.c | 4 ++-- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 4 ++-- examples/l2fwd/main.c | 4 ++-- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-vf/main.c | 4 ++-- examples/l3fwd/main.c | 4 ++-- examples/link_status_interrupt/main.c | 4 ++-- examples/multi_process/client_server_mp/mp_server/init.c | 4 ++-- examples/multi_process/l2fwd_fork/main.c | 4 ++-- examples/multi_process/symmetric_mp/main.c | 4 ++-- examples/packet_ordering/main.c | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- examples/ptpclient/ptpclient.c | 4 ++-- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/main.h | 4 ++-- examples/quota_watermark/include/conf.h | 4 ++-- examples/rxtx_callbacks/main.c | 4 ++-- examples/skeleton/basicfwd.c | 4 ++-- examples/vm_power_manager/main.c | 4 ++-- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 4 ++-- 33 files changed, 66 insertions(+), 66 deletions(-)
examples/bond/main.c +2 -2
@@ -91,8 +91,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_RX_DESC_DEFAULT 128 -#define RTE_TX_DESC_DEFAULT 512 +#define RTE_RX_DESC_DEFAULT 1024 +#define RTE_TX_DESC_DEFAULT 1024#define BOND_IP_1 7#define BOND_IP_2 0
examples/distributor/main.c +2 -2
@@ -17,8 +17,8 @@#include <rte_distributor.h> #include <rte_pause.h> -#define RX_RING_SIZE 512 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS ((64*1024)-1)#define MBUF_CACHE_SIZE 128#define BURST_SIZE 64
examples/ethtool/ethtool-app/main.c +2 -2
@@ -20,8 +20,8 @@#define MAX_PORTS RTE_MAX_ETHPORTS#define MAX_BURST_LENGTH 32 -#define PORT_RX_QUEUE_SIZE 128 -#define PORT_TX_QUEUE_SIZE 256 +#define PORT_RX_QUEUE_SIZE 1024 +#define PORT_TX_QUEUE_SIZE 1024#define PKTPOOL_EXTRA_SIZE 512#define PKTPOOL_CACHE 32
examples/exception_path/main.c +2 -2
@@ -65,10 +65,10 @@#define MEMPOOL_CACHE_SZ PKT_BURST_SZ/* Number of RX ring descriptors */ -#define NB_RXD 128 +#define NB_RXD 1024/* Number of TX ring descriptors */ -#define NB_TXD 512 +#define NB_TXD 1024/* * RX and TX Prefetch, Host, and Write-back threshold values should be
examples/flow_classify/flow_classify.c +2 -2
@@ -15,8 +15,8 @@#include <rte_flow_classify.h> #include <rte_table_acl.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/ip_fragmentation/main.c +2 -2
@@ -77,8 +77,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ip_reassembly/main.c +2 -2
@@ -88,8 +88,8 @@ static uint32_t max_flow_ttl = DEF_FLOW_TTL;/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ipsec-secgw/ipsec-secgw.c +2 -2
@@ -77,8 +77,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define IPSEC_SECGW_RX_DESC_DEFAULT 128 -#define IPSEC_SECGW_TX_DESC_DEFAULT 512 +#define IPSEC_SECGW_RX_DESC_DEFAULT 1024 +#define IPSEC_SECGW_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =IPSEC_SECGW_RX_DESC_DEFAULT ;static uint16_t nb_txd =IPSEC_SECGW_TX_DESC_DEFAULT ;
examples/ipv4_multicast/main.c +2 -2
@@ -74,8 +74,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/kni/main.c +2 -2
@@ -61,10 +61,10 @@#define MEMPOOL_CACHE_SZ PKT_BURST_SZ/* Number of RX ring descriptors */ -#define NB_RXD 128 +#define NB_RXD 1024/* Number of TX ring descriptors */ -#define NB_TXD 512 +#define NB_TXD 1024/* Total octets in ethernet header */ #define KNI_ENET_HEADER_SIZE 14
examples/l2fwd-crypto/main.c +2 -2
@@ -69,8 +69,8 @@ enum cdev_type {/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd-jobstats/main.c +2 -2
@@ -46,8 +46,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd-keepalive/main.c +2 -2
@@ -52,8 +52,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd/main.c +2 -2
@@ -55,8 +55,8 @@ static int mac_updating = 1;/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-acl/main.c +2 -2
@@ -76,8 +76,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-power/main.c +2 -2
@@ -114,8 +114,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 512 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-vf/main.c +2 -2
@@ -106,8 +106,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd/main.c +2 -2
@@ -50,8 +50,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS#define MAX_RX_QUEUE_PER_PORT 128
examples/link_status_interrupt/main.c +2 -2
@@ -47,8 +47,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/multi_process/client_server_mp/mp_server/init.c +2 -2
@@ -41,8 +41,8 @@#define MBUFS_PER_PORT 1536#define MBUF_CACHE_SIZE 512 -#define RTE_MP_RX_DESC_DEFAULT 512 -#define RTE_MP_TX_DESC_DEFAULT 512 +#define RTE_MP_RX_DESC_DEFAULT 1024 +#define RTE_MP_TX_DESC_DEFAULT 1024#define CLIENT_QUEUE_RINGSIZE 128#define NO_FLAGS 0
examples/multi_process/l2fwd_fork/main.c +2 -2
@@ -68,8 +68,8 @@ enum l2fwd_cmd{/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/multi_process/symmetric_mp/main.c +2 -2
@@ -48,8 +48,8 @@#define NB_MBUFS 64*1024/* use 64k mbufs */ #define MBUF_CACHE_SIZE 256#define PKT_BURST 32 -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define PARAM_PROC_ID "proc-id"#define PARAM_NUM_PROCS "num-procs"
examples/packet_ordering/main.c +2 -2
@@ -16,8 +16,8 @@#include <rte_ring.h> #include <rte_reorder.h> -#define RX_DESC_PER_QUEUE 128 -#define TX_DESC_PER_QUEUE 512 +#define RX_DESC_PER_QUEUE 1024 +#define TX_DESC_PER_QUEUE 1024#define MAX_PKTS_BURST 32#define REORDER_BUFFER_SIZE 8192
examples/performance-thread/l3fwd-thread/main.c +2 -2
@@ -181,8 +181,8 @@ cb_parse_ptype(__rte_unused uint16_t port, __rte_unused uint16_t queue,/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 128 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ptpclient/ptpclient.c +2 -2
@@ -20,8 +20,8 @@#include <sys/time.h> #include <getopt.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/qos_meter/main.c +2 -2
@@ -73,8 +73,8 @@ static struct rte_eth_conf port_conf = { }, }; -#define NIC_RX_QUEUE_DESC 128 -#define NIC_TX_QUEUE_DESC 512 +#define NIC_RX_QUEUE_DESC 1024 +#define NIC_TX_QUEUE_DESC 1024#define NIC_RX_QUEUE 0#define NIC_TX_QUEUE 0
examples/qos_sched/main.h +2 -2
@@ -18,8 +18,8 @@ extern "C" {*/ #define APP_INTERACTIVE_DEFAULT 0 -#define APP_RX_DESC_DEFAULT 128 -#define APP_TX_DESC_DEFAULT 256 +#define APP_RX_DESC_DEFAULT 1024 +#define APP_TX_DESC_DEFAULT 1024#define APP_RING_SIZE (8*1024)#define NB_MBUF (2*1024*1024)
examples/quota_watermark/include/conf.h +2 -2
@@ -8,8 +8,8 @@#define RING_SIZE 1024#define MAX_PKT_QUOTA 64 -#define RX_DESC_PER_QUEUE 128 -#define TX_DESC_PER_QUEUE 512 +#define RX_DESC_PER_QUEUE 1024 +#define TX_DESC_PER_QUEUE 1024#define MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE#define MBUF_PER_POOL 8192
examples/rxtx_callbacks/main.c +2 -2
@@ -10,8 +10,8 @@#include <rte_lcore.h> #include <rte_mbuf.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/skeleton/basicfwd.c +2 -2
@@ -10,8 +10,8 @@#include <rte_lcore.h> #include <rte_mbuf.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/vm_power_manager/main.c +2 -2
@@ -33,8 +33,8 @@#include <rte_pmd_i40e.h> #include <rte_pmd_bnxt.h> -#define RX_RING_SIZE 512 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/vmdq/main.c +2 -2
@@ -48,8 +48,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define INVALID_PORT_ID 0xFF
examples/vmdq_dcb/main.c +2 -2
@@ -49,8 +49,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define INVALID_PORT_ID 0xFF
Signature · 1 line
2.9.4
PATCH 2/3 app/testpmd: increase rx and tx default ring size
In reply to Kevin Laatz---
Cc: [email protected]
Cc: [email protected]
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -191,8 +191,8 @@ queueid_t nb_txq = 1; /**< Number of TX queues per port. *//* * Configurable number of RX/TX ring descriptors. */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024uint16_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. */
Signature · 1 line
2.9.4
PATCH 2/3 app/testpmd: increase rx and tx default ring sizes
In reply to Kevin LaatzIncrease the default RX/TX ring sizes to 1024/1024 to accomodate for NICs with higher throughput (25G, 40G etc)
---
Cc: [email protected]
Cc: [email protected]
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -191,8 +191,8 @@ queueid_t nb_txq = 1; /**< Number of TX queues per port. *//* * Configurable number of RX/TX ring descriptors. */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024uint16_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. */
Signature · 1 line
2.9.4
PATCH 3/3 test: increase rx and tx default ring sizes
In reply to Kevin LaatzIncrease the default RX/TX ring sizes to 1024/1024 to accomodate for NICs with higher throughput (25G, 40G etc)
---
Cc: [email protected]
Cc: [email protected]
--- test/test/test_kni.c | 4 ++-- test/test/test_link_bonding.c | 4 ++-- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_pmd_perf.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
test/test/test_kni.c +2 -2
@@ -23,8 +23,8 @@#define PKT_BURST_SZ 32#define MEMPOOL_CACHE_SZ PKT_BURST_SZ#define SOCKET 0 -#define NB_RXD 128 -#define NB_TXD 512 +#define NB_RXD 1024 +#define NB_TXD 1024#define KNI_TIMEOUT_MS 5000/* ms */ #define IFCONFIG "/sbin/ifconfig "
test/test/test_link_bonding.c +2 -2
@@ -30,13 +30,13 @@#define TEST_MAX_NUMBER_OF_PORTS (6) -#define RX_RING_SIZE 128 +#define RX_RING_SIZE 1024#define RX_FREE_THRESH 32#define RX_PTHRESH 8#define RX_HTHRESH 8#define RX_WTHRESH 0 -#define TX_RING_SIZE 512 +#define TX_RING_SIZE 1024#define TX_FREE_THRESH 32#define TX_PTHRESH 32#define TX_HTHRESH 0
test/test/test_link_bonding_mode4.c +2 -2
@@ -33,8 +33,8 @@#define SLAVE_COUNT (4) -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define MBUF_CACHE_SIZE (250)#define BURST_SIZE (32)
test/test/test_pmd_perf.c +2 -2
@@ -19,8 +19,8 @@#define NB_SOCKETS (2)#define MEMPOOL_CACHE_SIZE 250#define MAX_PKT_BURST (32) -#define RTE_TEST_RX_DESC_DEFAULT (128) -#define RTE_TEST_TX_DESC_DEFAULT (512) +#define RTE_TEST_RX_DESC_DEFAULT (1024) +#define RTE_TEST_TX_DESC_DEFAULT (1024)#define RTE_PORT_ALL (~(uint16_t)0x0)/* how long test would take at full line rate */
Signature · 1 line
2.9.4
cover Increase default RX/TX ring sizes
In reply to Kevin LaatzIncreasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
v2
- fixed typos in commit messages
- fixed typo in Cc email address
Kevin Laatz (3):
examples: increase rx and tx default ring sizes app/testpmd: increase rx and tx default ring sizes
test: increase rx and tx default ring sizes
app/test-pmd/testpmd.c | 4 ++-- examples/bond/main.c | 4 ++-- examples/distributor/main.c | 4 ++-- examples/ethtool/ethtool-app/main.c | 4 ++-- examples/exception_path/main.c | 4 ++-- examples/flow_classify/flow_classify.c | 4 ++-- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 4 ++-- examples/l2fwd-crypto/main.c | 4 ++-- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 4 ++-- examples/l2fwd/main.c | 4 ++-- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-vf/main.c | 4 ++-- examples/l3fwd/main.c | 4 ++-- examples/link_status_interrupt/main.c | 4 ++-- examples/multi_process/client_server_mp/mp_server/init.c | 4 ++-- examples/multi_process/l2fwd_fork/main.c | 4 ++-- examples/multi_process/symmetric_mp/main.c | 4 ++-- examples/packet_ordering/main.c | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- examples/ptpclient/ptpclient.c | 4 ++-- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/main.h | 4 ++-- examples/quota_watermark/include/conf.h | 4 ++-- examples/rxtx_callbacks/main.c | 4 ++-- examples/skeleton/basicfwd.c | 4 ++-- examples/vm_power_manager/main.c | 4 ++-- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 4 ++-- test/test/test_kni.c | 4 ++-- test/test/test_link_bonding.c | 4 ++-- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_pmd_perf.c | 4 ++-- 38 files changed, 76 insertions(+), 76 deletions(-)
Signature · 1 line
2.9.4
PATCH 1/3 examples: increase rx and tx default ring sizes
Increase the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc)
---
v2:
fixed typo in commit message
--- examples/bond/main.c | 4 ++-- examples/distributor/main.c | 4 ++-- examples/ethtool/ethtool-app/main.c | 4 ++-- examples/exception_path/main.c | 4 ++-- examples/flow_classify/flow_classify.c | 4 ++-- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 4 ++-- examples/l2fwd-crypto/main.c | 4 ++-- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 4 ++-- examples/l2fwd/main.c | 4 ++-- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-vf/main.c | 4 ++-- examples/l3fwd/main.c | 4 ++-- examples/link_status_interrupt/main.c | 4 ++-- examples/multi_process/client_server_mp/mp_server/init.c | 4 ++-- examples/multi_process/l2fwd_fork/main.c | 4 ++-- examples/multi_process/symmetric_mp/main.c | 4 ++-- examples/packet_ordering/main.c | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- examples/ptpclient/ptpclient.c | 4 ++-- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/main.h | 4 ++-- examples/quota_watermark/include/conf.h | 4 ++-- examples/rxtx_callbacks/main.c | 4 ++-- examples/skeleton/basicfwd.c | 4 ++-- examples/vm_power_manager/main.c | 4 ++-- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 4 ++-- 33 files changed, 66 insertions(+), 66 deletions(-)
examples/bond/main.c +2 -2
@@ -91,8 +91,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_RX_DESC_DEFAULT 128 -#define RTE_TX_DESC_DEFAULT 512 +#define RTE_RX_DESC_DEFAULT 1024 +#define RTE_TX_DESC_DEFAULT 1024#define BOND_IP_1 7#define BOND_IP_2 0
examples/distributor/main.c +2 -2
@@ -17,8 +17,8 @@#include <rte_distributor.h> #include <rte_pause.h> -#define RX_RING_SIZE 512 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS ((64*1024)-1)#define MBUF_CACHE_SIZE 128#define BURST_SIZE 64
examples/ethtool/ethtool-app/main.c +2 -2
@@ -20,8 +20,8 @@#define MAX_PORTS RTE_MAX_ETHPORTS#define MAX_BURST_LENGTH 32 -#define PORT_RX_QUEUE_SIZE 128 -#define PORT_TX_QUEUE_SIZE 256 +#define PORT_RX_QUEUE_SIZE 1024 +#define PORT_TX_QUEUE_SIZE 1024#define PKTPOOL_EXTRA_SIZE 512#define PKTPOOL_CACHE 32
examples/exception_path/main.c +2 -2
@@ -65,10 +65,10 @@#define MEMPOOL_CACHE_SZ PKT_BURST_SZ/* Number of RX ring descriptors */ -#define NB_RXD 128 +#define NB_RXD 1024/* Number of TX ring descriptors */ -#define NB_TXD 512 +#define NB_TXD 1024/* * RX and TX Prefetch, Host, and Write-back threshold values should be
examples/flow_classify/flow_classify.c +2 -2
@@ -15,8 +15,8 @@#include <rte_flow_classify.h> #include <rte_table_acl.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/ip_fragmentation/main.c +2 -2
@@ -77,8 +77,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ip_reassembly/main.c +2 -2
@@ -88,8 +88,8 @@ static uint32_t max_flow_ttl = DEF_FLOW_TTL;/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ipsec-secgw/ipsec-secgw.c +2 -2
@@ -77,8 +77,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define IPSEC_SECGW_RX_DESC_DEFAULT 128 -#define IPSEC_SECGW_TX_DESC_DEFAULT 512 +#define IPSEC_SECGW_RX_DESC_DEFAULT 1024 +#define IPSEC_SECGW_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =IPSEC_SECGW_RX_DESC_DEFAULT ;static uint16_t nb_txd =IPSEC_SECGW_TX_DESC_DEFAULT ;
examples/ipv4_multicast/main.c +2 -2
@@ -74,8 +74,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/kni/main.c +2 -2
@@ -61,10 +61,10 @@#define MEMPOOL_CACHE_SZ PKT_BURST_SZ/* Number of RX ring descriptors */ -#define NB_RXD 128 +#define NB_RXD 1024/* Number of TX ring descriptors */ -#define NB_TXD 512 +#define NB_TXD 1024/* Total octets in ethernet header */ #define KNI_ENET_HEADER_SIZE 14
examples/l2fwd-crypto/main.c +2 -2
@@ -69,8 +69,8 @@ enum cdev_type {/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd-jobstats/main.c +2 -2
@@ -46,8 +46,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd-keepalive/main.c +2 -2
@@ -52,8 +52,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd/main.c +2 -2
@@ -55,8 +55,8 @@ static int mac_updating = 1;/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-acl/main.c +2 -2
@@ -76,8 +76,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-power/main.c +2 -2
@@ -114,8 +114,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 512 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-vf/main.c +2 -2
@@ -106,8 +106,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd/main.c +2 -2
@@ -50,8 +50,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS#define MAX_RX_QUEUE_PER_PORT 128
examples/link_status_interrupt/main.c +2 -2
@@ -47,8 +47,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/multi_process/client_server_mp/mp_server/init.c +2 -2
@@ -41,8 +41,8 @@#define MBUFS_PER_PORT 1536#define MBUF_CACHE_SIZE 512 -#define RTE_MP_RX_DESC_DEFAULT 512 -#define RTE_MP_TX_DESC_DEFAULT 512 +#define RTE_MP_RX_DESC_DEFAULT 1024 +#define RTE_MP_TX_DESC_DEFAULT 1024#define CLIENT_QUEUE_RINGSIZE 128#define NO_FLAGS 0
examples/multi_process/l2fwd_fork/main.c +2 -2
@@ -68,8 +68,8 @@ enum l2fwd_cmd{/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/multi_process/symmetric_mp/main.c +2 -2
@@ -48,8 +48,8 @@#define NB_MBUFS 64*1024/* use 64k mbufs */ #define MBUF_CACHE_SIZE 256#define PKT_BURST 32 -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define PARAM_PROC_ID "proc-id"#define PARAM_NUM_PROCS "num-procs"
examples/packet_ordering/main.c +2 -2
@@ -16,8 +16,8 @@#include <rte_ring.h> #include <rte_reorder.h> -#define RX_DESC_PER_QUEUE 128 -#define TX_DESC_PER_QUEUE 512 +#define RX_DESC_PER_QUEUE 1024 +#define TX_DESC_PER_QUEUE 1024#define MAX_PKTS_BURST 32#define REORDER_BUFFER_SIZE 8192
examples/performance-thread/l3fwd-thread/main.c +2 -2
@@ -181,8 +181,8 @@ cb_parse_ptype(__rte_unused uint16_t port, __rte_unused uint16_t queue,/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 128 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ptpclient/ptpclient.c +2 -2
@@ -20,8 +20,8 @@#include <sys/time.h> #include <getopt.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/qos_meter/main.c +2 -2
@@ -73,8 +73,8 @@ static struct rte_eth_conf port_conf = { }, }; -#define NIC_RX_QUEUE_DESC 128 -#define NIC_TX_QUEUE_DESC 512 +#define NIC_RX_QUEUE_DESC 1024 +#define NIC_TX_QUEUE_DESC 1024#define NIC_RX_QUEUE 0#define NIC_TX_QUEUE 0
examples/qos_sched/main.h +2 -2
@@ -18,8 +18,8 @@ extern "C" {*/ #define APP_INTERACTIVE_DEFAULT 0 -#define APP_RX_DESC_DEFAULT 128 -#define APP_TX_DESC_DEFAULT 256 +#define APP_RX_DESC_DEFAULT 1024 +#define APP_TX_DESC_DEFAULT 1024#define APP_RING_SIZE (8*1024)#define NB_MBUF (2*1024*1024)
examples/quota_watermark/include/conf.h +2 -2
@@ -8,8 +8,8 @@#define RING_SIZE 1024#define MAX_PKT_QUOTA 64 -#define RX_DESC_PER_QUEUE 128 -#define TX_DESC_PER_QUEUE 512 +#define RX_DESC_PER_QUEUE 1024 +#define TX_DESC_PER_QUEUE 1024#define MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE#define MBUF_PER_POOL 8192
examples/rxtx_callbacks/main.c +2 -2
@@ -10,8 +10,8 @@#include <rte_lcore.h> #include <rte_mbuf.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/skeleton/basicfwd.c +2 -2
@@ -10,8 +10,8 @@#include <rte_lcore.h> #include <rte_mbuf.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/vm_power_manager/main.c +2 -2
@@ -33,8 +33,8 @@#include <rte_pmd_i40e.h> #include <rte_pmd_bnxt.h> -#define RX_RING_SIZE 512 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/vmdq/main.c +2 -2
@@ -48,8 +48,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define INVALID_PORT_ID 0xFF
examples/vmdq_dcb/main.c +2 -2
@@ -49,8 +49,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define INVALID_PORT_ID 0xFF
Signature · 1 line
2.9.4
PATCH 2/3 app/testpmd: increase rx and tx default ring sizes
In reply to Kevin LaatzIncrease the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc)
---
v2:
- fixed typo in commit message
- fixed typo in Cc email address
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -191,8 +191,8 @@ queueid_t nb_txq = 1; /**< Number of TX queues per port. *//* * Configurable number of RX/TX ring descriptors. */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024uint16_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. */
Signature · 1 line
2.9.4
PATCH 3/3 test: increase rx and tx default ring sizes
In reply to Kevin LaatzIncrease the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc)
---
v2:
fixed typo in commit message
--- test/test/test_kni.c | 4 ++-- test/test/test_link_bonding.c | 4 ++-- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_pmd_perf.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
test/test/test_kni.c +2 -2
@@ -23,8 +23,8 @@#define PKT_BURST_SZ 32#define MEMPOOL_CACHE_SZ PKT_BURST_SZ#define SOCKET 0 -#define NB_RXD 128 -#define NB_TXD 512 +#define NB_RXD 1024 +#define NB_TXD 1024#define KNI_TIMEOUT_MS 5000/* ms */ #define IFCONFIG "/sbin/ifconfig "
test/test/test_link_bonding.c +2 -2
@@ -30,13 +30,13 @@#define TEST_MAX_NUMBER_OF_PORTS (6) -#define RX_RING_SIZE 128 +#define RX_RING_SIZE 1024#define RX_FREE_THRESH 32#define RX_PTHRESH 8#define RX_HTHRESH 8#define RX_WTHRESH 0 -#define TX_RING_SIZE 512 +#define TX_RING_SIZE 1024#define TX_FREE_THRESH 32#define TX_PTHRESH 32#define TX_HTHRESH 0
test/test/test_link_bonding_mode4.c +2 -2
@@ -33,8 +33,8 @@#define SLAVE_COUNT (4) -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define MBUF_CACHE_SIZE (250)#define BURST_SIZE (32)
test/test/test_pmd_perf.c +2 -2
@@ -19,8 +19,8 @@#define NB_SOCKETS (2)#define MEMPOOL_CACHE_SIZE 250#define MAX_PKT_BURST (32) -#define RTE_TEST_RX_DESC_DEFAULT (128) -#define RTE_TEST_TX_DESC_DEFAULT (512) +#define RTE_TEST_RX_DESC_DEFAULT (1024) +#define RTE_TEST_TX_DESC_DEFAULT (1024)#define RTE_PORT_ALL (~(uint16_t)0x0)/* how long test would take at full line rate */
Signature · 1 line
2.9.4
v2 cover Increase default RX/TX ring sizes
In reply to Kevin LaatzIncreasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
v2
- fixed typos in commit messages
- fixed typo in Cc email address
Kevin Laatz (3):
examples: increase rx and tx default ring sizes app/testpmd: increase rx and tx default ring sizes
test: increase rx and tx default ring sizes
app/test-pmd/testpmd.c | 4 ++-- examples/bond/main.c | 4 ++-- examples/distributor/main.c | 4 ++-- examples/ethtool/ethtool-app/main.c | 4 ++-- examples/exception_path/main.c | 4 ++-- examples/flow_classify/flow_classify.c | 4 ++-- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 4 ++-- examples/l2fwd-crypto/main.c | 4 ++-- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 4 ++-- examples/l2fwd/main.c | 4 ++-- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-vf/main.c | 4 ++-- examples/l3fwd/main.c | 4 ++-- examples/link_status_interrupt/main.c | 4 ++-- examples/multi_process/client_server_mp/mp_server/init.c | 4 ++-- examples/multi_process/l2fwd_fork/main.c | 4 ++-- examples/multi_process/symmetric_mp/main.c | 4 ++-- examples/packet_ordering/main.c | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- examples/ptpclient/ptpclient.c | 4 ++-- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/main.h | 4 ++-- examples/quota_watermark/include/conf.h | 4 ++-- examples/rxtx_callbacks/main.c | 4 ++-- examples/skeleton/basicfwd.c | 4 ++-- examples/vm_power_manager/main.c | 4 ++-- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 4 ++-- test/test/test_kni.c | 4 ++-- test/test/test_link_bonding.c | 4 ++-- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_pmd_perf.c | 4 ++-- 38 files changed, 76 insertions(+), 76 deletions(-)
Signature · 1 line
2.9.4
PATCH v2 1/3 examples: increase rx and tx default ring sizes
Increase the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc)
---
v2:
fixed typo in commit message
--- examples/bond/main.c | 4 ++-- examples/distributor/main.c | 4 ++-- examples/ethtool/ethtool-app/main.c | 4 ++-- examples/exception_path/main.c | 4 ++-- examples/flow_classify/flow_classify.c | 4 ++-- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 4 ++-- examples/l2fwd-crypto/main.c | 4 ++-- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 4 ++-- examples/l2fwd/main.c | 4 ++-- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-vf/main.c | 4 ++-- examples/l3fwd/main.c | 4 ++-- examples/link_status_interrupt/main.c | 4 ++-- examples/multi_process/client_server_mp/mp_server/init.c | 4 ++-- examples/multi_process/l2fwd_fork/main.c | 4 ++-- examples/multi_process/symmetric_mp/main.c | 4 ++-- examples/packet_ordering/main.c | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- examples/ptpclient/ptpclient.c | 4 ++-- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/main.h | 4 ++-- examples/quota_watermark/include/conf.h | 4 ++-- examples/rxtx_callbacks/main.c | 4 ++-- examples/skeleton/basicfwd.c | 4 ++-- examples/vm_power_manager/main.c | 4 ++-- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 4 ++-- 33 files changed, 66 insertions(+), 66 deletions(-)
examples/bond/main.c +2 -2
@@ -91,8 +91,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_RX_DESC_DEFAULT 128 -#define RTE_TX_DESC_DEFAULT 512 +#define RTE_RX_DESC_DEFAULT 1024 +#define RTE_TX_DESC_DEFAULT 1024#define BOND_IP_1 7#define BOND_IP_2 0
examples/distributor/main.c +2 -2
@@ -17,8 +17,8 @@#include <rte_distributor.h> #include <rte_pause.h> -#define RX_RING_SIZE 512 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS ((64*1024)-1)#define MBUF_CACHE_SIZE 128#define BURST_SIZE 64
examples/ethtool/ethtool-app/main.c +2 -2
@@ -20,8 +20,8 @@#define MAX_PORTS RTE_MAX_ETHPORTS#define MAX_BURST_LENGTH 32 -#define PORT_RX_QUEUE_SIZE 128 -#define PORT_TX_QUEUE_SIZE 256 +#define PORT_RX_QUEUE_SIZE 1024 +#define PORT_TX_QUEUE_SIZE 1024#define PKTPOOL_EXTRA_SIZE 512#define PKTPOOL_CACHE 32
examples/exception_path/main.c +2 -2
@@ -65,10 +65,10 @@#define MEMPOOL_CACHE_SZ PKT_BURST_SZ/* Number of RX ring descriptors */ -#define NB_RXD 128 +#define NB_RXD 1024/* Number of TX ring descriptors */ -#define NB_TXD 512 +#define NB_TXD 1024/* * RX and TX Prefetch, Host, and Write-back threshold values should be
examples/flow_classify/flow_classify.c +2 -2
@@ -15,8 +15,8 @@#include <rte_flow_classify.h> #include <rte_table_acl.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/ip_fragmentation/main.c +2 -2
@@ -77,8 +77,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ip_reassembly/main.c +2 -2
@@ -88,8 +88,8 @@ static uint32_t max_flow_ttl = DEF_FLOW_TTL;/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ipsec-secgw/ipsec-secgw.c +2 -2
@@ -77,8 +77,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define IPSEC_SECGW_RX_DESC_DEFAULT 128 -#define IPSEC_SECGW_TX_DESC_DEFAULT 512 +#define IPSEC_SECGW_RX_DESC_DEFAULT 1024 +#define IPSEC_SECGW_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =IPSEC_SECGW_RX_DESC_DEFAULT ;static uint16_t nb_txd =IPSEC_SECGW_TX_DESC_DEFAULT ;
examples/ipv4_multicast/main.c +2 -2
@@ -74,8 +74,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/kni/main.c +2 -2
@@ -61,10 +61,10 @@#define MEMPOOL_CACHE_SZ PKT_BURST_SZ/* Number of RX ring descriptors */ -#define NB_RXD 128 +#define NB_RXD 1024/* Number of TX ring descriptors */ -#define NB_TXD 512 +#define NB_TXD 1024/* Total octets in ethernet header */ #define KNI_ENET_HEADER_SIZE 14
examples/l2fwd-crypto/main.c +2 -2
@@ -69,8 +69,8 @@ enum cdev_type {/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd-jobstats/main.c +2 -2
@@ -46,8 +46,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd-keepalive/main.c +2 -2
@@ -52,8 +52,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l2fwd/main.c +2 -2
@@ -55,8 +55,8 @@ static int mac_updating = 1;/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-acl/main.c +2 -2
@@ -76,8 +76,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-power/main.c +2 -2
@@ -114,8 +114,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 512 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd-vf/main.c +2 -2
@@ -106,8 +106,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/l3fwd/main.c +2 -2
@@ -50,8 +50,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS#define MAX_RX_QUEUE_PER_PORT 128
examples/link_status_interrupt/main.c +2 -2
@@ -47,8 +47,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/multi_process/client_server_mp/mp_server/init.c +2 -2
@@ -41,8 +41,8 @@#define MBUFS_PER_PORT 1536#define MBUF_CACHE_SIZE 512 -#define RTE_MP_RX_DESC_DEFAULT 512 -#define RTE_MP_TX_DESC_DEFAULT 512 +#define RTE_MP_RX_DESC_DEFAULT 1024 +#define RTE_MP_TX_DESC_DEFAULT 1024#define CLIENT_QUEUE_RINGSIZE 128#define NO_FLAGS 0
examples/multi_process/l2fwd_fork/main.c +2 -2
@@ -68,8 +68,8 @@ enum l2fwd_cmd{/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/multi_process/symmetric_mp/main.c +2 -2
@@ -48,8 +48,8 @@#define NB_MBUFS 64*1024/* use 64k mbufs */ #define MBUF_CACHE_SIZE 256#define PKT_BURST 32 -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define PARAM_PROC_ID "proc-id"#define PARAM_NUM_PROCS "num-procs"
examples/packet_ordering/main.c +2 -2
@@ -16,8 +16,8 @@#include <rte_ring.h> #include <rte_reorder.h> -#define RX_DESC_PER_QUEUE 128 -#define TX_DESC_PER_QUEUE 512 +#define RX_DESC_PER_QUEUE 1024 +#define TX_DESC_PER_QUEUE 1024#define MAX_PKTS_BURST 32#define REORDER_BUFFER_SIZE 8192
examples/performance-thread/l3fwd-thread/main.c +2 -2
@@ -181,8 +181,8 @@ cb_parse_ptype(__rte_unused uint16_t port, __rte_unused uint16_t queue,/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 128 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024static uint16_t nb_rxd =RTE_TEST_RX_DESC_DEFAULT ;static uint16_t nb_txd =RTE_TEST_TX_DESC_DEFAULT ;
examples/ptpclient/ptpclient.c +2 -2
@@ -20,8 +20,8 @@#include <sys/time.h> #include <getopt.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/qos_meter/main.c +2 -2
@@ -73,8 +73,8 @@ static struct rte_eth_conf port_conf = { }, }; -#define NIC_RX_QUEUE_DESC 128 -#define NIC_TX_QUEUE_DESC 512 +#define NIC_RX_QUEUE_DESC 1024 +#define NIC_TX_QUEUE_DESC 1024#define NIC_RX_QUEUE 0#define NIC_TX_QUEUE 0
examples/qos_sched/main.h +2 -2
@@ -18,8 +18,8 @@ extern "C" {*/ #define APP_INTERACTIVE_DEFAULT 0 -#define APP_RX_DESC_DEFAULT 128 -#define APP_TX_DESC_DEFAULT 256 +#define APP_RX_DESC_DEFAULT 1024 +#define APP_TX_DESC_DEFAULT 1024#define APP_RING_SIZE (8*1024)#define NB_MBUF (2*1024*1024)
examples/quota_watermark/include/conf.h +2 -2
@@ -8,8 +8,8 @@#define RING_SIZE 1024#define MAX_PKT_QUOTA 64 -#define RX_DESC_PER_QUEUE 128 -#define TX_DESC_PER_QUEUE 512 +#define RX_DESC_PER_QUEUE 1024 +#define TX_DESC_PER_QUEUE 1024#define MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE#define MBUF_PER_POOL 8192
examples/rxtx_callbacks/main.c +2 -2
@@ -10,8 +10,8 @@#include <rte_lcore.h> #include <rte_mbuf.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/skeleton/basicfwd.c +2 -2
@@ -10,8 +10,8 @@#include <rte_lcore.h> #include <rte_mbuf.h> -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/vm_power_manager/main.c +2 -2
@@ -33,8 +33,8 @@#include <rte_pmd_i40e.h> #include <rte_pmd_bnxt.h> -#define RX_RING_SIZE 512 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define NUM_MBUFS 8191#define MBUF_CACHE_SIZE 250
examples/vmdq/main.c +2 -2
@@ -48,8 +48,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define INVALID_PORT_ID 0xFF
examples/vmdq_dcb/main.c +2 -2
@@ -49,8 +49,8 @@/* * Configurable number of RX/TX ring descriptors */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024#define INVALID_PORT_ID 0xFF
Signature · 1 line
2.9.4
PATCH v2 2/3 app/testpmd: increase rx and tx default ring sizes
In reply to Kevin LaatzIncrease the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc)
---
v2:
- fixed typo in commit message
- fixed typo in Cc email address
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -191,8 +191,8 @@ queueid_t nb_txq = 1; /**< Number of TX queues per port. *//* * Configurable number of RX/TX ring descriptors. */ -#define RTE_TEST_RX_DESC_DEFAULT 128 -#define RTE_TEST_TX_DESC_DEFAULT 512 +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024uint16_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. */
Signature · 1 line
2.9.4
PATCH v2 3/3 test: increase rx and tx default ring sizes
In reply to Kevin LaatzIncrease the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc)
---
v2:
fixed typo in commit message
--- test/test/test_kni.c | 4 ++-- test/test/test_link_bonding.c | 4 ++-- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_pmd_perf.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
test/test/test_kni.c +2 -2
@@ -23,8 +23,8 @@#define PKT_BURST_SZ 32#define MEMPOOL_CACHE_SZ PKT_BURST_SZ#define SOCKET 0 -#define NB_RXD 128 -#define NB_TXD 512 +#define NB_RXD 1024 +#define NB_TXD 1024#define KNI_TIMEOUT_MS 5000/* ms */ #define IFCONFIG "/sbin/ifconfig "
test/test/test_link_bonding.c +2 -2
@@ -30,13 +30,13 @@#define TEST_MAX_NUMBER_OF_PORTS (6) -#define RX_RING_SIZE 128 +#define RX_RING_SIZE 1024#define RX_FREE_THRESH 32#define RX_PTHRESH 8#define RX_HTHRESH 8#define RX_WTHRESH 0 -#define TX_RING_SIZE 512 +#define TX_RING_SIZE 1024#define TX_FREE_THRESH 32#define TX_PTHRESH 32#define TX_HTHRESH 0
test/test/test_link_bonding_mode4.c +2 -2
@@ -33,8 +33,8 @@#define SLAVE_COUNT (4) -#define RX_RING_SIZE 128 -#define TX_RING_SIZE 512 +#define RX_RING_SIZE 1024 +#define TX_RING_SIZE 1024#define MBUF_CACHE_SIZE (250)#define BURST_SIZE (32)
test/test/test_pmd_perf.c +2 -2
@@ -19,8 +19,8 @@#define NB_SOCKETS (2)#define MEMPOOL_CACHE_SIZE 250#define MAX_PKT_BURST (32) -#define RTE_TEST_RX_DESC_DEFAULT (128) -#define RTE_TEST_TX_DESC_DEFAULT (512) +#define RTE_TEST_RX_DESC_DEFAULT (1024) +#define RTE_TEST_TX_DESC_DEFAULT (1024)#define RTE_PORT_ALL (~(uint16_t)0x0)/* how long test would take at full line rate */
Signature · 1 line
2.9.4
Hi Kevin,
Quoted 11 lines · Kevin Laatz
Increasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
v2
- fixed typos in commit messages
- fixed typo in Cc email address
I agree with the above and this series contents but would like to comment anyway.
Since typical TX/RX bursts are usually somewhere between 16 to 64 packets depending on the application, increasing ring size instead of burst size to keep up with packet rate may mean that software (PMD/application) is too slow on the RX side or hardware is too slow on the TX side (rings always full basically), and this is worked around by introducing latency to absorb packet loss. This is not necessarily a good trade-off.
Granted the most appropriate burst/ring/threshold values always depend on the application and underlying hardware, and each vendor is responsible for documenting ideal values for typical applications by providing performance results.
My concern is that modifying defaults makes performance comparison with past DPDK releases more difficult for existing automated tests that do not provide ring size and other parameters. There should an impact given that larger rings require more buffers, use more cache, and access more memory in general.
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 18 lines · Adrien Mazarguil
Hi Kevin,
Quoted 11 lines · Kevin Laatz
Increasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
v2
- fixed typos in commit messages
- fixed typo in Cc email addressI agree with the above and this series contents but would like to comment anyway.
Quoted 6 lines
Since typical TX/RX bursts are usually somewhere between 16 to 64 packets depending on the application, increasing ring size instead of burst size to keep up with packet rate may mean that software (PMD/application) is too slow on the RX side or hardware is too slow on the TX side (rings always full basically), and this is worked around by introducing latency to absorb packet loss. This is not necessarily a good trade-off.
Well, if RX burst size of 64 is in use, the existing default of 128 is definely very much too low - though point taken about slowness of RX.
Quoted 5 lines
Granted the most appropriate burst/ring/threshold values always depend on the application and underlying hardware, and each vendor is responsible for documenting ideal values for typical applications by providing performance results.
I actually think it probably depends a lot on the NIC hardware in question. What is the optimal size for an app with a 1G NIC will be different for a 25G or 100G NIC. I therefore think in a future release we should have an ethdev API to allow each driver to propose it's recommended ring sizes. The app can perhaps provide a burst size hint as parameter. What do you think?
Quoted 7 lines
My concern is that modifying defaults makes performance comparison with past DPDK releases more difficult for existing automated tests that do not provide ring size and other parameters. There should an impact given that larger rings require more buffers, use more cache, and access more memory in general.
I'm actually not too concerned about that, as I would expect most serious performance comparisons to be done with individually tuned rx and tx ring size parameters. For zero loss throughput tests, larger ring sizes are needed for any of the NIC I've tested anyway.
Overall, I feel this change is long overdue.
Series Acked-by: Bruce Richardson <[email protected]>
Adrien Mazarguil
Acked-byQuoted 26 lines · Bruce Richardson
Quoted 18 lines · Adrien Mazarguil
Hi Kevin,
Quoted 11 lines · Kevin Laatz
Increasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
v2
- fixed typos in commit messages
- fixed typo in Cc email addressI agree with the above and this series contents but would like to comment anyway.
Quoted 6 lines
Since typical TX/RX bursts are usually somewhere between 16 to 64 packets depending on the application, increasing ring size instead of burst size to keep up with packet rate may mean that software (PMD/application) is too slow on the RX side or hardware is too slow on the TX side (rings always full basically), and this is worked around by introducing latency to absorb packet loss. This is not necessarily a good trade-off.
Quoted 2 lines
Well, if RX burst size of 64 is in use, the existing default of 128 is definely very much too low - though point taken about slowness of RX.
Agreed, I just wanted to stress that increasing TX/RX ring sizes may result in rings still full, but thanks to their FIFO nature, now with increased latency and resource consumption while still dropping packets in case of HW/SW slowness. This is not the proper workaround for such a scenario (not uncommon).
Quoted 11 lines
Quoted 4 lines
Granted the most appropriate burst/ring/threshold values always depend on the application and underlying hardware, and each vendor is responsible for documenting ideal values for typical applications by providing performance results.
I actually think it probably depends a lot on the NIC hardware in question. What is the optimal size for an app with a 1G NIC will be different for a 25G or 100G NIC. I therefore think in a future release we should have an ethdev API to allow each driver to propose it's recommended ring sizes. The app can perhaps provide a burst size hint as parameter. What do you think?
Sounds like a good idea. It could also be implemented without hurting any API by making 0 descriptors a special value for rte_eth_[rt]x_queue_setup(), so that being lazy translates to optimized defaults at the cost of some uncertainty regarding mbuf pool sizing.
PMDs that do not implement this would reject queue creation as they likely already do.
Quoted 6 lines
Quoted 6 lines
My concern is that modifying defaults makes performance comparison with past DPDK releases more difficult for existing automated tests that do not provide ring size and other parameters. There should an impact given that larger rings require more buffers, use more cache, and access more memory in general.
Quoted 8 lines
I'm actually not too concerned about that, as I would expect most serious performance comparisons to be done with individually tuned rx and tx ring size parameters. For zero loss throughput tests, larger ring sizes are needed for any of the NIC I've tested anyway.
Overall, I feel this change is long overdue.
Series Acked-by: Bruce Richardson <[email protected]>
True, therefore:
Signature · 2 lines
Adrien Mazarguil 6WIND
Thomas Monjalon
Applied30/01/2018 14:48, Adrien Mazarguil:
Quoted 67 lines · Bruce Richardson
Quoted 26 lines · Adrien Mazarguil
Quoted 18 lines
Hi Kevin,
Quoted 11 lines · Kevin Laatz
Increasing the RX/TX default ring size to 1024/1024 to accommodate for faster NICs. With the increase of number of PPS, a larger RX buffer is required in order to avoid packet loss. While a ring size of 128 may be large enough for 1G and possibly 10G NICs, this is not going to scale to small packet sizes at 25G and 40G line rates. As we are increasing the RX buffer size to 1024, we also need to increase the TX buffer size to ensure that the TX side does not become the bottleneck.
v2
- fixed typos in commit messages
- fixed typo in Cc email addressI agree with the above and this series contents but would like to comment anyway.
Quoted 6 lines
Since typical TX/RX bursts are usually somewhere between 16 to 64 packets depending on the application, increasing ring size instead of burst size to keep up with packet rate may mean that software (PMD/application) is too slow on the RX side or hardware is too slow on the TX side (rings always full basically), and this is worked around by introducing latency to absorb packet loss. This is not necessarily a good trade-off.
Quoted 2 lines
Well, if RX burst size of 64 is in use, the existing default of 128 is definely very much too low - though point taken about slowness of RX.
Agreed, I just wanted to stress that increasing TX/RX ring sizes may result in rings still full, but thanks to their FIFO nature, now with increased latency and resource consumption while still dropping packets in case of HW/SW slowness. This is not the proper workaround for such a scenario (not uncommon).
Quoted 11 lines
Quoted 4 lines
Granted the most appropriate burst/ring/threshold values always depend on the application and underlying hardware, and each vendor is responsible for documenting ideal values for typical applications by providing performance results.
I actually think it probably depends a lot on the NIC hardware in question. What is the optimal size for an app with a 1G NIC will be different for a 25G or 100G NIC. I therefore think in a future release we should have an ethdev API to allow each driver to propose it's recommended ring sizes. The app can perhaps provide a burst size hint as parameter. What do you think?
Sounds like a good idea. It could also be implemented without hurting any API by making 0 descriptors a special value for rte_eth_[rt]x_queue_setup(), so that being lazy translates to optimized defaults at the cost of some uncertainty regarding mbuf pool sizing.
PMDs that do not implement this would reject queue creation as they likely already do.
Quoted 11 lines
Quoted 6 lines
My concern is that modifying defaults makes performance comparison with past DPDK releases more difficult for existing automated tests that do not provide ring size and other parameters. There should an impact given that larger rings require more buffers, use more cache, and access more memory in general.
I'm actually not too concerned about that, as I would expect most serious performance comparisons to be done with individually tuned rx and tx ring size parameters. For zero loss throughput tests, larger ring sizes are needed for any of the NIC I've tested anyway.
Quoted 7 lines
Quoted 3 lines
Overall, I feel this change is long overdue.
Series Acked-by: Bruce Richardson <[email protected]>
True, therefore:
Acked-by Adrien Mazarguil <[email protected]>
Applied, thanks