DPDK usage discussions
 help / color / Atom feed
* [dpdk-users] COUNT action not supported on mlx5
@ 2020-07-27 18:11 Gerry Wan
  2020-07-27 18:24 ` Erez Ferber
  0 siblings, 1 reply; 5+ messages in thread
From: Gerry Wan @ 2020-07-27 18:11 UTC (permalink / raw)
  To: users

Hello,

I'm trying to query per-flow statistics using RTE_FLOW_ACTION_TYPE_COUNT on
a Mellanox ConnectX-5 port. I tried extending the flow_filtering sample
application with:

struct rte_flow_query_count count = {
    .reset = 1,
    .hits_set = 1,
    .bytes_set = 1,
    .hits = 0,
    .bytes = 0,
};

// set attr, pattern, etc.

action[0].type = RTE_FLOW_ACTION_TYPE_COUNT;
action[0].conf = &count;
action[1].type = RTE_FLOW_ACTION_TYPE_QUEUE;
action[1].conf = &queue;
action[2].type = RTE_FLOW_ACTION_TYPE_END;

The call to rte_flow_validate() returns with -ENOTSUP, saying the flow
cannot be created because the count action is not supported. However, mlx5
documentation (https://doc.dpdk.org/guides/nics/mlx5.html#statistics)
states that it does indeed support attaching count actions. Without the
count action the flow rule configuration works fine.

I am using DPDK-20.05 and MLNX_OFED_LINUX-5.0-2.1.8.0, with a ConnectX-5
Virtual Function (could the VF be the issue?). What can be the cause of
this?

On a related note, is there any plan for mlx5 to support
RTE_FLOW_ITEM_TYPE_RAW?

Thanks,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] COUNT action not supported on mlx5
  2020-07-27 18:11 [dpdk-users] COUNT action not supported on mlx5 Gerry Wan
@ 2020-07-27 18:24 ` Erez Ferber
  2020-07-29 15:26   ` Asaf Penso
  0 siblings, 1 reply; 5+ messages in thread
From: Erez Ferber @ 2020-07-27 18:24 UTC (permalink / raw)
  To: Gerry Wan; +Cc: users

Hi,

One possible condition to get -ENOTSUP is if DevX is disabled on the NIC,
Have you verified DevX is enabled  ?
Please check here :
https://doc.dpdk.org/guides/nics/mlx5.html
---
enable DevX (required by Direct Rules and other features):
UCTX_EN=1
---

With higher log verbosity, you could check in the application
initialization if mlx5 PMD returns"DevX is supported" to make sure.

Regards,
Erez

On Mon, 27 Jul 2020 at 21:12, Gerry Wan <gerryw@stanford.edu> wrote:

> Hello,
>
> I'm trying to query per-flow statistics using RTE_FLOW_ACTION_TYPE_COUNT on
> a Mellanox ConnectX-5 port. I tried extending the flow_filtering sample
> application with:
>
> struct rte_flow_query_count count = {
>     .reset = 1,
>     .hits_set = 1,
>     .bytes_set = 1,
>     .hits = 0,
>     .bytes = 0,
> };
>
> // set attr, pattern, etc.
>
> action[0].type = RTE_FLOW_ACTION_TYPE_COUNT;
> action[0].conf = &count;
> action[1].type = RTE_FLOW_ACTION_TYPE_QUEUE;
> action[1].conf = &queue;
> action[2].type = RTE_FLOW_ACTION_TYPE_END;
>
> The call to rte_flow_validate() returns with -ENOTSUP, saying the flow
> cannot be created because the count action is not supported. However, mlx5
> documentation (https://doc.dpdk.org/guides/nics/mlx5.html#statistics)
> states that it does indeed support attaching count actions. Without the
> count action the flow rule configuration works fine.
>
> I am using DPDK-20.05 and MLNX_OFED_LINUX-5.0-2.1.8.0, with a ConnectX-5
> Virtual Function (could the VF be the issue?). What can be the cause of
> this?
>
> On a related note, is there any plan for mlx5 to support
> RTE_FLOW_ITEM_TYPE_RAW?
>
> Thanks,
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] COUNT action not supported on mlx5
  2020-07-27 18:24 ` Erez Ferber
@ 2020-07-29 15:26   ` Asaf Penso
  2020-07-29 21:52     ` Gerry Wan
  0 siblings, 1 reply; 5+ messages in thread
From: Asaf Penso @ 2020-07-29 15:26 UTC (permalink / raw)
  To: Erez Ferber, Gerry Wan; +Cc: users, Bing Zhao

Hello Gerry,

Regarding your question about RAW. Can you specify your use case?
In high level planning we'll consider supporting it in 21.02.

