Skip to content

ethdev: add IP address and TCP/UDP port rewrite actions to flow API

Rahul Lakkireddy dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Changes since RFC v2 from the cover letter

- Updated comments, help messages, and doc to indicate that IP/TCP/UDP of the outermost headers are modified.
- Updated comments and doc to indicate that a corresponding valid flow pattern item must be specified to offload corresponding header rewrite actions.
- Re-based CXGBE PMD changes in patch 3 to tip.
- Updated all instances of fw_filter_wr to new fw_filter2_wr and removed fw_filter_wr.
- Ensure correct ULP type is set when offloading NAT actions.
- Returning appropriate RTE_FLOW_ERROR_TYPE_ACTION error if a corresponding valid flow pattern item is not found.
- Updated release notes.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ethdev: add flow api actions to modify IP addressesapp/test-pmd/cmdline_flow.c app/test-pmd/config.c doc/guides/prog_guide/rte_flow.rst +4 more+286 -01 reply
2/3ethdev: add flow api actions to modify TCP/UDP port numbersapp/test-pmd/cmdline_flow.c app/test-pmd/config.c doc/guides/prog_guide/rte_flow.rst +4 more+145 -03 replies
3/3net/cxgbe: add flow actions to modify IP and TCP/UDP port addressdoc/guides/rel_notes/release_18_11.rst drivers/net/cxgbe/base/common.h drivers/net/cxgbe/base/t4_msg.h +5 more+265 -120 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchXiaoyu MinOri KamAndrew Rybchenko
SeriesA-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
1/3A-b
2/3A-b A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] ethdev: add IP address and TCP/UDP port rewrite actions to flow API

This series of patches add support for actions:
- SET_IPV4_SRC - set a new IPv4 source address.
- SET_IPV4_DST - set a new IPv4 destination address.
- SET_IPV6_SRC - set a new IPv6 source address.
- SET_IPV6_DST - set a new IPv6 destination address.
- SET_TP_SRC - set a new TCP/UDP source port number.
- SET_TP_DST - set a new TCP/UDP destination port number.

These actions are useful in Network Address Translation use case to edit IP address and TCP/UDP port numbers before switching the packets out to the destination device port.

Patch 1 adds support for IP address rewrite to rte_flow and testpmd.

Patch 2 adds support for TCP/UDP port rewrite to rte_flow and testpmd.

Patch 3 shows CXGBE PMD example to offload these actions to hardware.

Feedback and suggestions will be much appreciated.

Thanks,
Rahul

RFC v1: http://mails.dpdk.org/archives/dev/2018-June/104913.html
RFC v2: http://mails.dpdk.org/archives/dev/2018-August/109672.html

---
Changes since RFC v2:
- Updated comments, help messages, and doc to indicate that IP/TCP/UDP of the outermost headers are modified.
- Updated comments and doc to indicate that a corresponding valid flow pattern item must be specified to offload corresponding header rewrite actions.
- Re-based CXGBE PMD changes in patch 3 to tip.
- Updated all instances of fw_filter_wr to new fw_filter2_wr and removed fw_filter_wr.
- Ensure correct ULP type is set when offloading NAT actions.
- Returning appropriate RTE_FLOW_ERROR_TYPE_ACTION error if a corresponding valid flow pattern item is not found.
- Updated release notes.

Rahul Lakkireddy (3):
ethdev: add flow api actions to modify IP addresses
ethdev: add flow api actions to modify TCP/UDP port numbers net/cxgbe: add flow actions to modify IP and TCP/UDP port address

 app/test-pmd/cmdline_flow.c                 | 156 +++++++++++++++++
 app/test-pmd/config.c                       |  12 ++
 doc/guides/prog_guide/rte_flow.rst          | 108 ++++++++++++
 doc/guides/rel_notes/release_18_11.rst      |  12 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  28 +++
 drivers/net/cxgbe/base/common.h             |   1 +
 drivers/net/cxgbe/base/t4_msg.h             |   1 +
 drivers/net/cxgbe/base/t4fw_interface.h     |  23 ++-
 drivers/net/cxgbe/cxgbe_filter.c            |  37 +++-
 drivers/net/cxgbe/cxgbe_filter.h            |  23 +++
 drivers/net/cxgbe/cxgbe_flow.c              | 178 +++++++++++++++++++-
 drivers/net/cxgbe/cxgbe_main.c              |  10 ++
 lib/librte_ethdev/rte_flow.c                |  12 ++
 lib/librte_ethdev/rte_flow.h                | 107 ++++++++++++
 14 files changed, 696 insertions(+), 12 deletions(-)
Signature · 1 line
2.18.0