[dpdk-dev,v8,1/4] app/testpmd: add isolated mode parameter
Checks
Commit Message
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(+)
Comments
On Wed, Jul 05, 2017 at 11:14:08AM +0300, Vasily Philipov wrote:
> 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>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
On 7/5/2017 9:14 AM, Vasily Philipov wrote:
> 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 },
Can you please document the new option [1] ?
And when you don't know nothing about isolated-mode, this option is not
specific enough. What do you think adding a "flow" or similar keyword to
the option?
[1]
doc/guides/testpmd_app_ug/run_app.rst
On 7/5/2017 4:18 PM, Ferruh Yigit wrote:
> On 7/5/2017 9:14 AM, Vasily Philipov wrote:
>> 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 },
>
> Can you please document the new option [1] ?
>
> And when you don't know nothing about isolated-mode, this option is not
> specific enough. What do you think adding a "flow" or similar keyword to
> the option?
>
> [1]
> doc/guides/testpmd_app_ug/run_app.rst
Overall this testpmd patch seems can be seperated from patchset.
I will check other driver patches in the patchset, can you please send
new version of this patch as a standalone patch?
Thanks,
ferruh
On 7/5/2017 9:14 AM, Vasily Philipov wrote:
> 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>
Patch 2-4/4 applied to dpdk-next-net/master, thanks.
(Patch 1/4, testpmd patch excluded!)
Yes sure, I will send it
> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Wednesday, July 05, 2017 18:32
> To: Vasily Philipov <vasilyf@mellanox.com>; dev@dpdk.org
> Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>; Nélio Laranjeiro
> <nelio.laranjeiro@6wind.com>
> Subject: Re: [dpdk-dev] [PATCH v8 1/4] app/testpmd: add isolated mode
> parameter
>
> On 7/5/2017 4:18 PM, Ferruh Yigit wrote:
> > On 7/5/2017 9:14 AM, Vasily Philipov wrote:
> >> 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 },
> >
> > Can you please document the new option [1] ?
> >
> > And when you don't know nothing about isolated-mode, this option is
> > not specific enough. What do you think adding a "flow" or similar
> > keyword to the option?
> >
> > [1]
> > doc/guides/testpmd_app_ug/run_app.rst
>
> Overall this testpmd patch seems can be seperated from patchset.
>
> I will check other driver patches in the patchset, can you please send new
> version of this patch as a standalone patch?
>
> Thanks,
> ferruh
@@ -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,
@@ -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 */
@@ -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. */