Regards,
Asaf Penso

-----Original Message-----
From: users <users-bounces@dpdk.org> On Behalf Of Erez Ferber
Sent: Monday, July 27, 2020 9:25 PM
To: Gerry Wan <gerryw@stanford.edu>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] COUNT action not supported on mlx5

Hi,

One possible condition to get -ENOTSUP is if DevX is disabled on the NIC, Have you verified DevX is enabled  ?
Please check here :
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc.dpdk.org%2Fguides%2Fnics%2Fmlx5.html&amp;data=02%7C01%7Casafp%40mellanox.com%7C038afadf61c844e6506808d8325a5eed%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C1%7C637314711005622085&amp;sdata=B0O%2FBe6TlY%2BCRDPXcAFyAaBS701iLV5BO%2B6kcqCs4b0%3D&amp;reserved=0
---
enable DevX (required by Direct Rules and other features):
UCTX_EN=1
---

With higher log verbosity, you could check in the application initialization if mlx5 PMD returns"DevX is supported" to make sure.

Regards,
Erez

On Mon, 27 Jul 2020 at 21:12, Gerry Wan <gerryw@stanford.edu> wrote:

> Hello,
>
> I'm trying to query per-flow statistics using 
> RTE_FLOW_ACTION_TYPE_COUNT on a Mellanox ConnectX-5 port. I tried 
> extending the flow_filtering sample application with:
>
> struct rte_flow_query_count count = {
>     .reset = 1,
>     .hits_set = 1,
>     .bytes_set = 1,
>     .hits = 0,
>     .bytes = 0,
> };
>
> // set attr, pattern, etc.
>
> action[0].type = RTE_FLOW_ACTION_TYPE_COUNT; action[0].conf = &count; 
> action[1].type = RTE_FLOW_ACTION_TYPE_QUEUE; action[1].conf = &queue; 
> action[2].type = RTE_FLOW_ACTION_TYPE_END;
>
> The call to rte_flow_validate() returns with -ENOTSUP, saying the flow 
> cannot be created because the count action is not supported. However, 
> mlx5 documentation 
> (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc
> .dpdk.org%2Fguides%2Fnics%2Fmlx5.html%23statistics&amp;data=02%7C01%7C
> asafp%40mellanox.com%7C038afadf61c844e6506808d8325a5eed%7Ca652971c7d2e
> 4d9ba6a4d149256f461b%7C0%7C1%7C637314711005622085&amp;sdata=pQ7pRgytQB
> %2F1IUGV2SZR5IrGNMZyMdseuECjIw7uuOE%3D&amp;reserved=0)
> states that it does indeed support attaching count actions. Without 
> the count action the flow rule configuration works fine.
>
> I am using DPDK-20.05 and MLNX_OFED_LINUX-5.0-2.1.8.0, with a 
> ConnectX-5 Virtual Function (could the VF be the issue?). What can be 
> the cause of this?
>
> On a related note, is there any plan for mlx5 to support 
> RTE_FLOW_ITEM_TYPE_RAW?
>
> Thanks,
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] COUNT action not supported on mlx5
  2020-07-29 15:26   ` Asaf Penso
@ 2020-07-29 21:52     ` Gerry Wan
  0 siblings, 0 replies; 5+ messages in thread
From: Gerry Wan @ 2020-07-29 21:52 UTC (permalink / raw)
  To: Asaf Penso; +Cc: Erez Ferber, users, Bing Zhao

Hi Asaf,

I want to filter some L7 protocols.
Example use cases could be to send all TLS handshakes to a certain queue,
or drop all DNS queries, and I do not want to rely on port numbers to do so.

From my understanding, the RAW item type does not support ranges in the
specification (I wish it did), but having RAW available will help simulate
some protocols.

Gerry

On Wed, Jul 29, 2020 at 8:26 AM Asaf Penso <asafp@mellanox.com> wrote:

