diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-10-12 23:36:41 +0200 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2019-10-13 00:38:33 +0200 |
commit | 516ed17e6c6c59ab0ed4cd868a1205455cfe47ef (patch) | |
tree | df88f531f02534ba3f7cb34f52d7faa60717e310 /VNFs | |
parent | b9af66b18bf298f292c62339b0ca41595a3e6b56 (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>
Diffstat (limited to 'VNFs')
-rw-r--r-- | VNFs/DPPD-PROX/config/cgnat.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/l2fwd-4ports.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/l3fwd-4ports.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/mcast.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/nop-rings.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/nop.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/nsh_acl.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/config/nsh_nat.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/defaults.c | 4 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg | 2 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/prox_port_cfg.c | 29 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/prox_port_cfg.h | 4 |
12 files changed, 38 insertions, 17 deletions
diff --git a/VNFs/DPPD-PROX/config/cgnat.cfg b/VNFs/DPPD-PROX/config/cgnat.cfg index 4015d3ab..cae02c7e 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 27fd08e5..70496063 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 3c452b0e..a8cae86f 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 3e673e57..9257c85a 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 000353ad..7513c433 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 757b1eda..2741b41c 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 2893bd4d..6ad1d5fc 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 bb3bf4bc..3ae82c47 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 e1180f1a..3dbb7ece 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 b2f39c9a..04b37c3d 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 a0530c4f..de11dbff 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 c025c03d..6a02cf0b 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]; }; |