summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-10-12 23:36:41 +0200
committerXavier Simonart <xavier.simonart@intel.com>2019-10-13 00:38:33 +0200
commit516ed17e6c6c59ab0ed4cd868a1205455cfe47ef (patch)
treedf88f531f02534ba3f7cb34f52d7faa60717e310
parentb9af66b18bf298f292c62339b0ca41595a3e6b56 (diff)
Increase the default number of rx and tx descriptors to 2K
A high number of RX descriptor can be helpful in avoiding packet loss due to the core being interrupted. This commit increases the default number of descriptors from 256 to 2K. Those values are checked versus the minimum and maximum supported by the pmd. Number of mbufs (mempool size) have been updated n config files to support this default number of dsescriptors. The number of descriptors can still be overwritten by the config file. However those values must always remain within the limits reported by the pmd. Change-Id: I5f7999eca886dad68f3c0733da0d796bf4c06a56 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/config/cgnat.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/l2fwd-4ports.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/l3fwd-4ports.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/mcast.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/nop-rings.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/nop.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/nsh_acl.cfg2
-rw-r--r--VNFs/DPPD-PROX/config/nsh_nat.cfg2
-rw-r--r--VNFs/DPPD-PROX/defaults.c4
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg2
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.c29
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.h4
12 files changed, 38 insertions, 17 deletions
diff --git a/VNFs/DPPD-PROX/config/cgnat.cfg b/VNFs/DPPD-PROX/config/cgnat.cfg
index 4015d3a..cae02c7 100644
--- a/VNFs/DPPD-PROX/config/cgnat.cfg
+++ b/VNFs/DPPD-PROX/config/cgnat.cfg
@@ -30,7 +30,7 @@ nat_table = dofile("cgnat_table.lua")
lpm4 = dofile("ipv4_1port.lua")
[defaults]
-mempool size=4K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/config/l2fwd-4ports.cfg b/VNFs/DPPD-PROX/config/l2fwd-4ports.cfg
index 27fd08e..7049606 100644
--- a/VNFs/DPPD-PROX/config/l2fwd-4ports.cfg
+++ b/VNFs/DPPD-PROX/config/l2fwd-4ports.cfg
@@ -32,7 +32,7 @@ name=if3
mac=50:00:00:00:00:04
[defaults]
-mempool size=4K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/config/l3fwd-4ports.cfg b/VNFs/DPPD-PROX/config/l3fwd-4ports.cfg
index 3c452b0..a8cae86 100644
--- a/VNFs/DPPD-PROX/config/l3fwd-4ports.cfg
+++ b/VNFs/DPPD-PROX/config/l3fwd-4ports.cfg
@@ -32,7 +32,7 @@ name=if3
mac=50:00:00:00:00:04
[defaults]
-mempool size=4K
+mempool size=8K
[lua]
lpm4 = dofile("ipv4.lua")
diff --git a/VNFs/DPPD-PROX/config/mcast.cfg b/VNFs/DPPD-PROX/config/mcast.cfg
index 3e673e5..9257c85 100644
--- a/VNFs/DPPD-PROX/config/mcast.cfg
+++ b/VNFs/DPPD-PROX/config/mcast.cfg
@@ -46,7 +46,7 @@ multicast=01:00:5e:00:00:04
$mbs=8
[defaults]
-mempool size=4K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/config/nop-rings.cfg b/VNFs/DPPD-PROX/config/nop-rings.cfg
index 000353a..7513c43 100644
--- a/VNFs/DPPD-PROX/config/nop-rings.cfg
+++ b/VNFs/DPPD-PROX/config/nop-rings.cfg
@@ -67,7 +67,7 @@ rx_ring=dpdkr3_tx
tx_ring=dpdkr3_rx
[defaults]
-mempool size=4K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/config/nop.cfg b/VNFs/DPPD-PROX/config/nop.cfg
index 757b1ed..2741b41 100644
--- a/VNFs/DPPD-PROX/config/nop.cfg
+++ b/VNFs/DPPD-PROX/config/nop.cfg
@@ -44,7 +44,7 @@ name=if3
mac=hardware
[defaults]
-mempool size=2K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/config/nsh_acl.cfg b/VNFs/DPPD-PROX/config/nsh_acl.cfg
index 2893bd4..6ad1d5f 100644
--- a/VNFs/DPPD-PROX/config/nsh_acl.cfg
+++ b/VNFs/DPPD-PROX/config/nsh_acl.cfg
@@ -28,7 +28,7 @@ mac=hardware
acl_table=dofile("acl_table.lua")
[defaults]
-mempool size=4K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/config/nsh_nat.cfg b/VNFs/DPPD-PROX/config/nsh_nat.cfg
index bb3bf4b..3ae82c4 100644
--- a/VNFs/DPPD-PROX/config/nsh_nat.cfg
+++ b/VNFs/DPPD-PROX/config/nsh_nat.cfg
@@ -28,7 +28,7 @@ mac=hardware
nat_table = dofile("nat_table.lua")
[defaults]
-mempool size=4K
+mempool size=8K
[global]
start time=5
diff --git a/VNFs/DPPD-PROX/defaults.c b/VNFs/DPPD-PROX/defaults.c
index e1180f1..3dbb7ec 100644
--- a/VNFs/DPPD-PROX/defaults.c
+++ b/VNFs/DPPD-PROX/defaults.c
@@ -34,8 +34,8 @@
#define NB_PIPES 32768
#define NB_MBUF 4096
#define RING_RX_SIZE 256
-#define NB_RX_RING_DESC 256
-#define NB_TX_RING_DESC 256
+#define NB_RX_RING_DESC 2048
+#define NB_TX_RING_DESC 2048
/* 1500000 milliseconds */
#define DEFAULT_CPE_TIMEOUT_MS 1500000
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
index b2f39c9..04b37c3 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
@@ -27,7 +27,7 @@ mac=hardware
vlan=yes
[defaults]
-mempool size=2K
+mempool size=8K
[global]
name=${name}
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c
index a0530c4..de11dbf 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.c
+++ b/VNFs/DPPD-PROX/prox_port_cfg.c
@@ -224,9 +224,14 @@ void init_rte_dev(int use_dummy_devices)
port_cfg->max_rxq = dev_info.max_rx_queues;
port_cfg->max_rx_pkt_len = dev_info.max_rx_pktlen;
port_cfg->min_rx_bufsize = dev_info.min_rx_bufsize;
+ port_cfg->min_tx_desc = dev_info.tx_desc_lim.nb_min;
+ port_cfg->max_tx_desc = dev_info.tx_desc_lim.nb_max;
+ port_cfg->min_rx_desc = dev_info.rx_desc_lim.nb_min;
+ port_cfg->max_rx_desc = dev_info.rx_desc_lim.nb_max;
prox_strncpy(port_cfg->driver_name, dev_info.driver_name, sizeof(port_cfg->driver_name));
plog_info("\tPort %u : driver='%s' tx_queues=%d rx_queues=%d\n", port_id, !strcmp(port_cfg->driver_name, "")? "null" : port_cfg->driver_name, port_cfg->max_txq, port_cfg->max_rxq);
+ plog_info("\tPort %u : %d<=nb_tx_desc<=%d %d<=nb_rx_desc<=%d\n", port_id, port_cfg->min_tx_desc, port_cfg->max_tx_desc, port_cfg->min_rx_desc, port_cfg->max_rx_desc);
if (strncmp(port_cfg->driver_name, "rte_", 4) == 0) {
prox_strncpy(port_cfg->short_name, prox_port_cfg[port_id].driver_name + 4, sizeof(port_cfg->short_name));
@@ -612,12 +617,24 @@ static void init_port(struct prox_port_cfg *port_cfg)
port_cfg->port_conf.intr_conf.lsc = port_cfg->lsc_val;
plog_info("\t\tOverriding link state interrupt configuration to '%s'\n", port_cfg->lsc_val? "enabled" : "disabled");
}
- if (!strcmp(port_cfg->short_name, "vmxnet3")) {
- if (port_cfg->n_txd < 512) {
- // Vmxnet3 driver requires minimum 512 tx descriptors
- plog_info("\t\tNumber of TX descriptors is set to 512 (minimum required for vmxnet3\n");
- port_cfg->n_txd = 512;
- }
+ if (port_cfg->n_txd < port_cfg->min_tx_desc) {
+ plog_info("\t\tNumber of TX descriptors is set to %d (minimum required for %s\n", port_cfg->min_tx_desc, port_cfg->short_name);
+ port_cfg->n_txd = port_cfg->min_tx_desc;
+ }
+
+ if (port_cfg->n_rxd < port_cfg->min_rx_desc) {
+ plog_info("\t\tNumber of RX descriptors is set to %d (minimum required for %s\n", port_cfg->min_rx_desc, port_cfg->short_name);
+ port_cfg->n_rxd = port_cfg->min_rx_desc;
+ }
+
+ if (port_cfg->n_txd > port_cfg->max_tx_desc) {
+ plog_info("\t\tNumber of TX descriptors is set to %d (maximum required for %s\n", port_cfg->max_tx_desc, port_cfg->short_name);
+ port_cfg->n_txd = port_cfg->max_tx_desc;
+ }
+
+ if (port_cfg->n_rxd > port_cfg->max_rx_desc) {
+ plog_info("\t\tNumber of RX descriptors is set to %d (maximum required for %s\n", port_cfg->max_rx_desc, port_cfg->short_name);
+ port_cfg->n_rxd = port_cfg->max_rx_desc;
}
ret = rte_eth_dev_configure(port_id, port_cfg->n_rxq,
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.h b/VNFs/DPPD-PROX/prox_port_cfg.h
index c025c03..6a02cf0 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.h
+++ b/VNFs/DPPD-PROX/prox_port_cfg.h
@@ -72,6 +72,10 @@ struct prox_port_cfg {
} capabilities;
uint32_t max_rx_pkt_len;
uint32_t min_rx_bufsize;
+ uint16_t min_rx_desc;
+ uint16_t max_rx_desc;
+ uint16_t min_tx_desc;
+ uint16_t max_tx_desc;
uint32_t nb_mc_addr;
struct ether_addr mc_addr[NB_MCAST_ADDR];
};