DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] [RFC] ethdev: support flow aging
Date: Thu, 27 Jun 2019 08:26:48 +0000	[thread overview]
Message-ID: <AM0PR0502MB401983EE8C22A21BD5A55FDED2FD0@AM0PR0502MB4019.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <BYAPR18MB2424179FFC4ECEF918B08EA7C8E00@BYAPR18MB2424.namprd18.prod.outlook.com>

Hi all

Thanks Jerin for your comments.
Looks like we agree that the feature is relevant at least for mlx5...

Anyone else has more comments?


From: Jerin Jacob Kollanukkaran 
> > -----Original Message-----
> > From: Matan Azrad <matan@mellanox.com>
> > Sent: Tuesday, June 18, 2019 11:27 AM
> > To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Adrien Mazarguil
> > <adrien.mazarguil@6wind.com>; dev@dpdk.org
> > Subject: [EXT] RE: [PATCH] [RFC] ethdev: support flow aging
> >
> > Hi Jerin
> 
> Hi Matan,
> 
> >
> > From: Jerin Jacob
> > > Sent: Thursday, June 6, 2019 3:16 PM
> > > To: Matan Azrad <matan@mellanox.com>; Adrien Mazarguil
> > > <adrien.mazarguil@6wind.com>; dev@dpdk.org
> > > Subject: RE: [PATCH] [RFC] ethdev: support flow aging
> > >
> > > > -----Original Message-----
> > > > From: Matan Azrad <matan@mellanox.com>
> > > > Sent: Thursday, June 6, 2019 4:22 PM
> > > > To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Adrien
> > > > Mazarguil <adrien.mazarguil@6wind.com>; dev@dpdk.org
> > > > Subject: [EXT] RE: [PATCH] [RFC] ethdev: support flow aging
> > > >
> > > > Hi Jerin
> > >
> > > Hi Matan,
> > >
> > > >
> > > > From: Jerin Jacob
> > > > > > -----Original Message-----
> > > > > > From: dev <dev-bounces@dpdk.org> On Behalf Of Matan Azrad
> > > > > > Sent: Sunday, May 26, 2019 3:48 PM
> > > > > > To: Adrien Mazarguil <adrien.mazarguil@6wind.com>;
> > > > > > dev@dpdk.org
> > > > > > Subject: [dpdk-dev] [PATCH] [RFC] ethdev: support flow aging
> > > > > >
> > > > > > One of the reasons to destroy a flow is the fact that no
> > > > > > packet matches the flow for "timeout" time.
> > > > > > For example, when TCP\UDP sessions are suddenly closed.
> > > > > >
> > > > > > Currently, there is no any dpdk mechanism for flow aging and
> > > > > > the applications use there own ways to detect and destroy
> > > > > > aged-out
> > flows.
> > > > > >
> > > > > > This RFC introduces flow aging APIs to offload the flow aging
> > > > > > task from the application to the port.
> > > > > >
> > > > > > Design:
> > > > > > - A new rte_flow action: RTE_FLOW_ACTION_TYPE_AGE to set the
> > > > timeout
> > > > > > and
> > > > > >   the application flow context for each flow.
> > > > > > - A new ethdev event: RTE_ETH_EVENT_FLOW_AGED for the driver
> > to
> > > > > report
> > > > > >   that there are new aged-out flows.
> > > > > > - A new rte_flow API: rte_flow_get_aged_flows to get the
> > > > > > aged-out
> > > > flows
> > > > > >   contexts from the port.
> > > > > >
> > > > > > By this design each PMD can use its best way to do the aging
> > > > > > with the device offloads supported by its HW.
> > > > > >
> > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > ---
> > > > > >  lib/librte_ethdev/rte_ethdev.h |  1 +
> > > > > >  lib/librte_ethdev/rte_flow.h   | 56
> > > > > > ++++++++++++++++++++++++++++++++++++++++++
> > > > > >  2 files changed, 57 insertions(+)
> > > > > >
> > > > > > diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > > > > b/lib/librte_ethdev/rte_ethdev.h index 1f35e1d..6fc1531 100644
> > > > > > --- a/lib/librte_ethdev/rte_ethdev.h
> > > > > > +++ b/lib/librte_ethdev/rte_ethdev.h
> > > > > > @@ -2771,6 +2771,7 @@ enum rte_eth_event_type {
> > > > > >  	RTE_ETH_EVENT_NEW,      /**< port is probed */
> > > > > >  	RTE_ETH_EVENT_DESTROY,  /**< port is released */
> > > > > >  	RTE_ETH_EVENT_IPSEC,    /**< IPsec offload related event */
> > > > > > +	RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows
> > detected in
> > > > > > the port
> > > > > Does this event supported in HW?
> > > > It depends in the PMD implementation and HW capability.
> > > >
> > > > > Or Are planning to implement with alarm or timer.
> > > > Again, depends in the PMD implementation.
> > > >
> > > > > Just asking because, if none of the HW supports the interrupt
> > > > > then only rte_flow_get_aged_flows sync API be enough()
> > > > Why?
> > >
> > > If none of the HW supports it then application/common code can
> > > periodically polls it.
> > > If mlx5 hw supports it then it fine to have interrupt.
> >
> > Actually MLX5 doesn't support aging fully by HW but the HW can help to
> > do it better.
> > Look, the PMD is the best one to know what is the best way to do aging
> > by its HW even if aging is not fully supported by it.
> > And it may add a meaningful efficiency to the application.
> >
> > > But I think, we need to have means to express a HW/Implementation
> > > does not support its As there may following reasons why drivers
> > > choose to not take timer/alarm path
> > > 1) Some EAL port does not support timer/alarm example: FreeBSD DPDK
> > > port
> > 	OK, but why not to support it for other cases (no FreeBSD port)?
> >
> > > 2) If we need to support a few killo rules then timer/alarm
> > > implementation will be heavy
> >
> > Not sure, Depend in the HW ability.
> 
> Yes when HW does not support at all.
> 
> >
> > > So an option to express un supported event would be fine.
> >
> > Can you explain more what is your intension here (2)?
> 
> To address the case where HW and/or OS(Like FreeBSD) does not support at
> all . In such case, Expressing the unsupported would help application to
> handle in synchronous manner.
> 
> >
> > > > According to the above design this is the way for the PMD to
> > > > notify the application when it has some aged flows ASAP.
> > > > So, if the PMD uses an alarm\timer or any other way to support
> > > > aging action it is better in part of the cases to notify the user
> > > > asynchronically instead of doing polling by the application.
> > > > The idea is to let the application to decide what is better for its usage.
> > > >
> > > > For mlx5 case,
> > > > The plan is to raise this event from an HW interrupt handling(same
> > > > as link event).
> > >
> > > Good to know.
> >
> > The MLX5 plan is still to use timer/alarm and interrupt mechanism to
> > support
> > aging:
> >  The HW help here is the ability to query batch of flows counters
> > asynchronically, so getting the response of the new counters values by
> > an interrupt.
> >
> > The timer\alarm will call to devX operation to read batch of counters
> > asynchronically - fast command.
> > The interrupt handler to catch the response and to check timeout for
> > each flow (no need to copy the counters from the HW memory - the
> > values are in the PMD memory) - if there is a new aged flow - raise the
> event.
> >
> >


  reply	other threads:[~2019-06-27  8:26 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26 10:18 Matan Azrad
2019-06-06 10:24 ` Jerin Jacob Kollanukkaran
2019-06-06 10:51   ` Matan Azrad
2019-06-06 12:15     ` Jerin Jacob Kollanukkaran
2019-06-18  5:56       ` Matan Azrad
2019-06-24  6:26         ` Jerin Jacob Kollanukkaran
2019-06-27  8:26           ` Matan Azrad [this message]
2020-03-16 16:13       ` Stephen Hemminger
2020-03-16 10:22 ` [dpdk-dev] [PATCH v2] " BillZhou
2020-03-16 12:52 ` BillZhou
2020-03-20  6:59   ` Jerin Jacob
2020-03-24 10:18   ` Andrew Rybchenko
2020-04-10  9:46   ` [dpdk-dev] [PATCH] " BillZhou
2020-04-10 10:14     ` Thomas Monjalon
2020-04-13  4:02       ` Bill Zhou
2020-04-10 12:07     ` Andrew Rybchenko
2020-04-10 12:41       ` Jerin Jacob
2020-04-12  9:13     ` Ori Kam
2020-04-12  9:48       ` Matan Azrad
2020-04-14  8:32     ` [dpdk-dev] [PATCH v2] " Dong Zhou
2020-04-14  8:49       ` Ori Kam
2020-04-14  9:23         ` Bill Zhou
2020-04-16 13:32         ` Ferruh Yigit
2020-04-17 22:00       ` Ferruh Yigit
2020-04-17 22:07         ` Stephen Hemminger
2020-04-18  5:04         ` Bill Zhou
2020-04-18  9:44           ` Thomas Monjalon
2020-04-20 14:06             ` Ferruh Yigit
2020-04-20 16:10               ` Thomas Monjalon
2020-04-21 10:04                 ` Ferruh Yigit
2020-04-21 10:09                   ` Thomas Monjalon
2020-04-21 15:59                   ` Andrew Rybchenko
2020-04-21  6:22       ` [dpdk-dev] [PATCH v3] " Bill Zhou
2020-04-21 10:11         ` [dpdk-dev] [PATCH v4] " Bill Zhou
2020-04-21 17:13           ` Ferruh Yigit
2020-04-29 14:50           ` Tom Barbette
2020-04-30  7:36             ` Matan Azrad
2020-04-30  7:49               ` Tom Barbette
2020-04-13 14:53   ` [dpdk-dev] [PATCH 0/2] " Dong Zhou
2020-04-13 14:53     ` [dpdk-dev] [PATCH 1/2] net/mlx5: modify ext-counter memory allocation Dong Zhou
2020-04-13 14:53     ` [dpdk-dev] [PATCH 2/2] net/mlx5: support flow aging Dong Zhou
2020-04-24 10:45     ` [dpdk-dev] [PATCH v2 0/2] " Bill Zhou
2020-04-24 10:45       ` [dpdk-dev] [PATCH v2 1/2] net/mlx5: modify ext-counter memory allocation Bill Zhou
2020-04-24 10:45       ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: support flow aging Bill Zhou
2020-04-26  7:07         ` Suanming Mou
2020-04-29  2:25       ` [dpdk-dev] [PATCH v3 0/2] " Bill Zhou
2020-04-29  2:25         ` [dpdk-dev] [PATCH v3 1/2] net/mlx5: modify ext-counter memory allocation Bill Zhou
2020-04-29  2:25         ` [dpdk-dev] [PATCH v3 2/2] net/mlx5: support flow aging Bill Zhou
2020-05-03  7:41         ` [dpdk-dev] [PATCH v3 0/2] " Matan Azrad
2020-05-03 11:47           ` Raslan Darawsheh

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=AM0PR0502MB401983EE8C22A21BD5A55FDED2FD0@AM0PR0502MB4019.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.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).