DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Bouyeure <david.bouyeure@fraudbuster.mobi>
To: Matan Azrad <matan@nvidia.com>, Asaf Penso <asafp@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Jack Min <jackmin@nvidia.com>
Subject: Re: [dpdk-dev] rte_flow ageing
Date: Thu, 8 Apr 2021 18:45:37 +0200	[thread overview]
Message-ID: <052ea86a-44f4-f5d4-ba0a-47c024865303@fraudbuster.mobi> (raw)
In-Reply-To: <MW2PR12MB2492E528FFB47182F1C58B89DF749@MW2PR12MB2492.namprd12.prod.outlook.com>

As seen with Matan, there's really a bug preventing to schedule a later 
age event(with /rte_flow_get_aged_flows()/) from the user's callback itself.


I could suggest the following patch:

--- dpdk-21.02/drivers/net/mlx5/mlx5.c    2021-02-14 10:58:34.000000000 
+0100
+++ dpdk-21.02/drivers/net/mlx5/mlx5.c.new    2021-04-08 
18:35:44.124965176 +0200
@@ -554,7 +554,7 @@
              rte_eth_dev_callback_process
(&rte_eth_devices[sh->port[i].devx_ih_port_id],
                  RTE_ETH_EVENT_FLOW_AGED, NULL);
-        age_info->flags = 0;
+        age_info->flags &= ~MLX5_AGE_EVENT_NEW;
      }
  }

Thanks.

On 4/8/21 11:52 AM, Matan Azrad wrote:
>
> Yes, you right for the meaning of MLX5_AGE_TRIGGER.
>
> But why you said it is erased when the callback return?
>
> It is erased when a new aged-out flow is detected by the driver….
>
> Do you have an issue with option 1?
>
> Matan
>
> *From:*David Bouyeure <david.bouyeure@fraudbuster.mobi>
> *Sent:* Thursday, April 8, 2021 10:50 AM
> *To:* Matan Azrad <matan@nvidia.com>; Asaf Penso <asafp@nvidia.com>; 
> dev@dpdk.org
> *Cc:* Jack Min <jackmin@nvidia.com>
> *Subject:* Re: [dpdk-dev] rte_flow ageing
>
> *External email: Use caution opening links or attachments*
>
> Hi Matan,
>
> below are my comments.
>
> Thank you.
>
> On 4/7/21 8:09 PM, Matan Azrad wrote:
>
>     Yes you can call it from the event callback.
>
> Sure, but it won't trigger the event callback as it would for the next 
> aged-out flow(s) if called from outside the callback.
>
>     Yes, MLX5_AGE_TRIGGER probably means that event was sent and no
>     need to send it again in the next aged-out flow.
>
> I don't think so. MLX5_AGE_TRIGGER means 'Do call the callback for 
> next aged-out flow(s)'.
>
>     Erasing it cause new event to be sent in the next aged-out flow...
>
> No, I think it's the reverse.
>
>     I don't understand what is the issue for you in option 1...
>
>     השג את ‏Outlookעבור Android‏
>     <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2FAAb9ysg&data=04%7C01%7Cmatan%40nvidia.com%7C5f8447e5e9a0419d028408d8fa62f35c%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637534650206068346%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vfiLHcxWtpQEh9jqE7wIsGhs%2FZlMN5r4aJtSrvE7OgY%3D&reserved=0>
>
>     ------------------------------------------------------------------------
>
>     *From:*David Bouyeure <david.bouyeure@fraudbuster.mobi>
>     <mailto:david.bouyeure@fraudbuster.mobi>
>     *Sent:* Wednesday, April 7, 2021 7:19:34 PM
>     *To:* Matan Azrad <matan@nvidia.com> <mailto:matan@nvidia.com>;
>     Asaf Penso <asafp@nvidia.com> <mailto:asafp@nvidia.com>;
>     dev@dpdk.org <mailto:dev@dpdk.org> <dev@dpdk.org>
>     <mailto:dev@dpdk.org>
>     *Cc:* Jack Min <jackmin@nvidia.com> <mailto:jackmin@nvidia.com>
>     *Subject:* Re: [dpdk-dev] rte_flow ageing
>
>     *External email: Use caution opening links or attachments*
>
>     Hi Matan, and thanks a lot,
>
>     regarding the mode *1*, I still have a doubt:
>
>          1. Register the AGE event -> in event time to query the
>             aged-out flows by the rte_flow_get_aged_flows API, this
>             call will trigger a new event when new aged-out flow will
>             be detected for the port.(if you don’t call
>             rte_flow_get_aged_flows the event will not be retriggered.)
>
>     You meant calling rte_flow_get_aged_flows() from the event
>     callback I guess...?
>
>     I think this is not working because MLX5_AGE_TRIGGER is erased
>     when the callback returns.
>
>     Anyway, the polling mode is enough to me so far.
>
>     Thanks again.
>
>     Regards.
>
>     On 4/5/21 12:23 PM, Matan Azrad wrote:
>
> -->
>

  reply	other threads:[~2021-04-08 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  8:34 David Bouyeure
2021-03-29 18:02 ` Asaf Penso
2021-03-30 15:45   ` David Bouyeure
2021-04-05 10:23     ` Matan Azrad
2021-04-07 16:19       ` David Bouyeure
2021-04-07 18:09         ` Matan Azrad
2021-04-08  7:50           ` David Bouyeure
2021-04-08  9:52             ` Matan Azrad
2021-04-08 16:45               ` David Bouyeure [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-26 10:42 [dpdk-dev] [PATCH v2 1/3] net/iavf: support GTPU inner IPv4 for FDIR Junfeng Guo
2021-03-26 14:29 ` [dpdk-dev] [PATCH v3 0/3] support GTPU inner IPv4/IPv6 for AVF FDIR Junfeng Guo
2021-03-26 14:29   ` [dpdk-dev] [PATCH v3 1/3] net/iavf: support GTPU inner IPv4 for FDIR Junfeng Guo
2021-03-29  7:50     ` [dpdk-dev] rte_flow ageing David Bouyeure
2021-03-29  8:32       ` David Bouyeure

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=052ea86a-44f4-f5d4-ba0a-47c024865303@fraudbuster.mobi \
    --to=david.bouyeure@fraudbuster.mobi \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=jackmin@nvidia.com \
    --cc=matan@nvidia.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).