aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/test-pipeline/init.c2
-rw-r--r--app/test-pmd/parameters.c8
-rw-r--r--app/test-pmd/testpmd.c87
-rw-r--r--app/test/test_cmdline_num.c1
-rw-r--r--app/test/test_kni.c2
-rw-r--r--app/test/test_link_bonding.c4
-rw-r--r--app/test/test_link_bonding_mode4.c2
-rw-r--r--app/test/test_link_bonding_rssconf.c4
-rw-r--r--app/test/test_mempool.c5
-rw-r--r--app/test/test_pmd_perf.c2
10 files changed, 49 insertions, 68 deletions
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index aef082fc..00dbc279 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -105,7 +105,7 @@ static struct rte_eth_conf port_conf = {
.hw_ip_checksum = 1, /* IP checksum offload enabled */
.hw_vlan_filter = 0, /* VLAN filtering disabled */
.jumbo_frame = 0, /* Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /* CRC stripped by hardware */
+ .hw_strip_crc = 1, /* CRC stripped by hardware */
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 08e5a76f..2f969539 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -148,7 +148,7 @@ usage(char* progname)
"the packet will be enqueued into the rx drop-queue. "
"If the drop-queue doesn't exist, the packet is dropped. "
"By default drop-queue=127.\n");
- printf(" --crc-strip: enable CRC stripping by hardware.\n");
+ printf(" --disable-crc-strip: disable CRC stripping by hardware.\n");
printf(" --enable-lro: enable large receive offload.\n");
printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
printf(" --disable-hw-vlan: disable hardware vlan.\n");
@@ -525,7 +525,7 @@ launch_args_parse(int argc, char** argv)
{ "pkt-filter-report-hash", 1, 0, 0 },
{ "pkt-filter-size", 1, 0, 0 },
{ "pkt-filter-drop-queue", 1, 0, 0 },
- { "crc-strip", 0, 0, 0 },
+ { "disable-crc-strip", 0, 0, 0 },
{ "enable-lro", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
{ "enable-scatter", 0, 0, 0 },
@@ -765,8 +765,8 @@ launch_args_parse(int argc, char** argv)
"drop queue %d invalid - must"
"be >= 0 \n", n);
}
- if (!strcmp(lgopts[opt_idx].name, "crc-strip"))
- rx_mode.hw_strip_crc = 1;
+ if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip"))
+ rx_mode.hw_strip_crc = 0;
if (!strcmp(lgopts[opt_idx].name, "enable-lro"))
rx_mode.enable_lro = 1;
if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index a0332c26..ce48ca03 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -283,7 +283,7 @@ struct rte_eth_rxmode rx_mode = {
.hw_vlan_strip = 1, /**< VLAN strip enabled. */
.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled. */
- .hw_strip_crc = 0, /**< CRC stripping by hardware disabled. */
+ .hw_strip_crc = 1, /**< CRC stripping by hardware enabled. */
};
struct rte_fdir_conf fdir_conf = {
@@ -518,34 +518,6 @@ init_config(void)
fwd_lcores[lc_id]->cpuid_idx = lc_id;
}
- /*
- * Create pools of mbuf.
- * If NUMA support is disabled, create a single pool of mbuf in
- * socket 0 memory by default.
- * Otherwise, create a pool of mbuf in the memory of sockets 0 and 1.
- *
- * Use the maximum value of nb_rxd and nb_txd here, then nb_rxd and
- * nb_txd can be configured at run time.
- */
- if (param_total_num_mbufs)
- nb_mbuf_per_pool = param_total_num_mbufs;
- else {
- nb_mbuf_per_pool = RTE_TEST_RX_DESC_MAX + (nb_lcores * mb_mempool_cache)
- + RTE_TEST_TX_DESC_MAX + MAX_PKT_BURST;
-
- if (!numa_support)
- nb_mbuf_per_pool =
- (nb_mbuf_per_pool * RTE_MAX_ETHPORTS);
- }
-
- if (!numa_support) {
- if (socket_num == UMA_NO_CONFIG)
- mbuf_pool_create(mbuf_data_size, nb_mbuf_per_pool, 0);
- else
- mbuf_pool_create(mbuf_data_size, nb_mbuf_per_pool,
- socket_num);
- }
-
FOREACH_PORT(pid, ports) {
port = &ports[pid];
rte_eth_dev_info_get(pid, &port->dev_info);
@@ -568,20 +540,37 @@ init_config(void)
port->need_reconfig_queues = 1;
}
+ /*
+ * Create pools of mbuf.
+ * If NUMA support is disabled, create a single pool of mbuf in
+ * socket 0 memory by default.
+ * Otherwise, create a pool of mbuf in the memory of sockets 0 and 1.
+ *
+ * Use the maximum value of nb_rxd and nb_txd here, then nb_rxd and
+ * nb_txd can be configured at run time.
+ */
+ if (param_total_num_mbufs)
+ nb_mbuf_per_pool = param_total_num_mbufs;
+ else {
+ nb_mbuf_per_pool = RTE_TEST_RX_DESC_MAX +
+ (nb_lcores * mb_mempool_cache) +
+ RTE_TEST_TX_DESC_MAX + MAX_PKT_BURST;
+ nb_mbuf_per_pool *= RTE_MAX_ETHPORTS;
+ }
+
if (numa_support) {
uint8_t i;
- unsigned int nb_mbuf;
- if (param_total_num_mbufs)
- nb_mbuf_per_pool = nb_mbuf_per_pool/nb_ports;
-
- for (i = 0; i < max_socket; i++) {
- nb_mbuf = (nb_mbuf_per_pool * RTE_MAX_ETHPORTS);
- if (nb_mbuf)
- mbuf_pool_create(mbuf_data_size,
- nb_mbuf,i);
- }
+ for (i = 0; i < max_socket; i++)
+ mbuf_pool_create(mbuf_data_size, nb_mbuf_per_pool, i);
+ } else {
+ if (socket_num == UMA_NO_CONFIG)
+ mbuf_pool_create(mbuf_data_size, nb_mbuf_per_pool, 0);
+ else
+ mbuf_pool_create(mbuf_data_size, nb_mbuf_per_pool,
+ socket_num);
}
+
init_port_config();
/*
@@ -1829,24 +1818,13 @@ init_port_config(void)
port->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0;
}
- if (port->dcb_flag == 0 && port->dev_info.max_vfs == 0) {
+ if (port->dcb_flag == 0) {
if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
else
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
}
- if (port->dev_info.max_vfs != 0) {
- if (port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
- port->dev_conf.rxmode.mq_mode =
- ETH_MQ_RX_VMDQ_RSS;
- else
- port->dev_conf.rxmode.mq_mode =
- ETH_MQ_RX_NONE;
-
- port->dev_conf.txmode.mq_mode = ETH_MQ_TX_NONE;
- }
-
rxtx_port_config(port);
rte_eth_macaddr_get(pid, &port->eth_addr);
@@ -1938,9 +1916,9 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
rx_conf->nb_tcs = num_tcs;
tx_conf->nb_tcs = num_tcs;
- for (i = 0; i < num_tcs; i++) {
- rx_conf->dcb_tc[i] = i;
- tx_conf->dcb_tc[i] = i;
+ for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
+ rx_conf->dcb_tc[i] = i % num_tcs;
+ tx_conf->dcb_tc[i] = i % num_tcs;
}
eth_conf->rxmode.mq_mode = ETH_MQ_RX_DCB_RSS;
eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_hf;
@@ -2140,6 +2118,7 @@ main(int argc, char** argv)
start_packet_forwarding(0);
}
prompt();
+ pmd_test_exit();
} else
#endif
{
diff --git a/app/test/test_cmdline_num.c b/app/test/test_cmdline_num.c
index 04263d39..e8f60cfa 100644
--- a/app/test/test_cmdline_num.c
+++ b/app/test/test_cmdline_num.c
@@ -315,6 +315,7 @@ can_parse_signed(int64_t expected_result, enum cmdline_numtype type)
case UINT64:
if (expected_result < 0)
return 0;
+ break;
case INT8:
if (expected_result > INT8_MAX || expected_result < INT8_MIN)
return 0;
diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index 309741cb..db17fdf3 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -92,7 +92,7 @@ static const struct rte_eth_conf port_conf = {
.hw_ip_checksum = 0,
.hw_vlan_filter = 0,
.jumbo_frame = 0,
- .hw_strip_crc = 0,
+ .hw_strip_crc = 1,
},
.txmode = {
.mq_mode = ETH_DCB_NONE,
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 32296604..52d2d052 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -172,7 +172,7 @@ struct rte_eth_rxmode rx_mode = {
.hw_vlan_strip = 1, /**< VLAN strip enabled. */
.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled. */
- .hw_strip_crc = 0, /**< CRC stripping by hardware disabled. */
+ .hw_strip_crc = 1, /**< CRC stripping by hardware enabled. */
};
struct rte_fdir_conf fdir_conf = {
@@ -191,7 +191,7 @@ static struct rte_eth_conf default_pmd_conf = {
.hw_ip_checksum = 0, /**< IP checksum offload enabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
+ .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index 53caa3e9..dc339735 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -143,7 +143,7 @@ static struct rte_eth_conf default_pmd_conf = {
.hw_ip_checksum = 0, /**< IP checksum offload enabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
+ .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 34f1c166..e11da9bf 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -116,7 +116,7 @@ static struct rte_eth_conf default_pmd_conf = {
.hw_ip_checksum = 0, /**< IP checksum offload enabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
+ .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -133,7 +133,7 @@ static struct rte_eth_conf rss_pmd_conf = {
.hw_ip_checksum = 0, /**< IP checksum offload enabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
+ .hw_strip_crc = 1, /**< CRC stripped by hardware */
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index b9880b32..715b250c 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -509,6 +509,7 @@ walk_cb(struct rte_mempool *mp, void *userdata __rte_unused)
static int
test_mempool(void)
{
+ int ret = -1;
struct rte_mempool *mp_cache = NULL;
struct rte_mempool *mp_nocache = NULL;
struct rte_mempool *mp_stack = NULL;
@@ -607,13 +608,13 @@ test_mempool(void)
rte_mempool_list_dump(stdout);
- return 0;
+ ret = 0;
err:
rte_mempool_free(mp_nocache);
rte_mempool_free(mp_cache);
rte_mempool_free(mp_stack);
- return -1;
+ return ret;
}
REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index e055aa07..1ffd65a5 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -100,7 +100,7 @@ static struct rte_eth_conf port_conf = {
.hw_vlan_strip = 0, /**< VLAN strip enabled. */
.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 0, /**< CRC stripped by hardware */
+ .hw_strip_crc = 1, /**< CRC stripped by hardware */
.enable_scatter = 0, /**< scatter rx disabled */
},
.txmode = {