DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vasily Philipov <vasilyf@mellanox.com>
To: dev@dpdk.org
Cc: Vasily Philipov <vasilyf@mellanox.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: [dpdk-dev] [PATCH v7 1/4] app/testpmd: add isolated mode parameter
Date: Tue,  4 Jul 2017 11:22:48 +0000	[thread overview]
Message-ID: <225679c202aa0bae5c61882aef6c8117a9074029.1499166724.git.vasilyf@mellanox.com> (raw)
Message-ID: <20170704112248.PCfYaAwo1cMQ4opcAbyS7Rus_pTWz4HrS_G0vtSFqB0@z> (raw)
In-Reply-To: <0dca86aa1372d6ff09d0aff01d522c580e0e24ab.1495717153.git.vasilyf@mellanox.com>

Providing this parameter requests flow API isolated mode on all ports at
initialization time. It ensures all traffic is received through the
configured flow rules only (see flow command).

Ports that do not support this mode are automatically discarded.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
---
 app/test-pmd/parameters.c |  3 +++
 app/test-pmd/testpmd.c    | 14 ++++++++++++++
 app/test-pmd/testpmd.h    |  1 +
 3 files changed, 18 insertions(+)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index fbe6284..e313871 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -623,6 +623,7 @@
 		{ "tx-queue-stats-mapping",	1, 0, 0 },
 		{ "rx-queue-stats-mapping",	1, 0, 0 },
 		{ "no-flush-rx",	0, 0, 0 },
+		{ "isolated-mode",	        0, 0, 0 },
 		{ "txpkts",			1, 0, 0 },
 		{ "disable-link-check",		0, 0, 0 },
 		{ "no-lsc-interrupt",		0, 0, 0 },
@@ -1081,6 +1082,8 @@
 				lsc_interrupt = 0;
 			if (!strcmp(lgopts[opt_idx].name, "no-rmv-interrupt"))
 				rmv_interrupt = 0;
