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/thunderx/base: add functions to store qsets
[dpdk.git]
/
app
/
test-pmd
/
parameters.c
diff --git
a/app/test-pmd/parameters.c
b/app/test-pmd/parameters.c
index
fe78723
..
08e5a76
100644
(file)
--- a/
app/test-pmd/parameters.c
+++ b/
app/test-pmd/parameters.c
@@
-1,7
+1,7
@@
/*-
* BSD LICENSE
*
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-201
4
Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-201
6
Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-63,7
+63,6
@@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_ring.h>
#include <rte_mempool.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
#include <rte_mempool.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
@@
-150,6
+149,7
@@
usage(char* progname)
"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");
"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(" --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");
printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
printf(" --disable-hw-vlan: disable hardware vlan.\n");
printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
@@
-191,7
+191,8
@@
usage(char* progname)
"(0 <= mapping <= %d).\n", RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
printf(" --no-flush-rx: Don't flush RX streams before forwarding."
" Used mainly with PCAP drivers.\n");
"(0 <= mapping <= %d).\n", RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
printf(" --no-flush-rx: Don't flush RX streams before forwarding."
" Used mainly with PCAP drivers.\n");
- printf(" --txpkts=X[,Y]*: set TX segment sizes.\n");
+ printf(" --txpkts=X[,Y]*: set TX segment sizes"
+ " or total packet length.\n");
printf(" --disable-link-check: disable check on link status when "
"starting/stopping ports.\n");
}
printf(" --disable-link-check: disable check on link status when "
"starting/stopping ports.\n");
}
@@
-525,7
+526,9
@@
launch_args_parse(int argc, char** argv)
{ "pkt-filter-size", 1, 0, 0 },
{ "pkt-filter-drop-queue", 1, 0, 0 },
{ "crc-strip", 0, 0, 0 },
{ "pkt-filter-size", 1, 0, 0 },
{ "pkt-filter-drop-queue", 1, 0, 0 },
{ "crc-strip", 0, 0, 0 },
+ { "enable-lro", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
+ { "enable-scatter", 0, 0, 0 },
{ "disable-hw-vlan", 0, 0, 0 },
{ "disable-hw-vlan-filter", 0, 0, 0 },
{ "disable-hw-vlan-strip", 0, 0, 0 },
{ "disable-hw-vlan", 0, 0, 0 },
{ "disable-hw-vlan-filter", 0, 0, 0 },
{ "disable-hw-vlan-strip", 0, 0, 0 },
@@
-707,12
+710,17
@@
launch_args_parse(int argc, char** argv)
RTE_FDIR_MODE_SIGNATURE;
else if (!strcmp(optarg, "perfect"))
fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
RTE_FDIR_MODE_SIGNATURE;
else if (!strcmp(optarg, "perfect"))
fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
+ else if (!strcmp(optarg, "perfect-mac-vlan"))
+ fdir_conf.mode = RTE_FDIR_MODE_PERFECT_MAC_VLAN;
+ else if (!strcmp(optarg, "perfect-tunnel"))
+ fdir_conf.mode = RTE_FDIR_MODE_PERFECT_TUNNEL;
else if (!strcmp(optarg, "none"))
fdir_conf.mode = RTE_FDIR_MODE_NONE;
else
rte_exit(EXIT_FAILURE,
"pkt-mode-invalid %s invalid - must be: "
else if (!strcmp(optarg, "none"))
fdir_conf.mode = RTE_FDIR_MODE_NONE;
else
rte_exit(EXIT_FAILURE,
"pkt-mode-invalid %s invalid - must be: "
- "none, signature or perfect\n",
+ "none, signature, perfect, perfect-mac-vlan"
+ " or perfect-tunnel\n",
optarg);
}
if (!strcmp(lgopts[opt_idx].name,
optarg);
}
if (!strcmp(lgopts[opt_idx].name,
@@
-759,6
+767,10
@@
launch_args_parse(int argc, char** argv)
}
if (!strcmp(lgopts[opt_idx].name, "crc-strip"))
rx_mode.hw_strip_crc = 1;
}
if (!strcmp(lgopts[opt_idx].name, "crc-strip"))
rx_mode.hw_strip_crc = 1;
+ if (!strcmp(lgopts[opt_idx].name, "enable-lro"))
+ rx_mode.enable_lro = 1;
+ if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))
+ rx_mode.enable_scatter = 1;
if (!strcmp(lgopts[opt_idx].name, "enable-rx-cksum"))
rx_mode.hw_ip_checksum = 1;
if (!strcmp(lgopts[opt_idx].name, "enable-rx-cksum"))
rx_mode.hw_ip_checksum = 1;
@@
-805,22
+817,26
@@
launch_args_parse(int argc, char** argv)
rss_hf = ETH_RSS_UDP;
if (!strcmp(lgopts[opt_idx].name, "rxq")) {
n = atoi(optarg);
rss_hf = ETH_RSS_UDP;
if (!strcmp(lgopts[opt_idx].name, "rxq")) {
n = atoi(optarg);
- if (n >=
1
&& n <= (int) MAX_QUEUE_ID)
+ if (n >=
0
&& n <= (int) MAX_QUEUE_ID)
nb_rxq = (queueid_t) n;
else
rte_exit(EXIT_FAILURE, "rxq %d invalid - must be"
nb_rxq = (queueid_t) n;
else
rte_exit(EXIT_FAILURE, "rxq %d invalid - must be"
- " >=
1
&& <= %d\n", n,
+ " >=
0
&& <= %d\n", n,
(int) MAX_QUEUE_ID);
}
if (!strcmp(lgopts[opt_idx].name, "txq")) {
n = atoi(optarg);
(int) MAX_QUEUE_ID);
}
if (!strcmp(lgopts[opt_idx].name, "txq")) {
n = atoi(optarg);
- if (n >=
1
&& n <= (int) MAX_QUEUE_ID)
+ if (n >=
0
&& n <= (int) MAX_QUEUE_ID)
nb_txq = (queueid_t) n;
else
rte_exit(EXIT_FAILURE, "txq %d invalid - must be"
nb_txq = (queueid_t) n;
else
rte_exit(EXIT_FAILURE, "txq %d invalid - must be"
- " >=
1
&& <= %d\n", n,
+ " >=
0
&& <= %d\n", n,
(int) MAX_QUEUE_ID);
}
(int) MAX_QUEUE_ID);
}
+ if (!nb_rxq && !nb_txq) {
+ rte_exit(EXIT_FAILURE, "Either rx or tx queues should "
+ "be non-zero\n");
+ }
if (!strcmp(lgopts[opt_idx].name, "burst")) {
n = atoi(optarg);
if ((n >= 1) && (n <= MAX_PKT_BURST))
if (!strcmp(lgopts[opt_idx].name, "burst")) {
n = atoi(optarg);
if ((n >= 1) && (n <= MAX_PKT_BURST))