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
afc75f6
..
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");
@@
-547,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:
@@
-1002,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",
@@
-1050,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;
@@
-1099,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)
@@
-1495,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;
@@
-1530,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;