+			if (!strcmp(lgopts[opt_idx].name, "isolated-mode"))
+				isolated_mode = 1;
 			if (!strcmp(lgopts[opt_idx].name, "print-event"))
 				if (parse_event_printing_config(optarg, 1)) {
 					rte_exit(EXIT_FAILURE,
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index b3ad83b..864a2a8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -270,6 +270,11 @@ struct fwd_engine * fwd_engines[] = {
 uint8_t no_flush_rx = 0; /* flush by default */
 
 /*
+ * Flow API isolated mode.
+ */
+uint8_t isolated_mode;
+
+/*
  * Avoids to check link status when starting/stopping a port.
  */
 uint8_t no_link_check = 0; /* check by default */
@@ -1425,6 +1430,15 @@ static int eth_event_callback(uint8_t port_id,
 		if (port->need_reconfig > 0) {
 			port->need_reconfig = 0;
 
+			if (isolated_mode) {
+				int ret = port_flow_isolate(pi, 1);
+				if (ret) {
+					printf("Failed to apply isolated"
+					       " mode on port %d\n", pi);
+					return -1;
+				}
+			}
+
 			printf("Configuring Port %d (socket %u)\n", pi,
 					port->socket_id);
 			/* configure port */
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 364502d..d5fc9ad 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -303,6 +303,7 @@ struct queue_stats_mappings {
 extern uint8_t  numa_support; /**< set by "--numa" parameter */
 extern uint16_t port_topology; /**< set by "--port-topology" parameter */
 extern uint8_t no_flush_rx; /**<set by "--no-flush-rx" parameter */
+extern uint8_t isolated_mode; /**<set by "--isolated-mode */
 extern uint8_t  mp_anon; /**< set by "--mp-anon" parameter */
 extern uint8_t no_link_check; /**<set by "--disable-link-check" parameter */
 extern volatile int test_done; /* stop packet forwarding when set to 1. */
-- 
1.8.3.1

  parent reply	other threads:[~2017-07-04 11:29 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 13:02 [dpdk-dev] [PATCH 1/3] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-05-25 13:02 ` [dpdk-dev] [PATCH 2/3] net/mlx4: support for the RSS flow action Vasily Philipov
2017-05-25 13:02 ` [dpdk-dev] [PATCH 3/3] app/testpmd: add isolated mode parameter Vasily Philipov
2017-05-25 14:05 ` [dpdk-dev] [PATCH v2 1/3] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-05-25 14:05 ` [dpdk-dev] [PATCH v2 2/3] net/mlx4: support for the RSS flow action Vasily Philipov
2017-05-25 14:05 ` [dpdk-dev] [PATCH v2 3/3] app/testpmd: add isolated mode parameter Vasily Philipov
2017-05-25 14:10 ` [dpdk-dev] [PATCH v3 1/3] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-05-25 14:10 ` [dpdk-dev] [PATCH v3 2/3] net/mlx4: support for the RSS flow action Vasily Philipov
2017-05-25 14:10 ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: add isolated mode parameter Vasily Philipov
2017-06-04 13:34 ` [dpdk-dev] [PATCH v4 1/4] net/mlx4: RSS parent queues new method maintenance Vasily Philipov
2017-06-04 13:35 ` [dpdk-dev] [PATCH v4 2/4] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-06-04 13:35 ` [dpdk-dev] [PATCH v4 3/4] net/mlx4: support for the RSS flow action Vasily Philipov
2017-06-04 13:35 ` [dpdk-dev] [PATCH v4 4/4] app/testpmd: add isolated mode parameter Vasily Philipov
2017-06-20  1:26   ` Wu, Jingjing
2017-06-21  9:43     ` Vasily Philipov
2017-06-22  1:13       ` Wu, Jingjing
2017-06-26  5:53         ` Vasily Philipov
2017-06-27  8:28         ` Thomas Monjalon
2017-06-29  5:52           ` Wu, Jingjing
2017-06-28 14:03 ` [dpdk-dev] [PATCH v5 1/4] net/mlx4: RSS parent queues new method maintenance Vasily Philipov
2017-06-29 16:51   ` Adrien Mazarguil
2017-06-28 14:03 ` [dpdk-dev] [PATCH v5 2/4] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-06-29 16:52   ` Adrien Mazarguil
2017-06-28 14:03 ` [dpdk-dev] [PATCH v5 3/4] net/mlx4: support for the RSS flow action Vasily Philipov
2017-06-29 16:53   ` Adrien Mazarguil
2017-06-28 14:03 ` [dpdk-dev] [PATCH v5 4/4] app/testpmd: add isolated mode parameter Vasily Philipov
2017-06-29 16:53   ` Adrien Mazarguil
2017-07-02 12:32 ` [dpdk-dev] [PATCH v6 1/4] " Vasily Philipov
2017-07-02 12:32 ` [dpdk-dev] [PATCH v6 2/4] net/mlx4: refactor RSS parent queue allocation Vasily Philipov
2017-07-02 12:32 ` [dpdk-dev] [PATCH v6 3/4] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-07-02 12:32 ` [dpdk-dev] [PATCH v6 4/4] net/mlx4: support flow API RSS action Vasily Philipov
2017-07-04 11:14 ` Vasily Philipov [this message]
2017-07-04 11:22   ` [dpdk-dev] [PATCH v7 1/4] app/testpmd: add isolated mode parameter Vasily Philipov
2017-07-04 15:20   ` Adrien Mazarguil
2017-07-04 11:14 ` [dpdk-dev] [PATCH v7 2/4] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-07-04 11:22   ` Vasily Philipov
2017-07-04 15:20   ` Adrien Mazarguil
2017-07-04 11:14 ` [dpdk-dev] [PATCH v7 3/4] net/mlx4: refactor RSS parent queue allocation Vasily Philipov
2017-07-04 11:22   ` Vasily Philipov
2017-07-04 15:20   ` Adrien Mazarguil
2017-07-04 11:14 ` [dpdk-dev] [PATCH v7 4/4] net/mlx4: support flow API RSS action Vasily Philipov
2017-07-04 11:22   ` Vasily Philipov
2017-07-04 15:21   ` Adrien Mazarguil
2017-07-05  8:14 ` [dpdk-dev] [PATCH v8 1/4] app/testpmd: add isolated mode parameter Vasily Philipov
2017-07-05 14:49   ` Adrien Mazarguil
2017-07-05 15:18   ` Ferruh Yigit
2017-07-05 15:31     ` Ferruh Yigit
2017-07-06  6:03       ` Vasily Philipov
2017-07-05 15:46   ` Ferruh Yigit
2017-07-05  8:14 ` [dpdk-dev] [PATCH v8 2/4] net/mlx4: implement isolated mode from flow API Vasily Philipov
2017-07-05 14:49   ` Adrien Mazarguil
2017-07-05  8:14 ` [dpdk-dev] [PATCH v8 3/4] net/mlx4: refactor RSS parent queue allocation Vasily Philipov
2017-07-05 14:49   ` Adrien Mazarguil
2017-07-05  8:14 ` [dpdk-dev] [PATCH v8 4/4] net/mlx4: support flow API RSS action Vasily Philipov
2017-07-05 14:49   ` Adrien Mazarguil

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=225679c202aa0bae5c61882aef6c8117a9074029.1499166724.git.vasilyf@mellanox.com \
    --to=vasilyf@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    /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).