git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bnxt: fix null dereference in session cleanup
[dpdk.git]
/
app
/
test-pmd
/
parameters.c
diff --git
a/app/test-pmd/parameters.c
b/app/test-pmd/parameters.c
index
2e67723
..
daf6a31
100644
(file)
--- a/
app/test-pmd/parameters.c
+++ b/
app/test-pmd/parameters.c
@@
-30,7
+30,6
@@
#include <rte_eal.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_eal.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_mempool.h>
#include <rte_interrupts.h>
#include <rte_branch_prediction.h>
#include <rte_mempool.h>
#include <rte_interrupts.h>
@@
-38,9
+37,6
@@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_string_fns.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_string_fns.h>
-#ifdef RTE_NET_BOND
-#include <rte_eth_bond.h>
-#endif
#include <rte_flow.h>
#include "testpmd.h"
#include <rte_flow.h>
#include "testpmd.h"
@@
-114,7
+110,7
@@
usage(char* progname)
"If the drop-queue doesn't exist, the packet is dropped. "
"By default drop-queue=127.\n");
#ifdef RTE_LIB_LATENCYSTATS
"If the drop-queue doesn't exist, the packet is dropped. "
"By default drop-queue=127.\n");
#ifdef RTE_LIB_LATENCYSTATS
- printf(" --latencystats=N: enable latency and jitter statistcs "
+ printf(" --latencystats=N: enable latency and jitter statist
i
cs "
"monitoring on forwarding lcore id N.\n");
#endif
printf(" --disable-crc-strip: disable CRC stripping by hardware.\n");
"monitoring on forwarding lcore id N.\n");
#endif
printf(" --disable-crc-strip: disable CRC stripping by hardware.\n");
@@
-171,6
+167,7
@@
usage(char* progname)
printf(" --tx-ip=src,dst: IP addresses in Tx-only mode\n");
printf(" --tx-udp=src[,dst]: UDP ports in Tx-only mode\n");
printf(" --eth-link-speed: force link speed.\n");
printf(" --tx-ip=src,dst: IP addresses in Tx-only mode\n");
printf(" --tx-udp=src[,dst]: UDP ports in Tx-only mode\n");
printf(" --eth-link-speed: force link speed.\n");
+ printf(" --rxq-share=X: number of ports per shared Rx queue groups, defaults to UINT32_MAX (1 group)\n");
printf(" --disable-link-check: disable check on link status when "
"starting/stopping ports.\n");
printf(" --disable-device-start: do not automatically start port\n");
printf(" --disable-link-check: disable check on link status when "
"starting/stopping ports.\n");
printf(" --disable-device-start: do not automatically start port\n");
@@
-546,29
+543,29
@@
out:
static int
parse_link_speed(int n)
{
static int
parse_link_speed(int n)
{
- uint32_t speed = ETH_LINK_SPEED_FIXED;
+ uint32_t speed =
RTE_
ETH_LINK_SPEED_FIXED;
switch (n) {
case 1000:
switch (n) {
case 1000:
- speed |= ETH_LINK_SPEED_1G;
+ speed |=
RTE_
ETH_LINK_SPEED_1G;
break;
case 10000:
break;
case 10000:
- speed |= ETH_LINK_SPEED_10G;
+ speed |=
RTE_
ETH_LINK_SPEED_10G;
break;
case 25000:
break;
case 25000:
- speed |= ETH_LINK_SPEED_25G;
+ speed |=
RTE_
ETH_LINK_SPEED_25G;
break;
case 40000:
break;
case 40000:
- speed |= ETH_LINK_SPEED_40G;
+ speed |=
RTE_
ETH_LINK_SPEED_40G;
break;
case 50000:
break;
case 50000:
- speed |= ETH_LINK_SPEED_50G;
+ speed |=
RTE_
ETH_LINK_SPEED_50G;
break;
case 100000:
break;
case 100000:
- speed |= ETH_LINK_SPEED_100G;
+ speed |=
RTE_
ETH_LINK_SPEED_100G;
break;
case 200000:
break;
case 200000:
- speed |= ETH_LINK_SPEED_200G;
+ speed |=
RTE_
ETH_LINK_SPEED_200G;
break;
case 100:
case 10:
break;
case 100:
case 10:
@@
-678,6
+675,7
@@
launch_args_parse(int argc, char** argv)
{ "rxpkts", 1, 0, 0 },
{ "txpkts", 1, 0, 0 },
{ "txonly-multi-flow", 0, 0, 0 },
{ "rxpkts", 1, 0, 0 },
{ "txpkts", 1, 0, 0 },
{ "txonly-multi-flow", 0, 0, 0 },
+ { "rxq-share", 2, 0, 0 },
{ "eth-link-speed", 1, 0, 0 },
{ "disable-link-check", 0, 0, 0 },
{ "disable-device-start", 0, 0, 0 },
{ "eth-link-speed", 1, 0, 0 },
{ "disable-link-check", 0, 0, 0 },
{ "disable-device-start", 0, 0, 0 },
@@
-951,7
+949,7
@@
launch_args_parse(int argc, char** argv)
if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
n = atoi(optarg);
if (n >= RTE_ETHER_MIN_LEN)
if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
n = atoi(optarg);
if (n >= RTE_ETHER_MIN_LEN)
-
rx_mode.max_rx_pkt_len = (uint32_t)
n;
+
max_rx_pkt_len =
n;
else
rte_exit(EXIT_FAILURE,
"Invalid max-pkt-len=%d - should be > %d\n",
else
rte_exit(EXIT_FAILURE,
"Invalid max-pkt-len=%d - should be > %d\n",
@@
-1000,13
+998,13
@@
launch_args_parse(int argc, char** argv)
if (!strcmp(lgopts[opt_idx].name, "pkt-filter-size")) {
if (!strcmp(optarg, "64K"))
fdir_conf.pballoc =
if (!strcmp(lgopts[opt_idx].name, "pkt-filter-size")) {
if (!strcmp(optarg, "64K"))
fdir_conf.pballoc =
- RTE_FDIR_PBALLOC_64K;
+ RTE_
ETH_
FDIR_PBALLOC_64K;
else if (!strcmp(optarg, "128K"))
fdir_conf.pballoc =
else if (!strcmp(optarg, "128K"))
fdir_conf.pballoc =
- RTE_FDIR_PBALLOC_128K;
+ RTE_
ETH_
FDIR_PBALLOC_128K;
else if (!strcmp(optarg, "256K"))
fdir_conf.pballoc =
else if (!strcmp(optarg, "256K"))
fdir_conf.pballoc =
- RTE_FDIR_PBALLOC_256K;
+ RTE_
ETH_
FDIR_PBALLOC_256K;
else
rte_exit(EXIT_FAILURE, "pkt-filter-size %s invalid -"
" must be: 64K or 128K or 256K\n",
else
rte_exit(EXIT_FAILURE, "pkt-filter-size %s invalid -"
" must be: 64K or 128K or 256K\n",
@@
-1048,34
+1046,34
@@
launch_args_parse(int argc, char** argv)
}
#endif
if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip"))
}
#endif
if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip"))
- rx_offloads |=
DEV
_RX_OFFLOAD_KEEP_CRC;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_KEEP_CRC;
if (!strcmp(lgopts[opt_idx].name, "enable-lro"))
if (!strcmp(lgopts[opt_idx].name, "enable-lro"))
- rx_offloads |=
DEV
_RX_OFFLOAD_TCP_LRO;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_TCP_LRO;
if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))
if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))
- rx_offloads |=
DEV
_RX_OFFLOAD_SCATTER;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_SCATTER;
if (!strcmp(lgopts[opt_idx].name, "enable-rx-cksum"))
if (!strcmp(lgopts[opt_idx].name, "enable-rx-cksum"))
- rx_offloads |=
DEV
_RX_OFFLOAD_CHECKSUM;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_CHECKSUM;
if (!strcmp(lgopts[opt_idx].name,
"enable-rx-timestamp"))
if (!strcmp(lgopts[opt_idx].name,
"enable-rx-timestamp"))
- rx_offloads |=
DEV
_RX_OFFLOAD_TIMESTAMP;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_TIMESTAMP;
if (!strcmp(lgopts[opt_idx].name, "enable-hw-vlan"))
if (!strcmp(lgopts[opt_idx].name, "enable-hw-vlan"))
- rx_offloads |=
DEV
_RX_OFFLOAD_VLAN;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_VLAN;
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-vlan-filter"))
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-vlan-filter"))
- rx_offloads |=
DEV
_RX_OFFLOAD_VLAN_FILTER;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_VLAN_FILTER;
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-vlan-strip"))
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-vlan-strip"))
- rx_offloads |=
DEV
_RX_OFFLOAD_VLAN_STRIP;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_VLAN_STRIP;
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-vlan-extend"))
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-vlan-extend"))
- rx_offloads |=
DEV
_RX_OFFLOAD_VLAN_EXTEND;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_VLAN_EXTEND;
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-qinq-strip"))
if (!strcmp(lgopts[opt_idx].name,
"enable-hw-qinq-strip"))
- rx_offloads |=
DEV
_RX_OFFLOAD_QINQ_STRIP;
+ rx_offloads |=
RTE_ETH
_RX_OFFLOAD_QINQ_STRIP;
if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
rx_drop_en = 1;
if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
rx_drop_en = 1;
@@
-1097,13
+1095,13
@@
launch_args_parse(int argc, char** argv)
if (!strcmp(lgopts[opt_idx].name, "forward-mode"))
set_pkt_forwarding_mode(optarg);
if (!strcmp(lgopts[opt_idx].name, "rss-ip"))
if (!strcmp(lgopts[opt_idx].name, "forward-mode"))
set_pkt_forwarding_mode(optarg);
if (!strcmp(lgopts[opt_idx].name, "rss-ip"))
- rss_hf = ETH_RSS_IP;
+ rss_hf =
RTE_
ETH_RSS_IP;
if (!strcmp(lgopts[opt_idx].name, "rss-udp"))
if (!strcmp(lgopts[opt_idx].name, "rss-udp"))
- rss_hf = ETH_RSS_UDP;
+ rss_hf =
RTE_
ETH_RSS_UDP;
if (!strcmp(lgopts[opt_idx].name, "rss-level-inner"))
if (!strcmp(lgopts[opt_idx].name, "rss-level-inner"))
- rss_hf |= ETH_RSS_LEVEL_INNERMOST;
+ rss_hf |=
RTE_
ETH_RSS_LEVEL_INNERMOST;
if (!strcmp(lgopts[opt_idx].name, "rss-level-outer"))
if (!strcmp(lgopts[opt_idx].name, "rss-level-outer"))
- rss_hf |= ETH_RSS_LEVEL_OUTERMOST;
+ rss_hf |=
RTE_
ETH_RSS_LEVEL_OUTERMOST;
if (!strcmp(lgopts[opt_idx].name, "rxq")) {
n = atoi(optarg);
if (n >= 0 && check_nb_rxq((queueid_t)n) == 0)
if (!strcmp(lgopts[opt_idx].name, "rxq")) {
n = atoi(optarg);
if (n >= 0 && check_nb_rxq((queueid_t)n) == 0)
@@
-1352,6
+1350,17
@@
launch_args_parse(int argc, char** argv)
}
if (!strcmp(lgopts[opt_idx].name, "txonly-multi-flow"))
txonly_multi_flow = 1;
}
if (!strcmp(lgopts[opt_idx].name, "txonly-multi-flow"))
txonly_multi_flow = 1;
+ if (!strcmp(lgopts[opt_idx].name, "rxq-share")) {
+ if (optarg == NULL) {
+ rxq_share = UINT32_MAX;
+ } else {
+ n = atoi(optarg);
+ if (n >= 0)
+ rxq_share = (uint32_t)n;
+ else
+ rte_exit(EXIT_FAILURE, "rxq-share must be >= 0\n");
+ }
+ }
if (!strcmp(lgopts[opt_idx].name, "no-flush-rx"))
no_flush_rx = 1;
if (!strcmp(lgopts[opt_idx].name, "eth-link-speed")) {
if (!strcmp(lgopts[opt_idx].name, "no-flush-rx"))
no_flush_rx = 1;
if (!strcmp(lgopts[opt_idx].name, "eth-link-speed")) {
@@
-1482,12
+1491,12
@@
launch_args_parse(int argc, char** argv)
if (!strcmp(lgopts[opt_idx].name, "rx-mq-mode")) {
char *end = NULL;
n = strtoul(optarg, &end, 16);
if (!strcmp(lgopts[opt_idx].name, "rx-mq-mode")) {
char *end = NULL;
n = strtoul(optarg, &end, 16);
- if (n >= 0 && n <= ETH_MQ_RX_VMDQ_DCB_RSS)
+ if (n >= 0 && n <=
RTE_
ETH_MQ_RX_VMDQ_DCB_RSS)
rx_mq_mode = (enum rte_eth_rx_mq_mode)n;
else
rte_exit(EXIT_FAILURE,
"rx-mq-mode must be >= 0 and <= %d\n",
rx_mq_mode = (enum rte_eth_rx_mq_mode)n;
else
rte_exit(EXIT_FAILURE,
"rx-mq-mode must be >= 0 and <= %d\n",
- ETH_MQ_RX_VMDQ_DCB_RSS);
+
RTE_
ETH_MQ_RX_VMDQ_DCB_RSS);
}
if (!strcmp(lgopts[opt_idx].name, "record-core-cycles"))
record_core_cycles = 1;
}
if (!strcmp(lgopts[opt_idx].name, "record-core-cycles"))
record_core_cycles = 1;
@@
-1517,6
+1526,12
@@
launch_args_parse(int argc, char** argv)
rte_exit(EXIT_FAILURE, "Command line is incorrect\n");
}
rte_exit(EXIT_FAILURE, "Command line is incorrect\n");
}
+ if (proc_id >= (int)num_procs)
+ rte_exit(EXIT_FAILURE,
+ "The multi-process option '%s(%d)' should be less than '%s(%u)'\n",
+ PARAM_PROC_ID, proc_id,
+ PARAM_NUM_PROCS, num_procs);
+
/* Set offload configuration from command line parameters. */
rx_mode.offloads = rx_offloads;
tx_mode.offloads = tx_offloads;
/* Set offload configuration from command line parameters. */
rx_mode.offloads = rx_offloads;
tx_mode.offloads = tx_offloads;