From: Shahaf Shuler <shahafs@mellanox.com>
To: jingjing.wu@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v4 07/11] app/testpmd: add command line option for Tx offloads
Date: Wed, 10 Jan 2018 11:09:15 +0200 [thread overview]
Message-ID: <c537c87c2e97320f88c5a2a088b64589ff8c49d1.1515575134.git.shahafs@mellanox.com> (raw)
In-Reply-To: <cover.1515575134.git.shahafs@mellanox.com>
This patch adds command line option to set hex value for the ports Tx
offloads flags.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
app/test-pmd/parameters.c | 17 +++++++++++++++--
app/test-pmd/testpmd.c | 4 ++++
app/test-pmd/testpmd.h | 2 ++
doc/guides/testpmd_app_ug/run_app.rst | 5 +++++
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 263651cba..58889420f 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -99,7 +99,7 @@ usage(char* progname)
"--rss-ip | --rss-udp | "
"--rxpt= | --rxht= | --rxwt= | --rxfreet= | "
"--txpt= | --txht= | --txwt= | --txfreet= | "
- "--txrst= | --txqflags= ]\n",
+ "--txrst= | --txqflags= | --tx-offloads ]\n",
progname);
#ifdef RTE_LIBRTE_CMDLINE
printf(" --interactive: run in interactive mode.\n");
@@ -216,6 +216,7 @@ usage(char* progname)
"disable print of designated event or all of them.\n");
printf(" --flow-isolate-all: "
"requests flow API isolated mode on all ports at initialization time.\n");
+ printf(" --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
}
#ifdef RTE_LIBRTE_CMDLINE
@@ -566,8 +567,9 @@ launch_args_parse(int argc, char** argv)
char **argvopt;
int opt_idx;
enum { TX, RX };
- /* Default Rx offloads for all ports. */
+ /* Default offloads for all ports. */
uint64_t rx_offloads = rx_mode.offloads;
+ uint64_t tx_offloads = tx_mode.offloads;
static struct option lgopts[] = {
{ "help", 0, 0, 0 },
@@ -645,6 +647,7 @@ launch_args_parse(int argc, char** argv)
{ "no-rmv-interrupt", 0, 0, 0 },
{ "print-event", 1, 0, 0 },
{ "mask-event", 1, 0, 0 },
+ { "tx-offloads", 1, 0, 0 },
{ 0, 0, 0, 0 },
};
@@ -1116,6 +1119,15 @@ launch_args_parse(int argc, char** argv)
rmv_interrupt = 0;
if (!strcmp(lgopts[opt_idx].name, "flow-isolate-all"))
flow_isolate_all = 1;
+ if (!strcmp(lgopts[opt_idx].name, "tx-offloads")) {
+ char *end = NULL;
+ n = strtoull(optarg, &end, 16);
+ if (n >= 0)
+ tx_offloads = (uint64_t)n;
+ else
+ rte_exit(EXIT_FAILURE,
+ "tx-offloads must be >= 0\n");
+ }
if (!strcmp(lgopts[opt_idx].name, "print-event"))
if (parse_event_printing_config(optarg, 1)) {
rte_exit(EXIT_FAILURE,
@@ -1142,4 +1154,5 @@ launch_args_parse(int argc, char** argv)
/* Set offload configuration from command line parameters. */
rx_mode.offloads = rx_offloads;
+ tx_mode.offloads = tx_offloads;
}
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0087438bc..806548196 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -344,6 +344,8 @@ struct rte_eth_rxmode rx_mode = {
.ignore_offload_bitfield = 1,
};
+struct rte_eth_txmode tx_mode;
+
struct rte_fdir_conf fdir_conf = {
.mode = RTE_FDIR_MODE_NONE,
.pballoc = RTE_FDIR_PBALLOC_64K,
@@ -604,6 +606,8 @@ init_config(void)
RTE_ETH_FOREACH_DEV(pid) {
port = &ports[pid];
+ /* Apply default Tx configuration for all ports */
+ port->dev_conf.txmode = tx_mode;
rte_eth_dev_info_get(pid, &port->dev_info);
if (numa_support) {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index c6baa1066..3e63edfa1 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -395,6 +395,8 @@ extern portid_t fwd_ports_ids[RTE_MAX_ETHPORTS];
extern struct rte_port *ports;
extern struct rte_eth_rxmode rx_mode;
+extern struct rte_eth_txmode tx_mode;
+
extern uint64_t rss_hf;
extern queueid_t nb_rxq;
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 4c0d2cede..fface6f58 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -509,3 +509,8 @@ The commandline options are:
configured flow rules only (see flow command).
Ports that do not support this mode are automatically discarded.
+
+* ``--tx-offloads=0xXXXXXXXX``
+
+ Set the hexadecimal bitmask of TX queue offloads.
+ The default value is 0.
--
2.12.0
next prev parent reply other threads:[~2018-01-10 9:10 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 12:07 [dpdk-dev] [PATCH 0/5] convert testpmd to new ethdev offloads API Shahaf Shuler
2017-11-23 12:08 ` [dpdk-dev] [PATCH 1/5] app/testpmd: convert to new Ethdev " Shahaf Shuler
2017-12-04 22:31 ` Ferruh Yigit
2017-12-05 6:39 ` Shahaf Shuler
2017-12-06 22:57 ` Ferruh Yigit
2017-12-07 7:55 ` Shahaf Shuler
2017-11-23 12:08 ` [dpdk-dev] [PATCH 2/5] app/testpmd: remove txqflags Shahaf Shuler
2017-12-04 22:31 ` Ferruh Yigit
2017-12-05 6:48 ` Shahaf Shuler
2017-12-06 23:04 ` Ferruh Yigit
2017-12-07 7:56 ` Shahaf Shuler
2017-12-12 12:45 ` Maciej Czekaj
2017-12-13 7:25 ` Shahaf Shuler
2017-11-23 12:08 ` [dpdk-dev] [PATCH 3/5] app/testpmd: add command line option for multiseg Shahaf Shuler
2017-11-23 12:08 ` [dpdk-dev] [PATCH 4/5] app/testpmd: add command line option for mbuf fast free Shahaf Shuler
2017-11-23 12:08 ` [dpdk-dev] [PATCH 5/5] app/testpmd: enforce offloads caps Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 00/10] convert testpmd to new ethdev offloads API Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 01/10] app/testpmd: fix port configuration print Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 02/10] app/testpmd: convert to new Ethdev Rx offloads API Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 03/10] app/testpmd: support check of single port stop Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 04/10] app/testpmd: convert to new Ethdev Tx offloads API Shahaf Shuler
2018-01-05 18:11 ` Maciej Czekaj
2018-01-07 15:24 ` Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
2018-01-09 5:32 ` Lu, Wenzhuo
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 06/10] app/testpmd: cleanup internal Tx offloads flags field Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 07/10] app/testpmd: add command line option for Tx offloads Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 08/10] app/testpmd: remove txqflags Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 09/10] app/testpmd: enforce offloads caps Shahaf Shuler
2017-12-12 12:52 ` [dpdk-dev] [PATCH v2 10/10] app/testpmd: fix on the flight VLAN configuration Shahaf Shuler
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 00/10] convert testpmd to new ethdev offloads API Shahaf Shuler
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 01/10] app/testpmd: fix port configuration print Shahaf Shuler
2018-01-05 3:33 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 02/10] app/testpmd: convert to new Ethdev Rx offloads API Shahaf Shuler
2018-01-09 3:05 ` Lu, Wenzhuo
2018-01-19 19:30 ` Patil, Harish
2018-01-20 19:29 ` Shahaf Shuler
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 03/10] app/testpmd: support check of single port stop Shahaf Shuler
2018-01-09 3:20 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new Ethdev Tx offloads API Shahaf Shuler
2018-01-09 5:27 ` Lu, Wenzhuo
2018-01-09 6:47 ` Shahaf Shuler
2018-01-09 7:13 ` Lu, Wenzhuo
2018-01-09 10:02 ` Shahaf Shuler
2018-01-09 11:37 ` Lu, Wenzhuo
2018-01-09 12:14 ` Ananyev, Konstantin
2018-01-10 0:37 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
2018-01-09 5:35 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 06/10] app/testpmd: cleanup internal Tx offloads flags field Shahaf Shuler
2018-01-09 6:30 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 07/10] app/testpmd: add command line option for Tx offloads Shahaf Shuler
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 08/10] app/testpmd: remove txqflags Shahaf Shuler
2018-01-09 7:17 ` Lu, Wenzhuo
2018-01-09 10:07 ` Shahaf Shuler
2018-01-09 11:51 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 09/10] app/testpmd: enforce offloads caps Shahaf Shuler
2018-01-09 7:48 ` Lu, Wenzhuo
2017-12-26 9:44 ` [dpdk-dev] [PATCH v3 10/10] app/testpmd: fix on the flight VLAN configuration Shahaf Shuler
2018-01-09 8:05 ` Lu, Wenzhuo
2018-01-09 10:03 ` Shahaf Shuler
2018-01-09 11:44 ` Lu, Wenzhuo
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 00/11] convert testpmd to new ethdev offloads API Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 01/11] app/testpmd: fix port configuration print Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 02/11] app/testpmd: convert to new Ethdev Rx offloads API Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 03/11] app/testpmd: support check of single port stop Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 04/11] app/testpmd: convert to new Ethdev Tx offloads API Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 05/11] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 06/11] app/testpmd: cleanup internal Tx offloads flags field Shahaf Shuler
2018-01-10 9:09 ` Shahaf Shuler [this message]
2018-01-15 3:06 ` [dpdk-dev] [PATCH v4 07/11] app/testpmd: add command line option for Tx offloads Lu, Wenzhuo
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 08/11] app/testpmd: remove txqflags Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 09/11] app/testpmd: enforce offloads caps Shahaf Shuler
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 10/11] app/testpmd: adjust on the flight VLAN configuration Shahaf Shuler
2018-01-15 3:30 ` Lu, Wenzhuo
2018-01-10 9:09 ` [dpdk-dev] [PATCH v4 11/11] app/testpmd: enable fast free Tx offload by default Shahaf Shuler
2018-01-15 3:33 ` Lu, Wenzhuo
2018-01-15 10:00 ` [dpdk-dev] [PATCH v4 00/11] convert testpmd to new ethdev offloads API Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c537c87c2e97320f88c5a2a088b64589ff8c49d1.1515575134.git.shahafs@mellanox.com \
--to=shahafs@mellanox.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jingjing.wu@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).