On 04/10/2018 07:37 PM, Adrien Mazarguil wrote:
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.mazarg...@6wind.com>
Reviewed-by: Qi Zhang <qi.z.zh...@intel.com>
Cc: "Zhang, Qi Z" <qi.z.zh...@intel.com>
Cc: Declan Doherty <declan.dohe...@intel.com>

---

This patch provides the same functionality and supersedes Qi Zhang's
"ether: add flow action to redirect packet to a port" [1].

The main differences are:

- Action is named PORT_ID instead of PORT.
- Addition of a PORT_ID pattern item.
- More extensive documentation.
- Testpmd support.
- rte_flow_copy() support.

[1] http://dpdk.org/ml/archives/dev/2018-April/094648.html
---
  app/test-pmd/cmdline_flow.c                 | 57 ++++++++++++++++++++++++
  app/test-pmd/config.c                       |  2 +
  doc/guides/prog_guide/rte_flow.rst          | 48 ++++++++++++++++++++
  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  9 ++++
  lib/librte_ether/rte_flow.c                 |  2 +
  lib/librte_ether/rte_flow.h                 | 56 +++++++++++++++++++++++
  6 files changed, 174 insertions(+)

Acked-by: Andrew Rybchenko <arybche...@solarflare.com>

Reply via email to