ethdev: support flow aging
authorDong Zhou <dongz@mellanox.com>
Tue, 21 Apr 2020 10:11:38 +0000 (13:11 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 15:34:05 +0000 (17:34 +0200)
commit44bf3c796be3f747eba5d4904d93614ff300e688
tree3783300d65e64bf27d0c28cf229710fac3c7812d
parentd53a513aedab1b4d2405ccb1157cd0b9f16f8afb
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 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.

The new event type addition in the enum is flagged as an ABI breakage,
so an ignore rule is added for these reasons:
- It is not changing value of existing types (except MAX)
- The new value is not used by existing API if the event is not
  registered
In general, it is safe adding new ethdev event types at the end of the
enum, because of event callback registration mechanism.

Signed-off-by: Dong Zhou <dongz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Matan Azrad <matan@mellanox.com>
app/test-pmd/cmdline_flow.c
devtools/libabigail.abignore
doc/guides/prog_guide/rte_flow.rst
doc/guides/rel_notes/release_20_05.rst
lib/librte_ethdev/rte_ethdev.h
lib/librte_ethdev/rte_ethdev_version.map
lib/librte_ethdev/rte_flow.c
lib/librte_ethdev/rte_flow.h
lib/librte_ethdev/rte_flow_driver.h