> Hello Gerry,
>
> Regarding your question about RAW. Can you specify your use case?
> In high level planning we'll consider supporting it in 21.02.
>
> Regards,
> Asaf Penso
>
> -----Original Message-----
> From: users <users-bounces@dpdk.org> On Behalf Of Erez Ferber
> Sent: Monday, July 27, 2020 9:25 PM
> To: Gerry Wan <gerryw@stanford.edu>
> Cc: users@dpdk.org
> Subject: Re: [dpdk-users] COUNT action not supported on mlx5
>
> Hi,
>
> One possible condition to get -ENOTSUP is if DevX is disabled on the NIC,
> Have you verified DevX is enabled  ?
> Please check here :
>
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc.dpdk.org%2Fguides%2Fnics%2Fmlx5.html&amp;data=02%7C01%7Casafp%40mellanox.com%7C038afadf61c844e6506808d8325a5eed%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C1%7C637314711005622085&amp;sdata=B0O%2FBe6TlY%2BCRDPXcAFyAaBS701iLV5BO%2B6kcqCs4b0%3D&amp;reserved=0
> ---
> enable DevX (required by Direct Rules and other features):
> UCTX_EN=1
> ---
>
> With higher log verbosity, you could check in the application
> initialization if mlx5 PMD returns"DevX is supported" to make sure.
>
> Regards,
> Erez
>
> On Mon, 27 Jul 2020 at 21:12, Gerry Wan <gerryw@stanford.edu> wrote:
>
> > Hello,
> >
> > I'm trying to query per-flow statistics using
> > RTE_FLOW_ACTION_TYPE_COUNT on a Mellanox ConnectX-5 port. I tried
> > extending the flow_filtering sample application with:
> >
> > struct rte_flow_query_count count = {
> >     .reset = 1,
> >     .hits_set = 1,
> >     .bytes_set = 1,
> >     .hits = 0,
> >     .bytes = 0,
> > };
> >
> > // set attr, pattern, etc.
> >
> > action[0].type = RTE_FLOW_ACTION_TYPE_COUNT; action[0].conf = &count;
> > action[1].type = RTE_FLOW_ACTION_TYPE_QUEUE; action[1].conf = &queue;
> > action[2].type = RTE_FLOW_ACTION_TYPE_END;
> >
> > The call to rte_flow_validate() returns with -ENOTSUP, saying the flow
> > cannot be created because the count action is not supported. However,
> > mlx5 documentation
> > (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc
> > .dpdk.org%2Fguides%2Fnics%2Fmlx5.html%23statistics&amp;data=02%7C01%7C
> > asafp%40mellanox.com%7C038afadf61c844e6506808d8325a5eed%7Ca652971c7d2e
> > 4d9ba6a4d149256f461b%7C0%7C1%7C637314711005622085&amp;sdata=pQ7pRgytQB
> > %2F1IUGV2SZR5IrGNMZyMdseuECjIw7uuOE%3D&amp;reserved=0)
> > states that it does indeed support attaching count actions. Without
> > the count action the flow rule configuration works fine.
> >
> > I am using DPDK-20.05 and MLNX_OFED_LINUX-5.0-2.1.8.0, with a
> > ConnectX-5 Virtual Function (could the VF be the issue?). What can be
> > the cause of this?
> >
> > On a related note, is there any plan for mlx5 to support
> > RTE_FLOW_ITEM_TYPE_RAW?
> >
> > Thanks,
> >
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-users] COUNT action not supported on mlx5
@ 2020-07-23 17:37 Gerry Wan
  0 siblings, 0 replies; 5+ messages in thread
From: Gerry Wan @ 2020-07-23 17:37 UTC (permalink / raw)
  To: users

Hello,

I'm trying to query per-flow statistics using RTE_FLOW_ACTION_TYPE_COUNT on
a Mellanox ConnectX-5 port. I tried extending the flow_filtering sample
application with:

struct rte_flow_query_count count = {
    .reset = 1,
    .hits_set = 1,
    .bytes_set = 1,
    .hits = 0,
    .bytes = 0,
};

// set attr, pattern, etc.

action[0].type = RTE_FLOW_ACTION_TYPE_COUNT;
action[0].conf = &count;
action[1].type = RTE_FLOW_ACTION_TYPE_QUEUE;
action[1].conf = &queue;
action[2].type = RTE_FLOW_ACTION_TYPE_END;

The call to rte_flow_validate() returns with -ENOTSUP, saying the flow
cannot be created because the count action is not supported. However, mlx5
documentation (https://doc.dpdk.org/guides/nics/mlx5.html#statistics)
states that mlx5 does indeed support attaching count actions. Without the
count action the flow rule configuration works fine.

I am using DPDK-20.05 and MLNX_OFED_LINUX-5.0-2.1.8.0, with a ConnectX-5
Virtual Function (could the VF be the issue?). What can be the cause of
this?

On a related note, is there any plan for mlx5 to support
RTE_FLOW_ITEM_TYPE_RAW?

Thanks,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 18:11 [dpdk-users] COUNT action not supported on mlx5 Gerry Wan
2020-07-27 18:24 ` Erez Ferber
2020-07-29 15:26   ` Asaf Penso
2020-07-29 21:52     ` Gerry Wan
  -- strict thread matches above, loose matches on Subject: below --
2020-07-23 17:37 Gerry Wan

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox