[dpdk-dev] [PATCH v2] ethdev: support flow aging

Bill Zhou dongz at mellanox.com
Sat Apr 18 07:04:59 CEST 2020



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: Saturday, April 18, 2020 6:01 AM
> To: Bill Zhou <dongz at mellanox.com>; Ori Kam <orika at mellanox.com>;
> Matan Azrad <matan at mellanox.com>; wenzhuo.lu at intel.com;
> jingjing.wu at intel.com; bernard.iremonger at intel.com;
> john.mcnamara at intel.com; marko.kovacevic at intel.com; Thomas Monjalon
> <thomas at monjalon.net>; arybchenko at solarflare.com
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] ethdev: support flow aging
> 
> On 4/14/2020 9:32 AM, Dong Zhou wrote:
> > 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 not any DPDK mechanism for flow aging and the
> > applications use their own ways to detect and destroy aged-out flows.
> >
> > The flow aging implementation need include:
> > - 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.
> > - Support input flow aging command line in Testpmd.
> >
> > Signed-off-by: Dong Zhou <dongz at mellanox.com>
> 
> <...>
> 
> > --- a/lib/librte_ethdev/rte_ethdev.h
> > +++ b/lib/librte_ethdev/rte_ethdev.h
> > @@ -3015,6 +3015,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 is detected
> */
> >  	RTE_ETH_EVENT_MAX       /**< max value of this enum */
> >  };
> 
> 
> Just recognized that this is failing in ABI check [1], as far as last time for a
> similar enum warning a QAT patch has been dropped, should this need to
> wait for
> 20.11 too?

This patch is commonly used for flow aging, there are 2 other patches have 
implement flow aging in mlx5 driver reply to this patch.
In our schedule, this feature is merged in 20.05 for some customers. Can it
be fixed?

> 
> 
> [1]
>   [C]'function int _rte_eth_dev_callback_process(rte_eth_dev*,
> rte_eth_event_type, void*)' at rte_ethdev.c:4063:1 has some indirect sub-
> type
> changes:
>     parameter 2 of type 'enum rte_eth_event_type' has sub-type changes:
>       type size hasn't changed
>       1 enumerator insertion:
>         'rte_eth_event_type::RTE_ETH_EVENT_FLOW_AGED' value '10'
>       1 enumerator change:
>         'rte_eth_event_type::RTE_ETH_EVENT_MAX' from value '10' to '11' at
> rte_ethdev.h:3008:1



More information about the dev mailing list