From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate3.asicdesigners.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 0B0CD8E58 for ; Thu, 10 Dec 2015 15:01:29 +0100 (CET) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id tBAE1Q5m020688; Thu, 10 Dec 2015 06:01:27 -0800 From: Rahul Lakkireddy To: dev@dpdk.org Date: Thu, 10 Dec 2015 19:31:01 +0530 Message-Id: X-Mailer: git-send-email 2.5.3 Cc: Felix Marti , Kumar Sanghvi , Nirranjan Kirubaharan Subject: [dpdk-dev] [RFC 0/3] ethdev: Enhancements to flow director filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 14:01:30 -0000 This RFC series of patches attempt to extend the flow director filter to add support for Chelsio T5 hardware filtering capabilities. Chelsio T5 supports carrying out filtering in hardware which supports 3 actions to carry out on a packet which hit a filter viz. 1. Action Pass - Packets hitting a filter rule can be directed to a particular RXQ. 2. Action Drop - Packets hitting a filter rule are dropped in h/w. 3. Action Switch - Packets hitting a filter rule can be switched in h/w from one port to another, without involvement of host. Also, the action Switch also supports rewrite of src-mac/dst-mac headers as well as rewrite of vlan headers. It also supports rewrite of IP headers and thereby, supports NAT (Network Address Translation) in h/w. Also, each filter rule can optionally support specifying a mask value i.e. it's possible to create a filter rule for an entire subnet of IP addresses or a range of tcp/udp ports, etc. Patch 1 does the following: - Adds an additional flow rte_eth_pkt_filter_flow which encapsulates ingress ports, l2 payload, vlan and ntuples. - Adds an additional mask for the flow to allow range of values to be matched. - Adds a new behavior 'switch'. - Adds behavior arguments that can be passed when a particular behavior is taken. For ex: in case of action 'switch', pass additional 4-tuple to allow rewriting src/dst ip and port addresses to support NAT'ing. Patch 2 shows testpmd command line example to support packet filter flow. Patch 3 announces ABI change for filtering support. The patch series has been compile tested on all x86 gcc targets and the current fdir filter supported drivers seem to return appropriate error codes when this new flow type and the new action are not supported and hence are not affected. Posting this series mainly for discussion on API change. Once this is agreeable then, I will post the cxgbe PMD changes to use the new API. Rahul Lakkireddy (3): ethdev: add packet filter flow and new behavior switch to fdir testpmd: add an example to show packet filter flow doc: announce ABI change for filtering support app/test-pmd/cmdline.c | 435 ++++++++++++++++++++++++++++++++++- doc/guides/rel_notes/deprecation.rst | 6 + lib/librte_ether/rte_eth_ctrl.h | 112 ++++++++- 3 files changed, 544 insertions(+), 9 deletions(-) -- 2.5.3