From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <rahul.lakkireddy@chelsio.com>
Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])
 by dpdk.org (Postfix) with ESMTP id 26BAF2C24
 for <dev@dpdk.org>; Sat,  6 Oct 2018 17:42:19 +0200 (CEST)
Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94])
 by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w96FgGge029650;
 Sat, 6 Oct 2018 08:42:17 -0700
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: indranil@chelsio.com, nirranjan@chelsio.com
Date: Sat,  6 Oct 2018 21:11:57 +0530
Message-Id: <1538840520-10369-1-git-send-email-rahul.lakkireddy@chelsio.com>
X-Mailer: git-send-email 2.5.3
In-Reply-To: <cover.1537776502.git.rahul.lakkireddy@chelsio.com>
References: <cover.1537776502.git.rahul.lakkireddy@chelsio.com>
Subject: [dpdk-dev] [PATCH v2 0/3] ethdev: add IP address and TCP/UDP port
	rewrite actions to flow API
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sat, 06 Oct 2018 15:42:20 -0000

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

---
v2:
- Rebased to tip.
- Removed adding actions to app/test-pmd/config.c, to sync with
  rte_flow_conv() changes.

v1 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 +++++++++++++++++
 doc/guides/prog_guide/rte_flow.rst          | 108 ++++++++++++
 doc/guides/rel_notes/release_18_11.rst      |  13 +-
 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 ++++++++++++
 13 files changed, 685 insertions(+), 12 deletions(-)

-- 
2.18.0