ethdev: add port ID item and action to flow API
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Wed, 25 Apr 2018 15:28:10 +0000 (17:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 17:00:54 +0000 (18:00 +0100)
commitfc6bbb3f28f2336ecae64d4c2732c09c05a5ab4a
tree2b0f3f2082ddbea09deda810c6400c5f6b9f1605
parente7b657058fc1f7fba33ae7c5dfab6102d5abfeb7
ethdev: add port ID item and action to flow API

RTE_FLOW_ACTION_TYPE_PORT_ID brings the ability to inject matching traffic
into a different device, as identified by its DPDK port ID.

This is normally only supported when the target port ID has some kind of
relationship with the port ID the flow rule is created against, such as
being exposed by a common physical device (e.g. a different port of an
Ethernet switch).

The converse pattern item, RTE_FLOW_ITEM_TYPE_PORT_ID, makes the resulting
flow rule match traffic whose origin is the specified port ID. Note that
specifying a port ID that differs from the one the flow rule is created
against is normally meaningless (if even accepted), but can make sense if
combined with the transfer attribute.

These must not be confused with their PHY_PORT counterparts, which refer to
physical ports using device-specific indices, but unlike PORT_ID are not
necessarily tied to DPDK port IDs.

This breaks ABI compatibility for the following public functions:

- rte_flow_copy()
- rte_flow_create()
- rte_flow_query()
- rte_flow_validate()

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
app/test-pmd/cmdline_flow.c
app/test-pmd/config.c
doc/guides/prog_guide/rte_flow.rst
doc/guides/rel_notes/release_18_05.rst
doc/guides/testpmd_app_ug/testpmd_funcs.rst
lib/librte_ether/rte_flow.c
lib/librte_ether/rte_flow.h