From patchwork Thu Nov 23 16:15:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rybalchenko, Kirill" X-Patchwork-Id: 31603 X-Patchwork-Delegate: helin.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C9DB377A; Thu, 23 Nov 2017 17:15:14 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D4478377A for ; Thu, 23 Nov 2017 17:15:11 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Nov 2017 08:15:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,441,1505804400"; d="scan'208";a="5225935" Received: from silpixa00389036.ir.intel.com (HELO silpixa00389036.ger.corp.intel.com) ([10.237.223.231]) by fmsmga004.fm.intel.com with ESMTP; 23 Nov 2017 08:15:08 -0800 From: Kirill Rybalchenko To: dev@dpdk.org Cc: kirill.rybalchenko@intel.com, andrey.chilikin@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com Date: Thu, 23 Nov 2017 16:15:01 +0000 Message-Id: <1511453701-117320-3-git-send-email-kirill.rybalchenko@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1511453701-117320-1-git-send-email-kirill.rybalchenko@intel.com> References: <1511453701-117320-1-git-send-email-kirill.rybalchenko@intel.com> Subject: [dpdk-dev] [PATCH 2/2] doc: add description of raw mode in flow director in testpmd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add description of raw flow type mode for flow_director_filter command in testpmd. Modify description of flow type parameter for functions set_hash_global_config, set_hash_input_set and set_fdir_input_set Signed-off-by: Kirill Rybalchenko Acked-by: John McNamara --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 9789139..e198767 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -2523,12 +2523,22 @@ Perfect-tunnel filters, the match mode is set by the ``--pkt-filter-mode`` comma The hardware checks a match between the masked fields of the received packets and the programmed filters. The masked fields are for tunnel flow. +* Perfect-raw-flow-type match filters. + The hardware checks a match between the masked fields of the received packets and pre-loaded raw (template) packet. + The masked fields are specified by input sets. + The Flow Director filters can match the different fields for different type of packet: flow type, specific input set per flow type and the flexible payload. The Flow Director can also mask out parts of all of these fields so that filters are only applied to certain fields or parts of the fields. +Note that for raw flow type mode the source and destination fields in the +raw packet buffer need to be presented in a reversed order with respect +to the expected received packets. +For example: IP source and destination addresses or TCP/UDP/SCTP +source and destination ports + Different NICs may have different capabilities, command show port fdir (port_id) can be used to acquire the information. # Commands to add flow director filters of different flow types:: @@ -2575,6 +2585,10 @@ Different NICs may have different capabilities, command show port fdir (port_id) flexbytes (flexbytes_value) (drop|fwd) \ queue (queue_id) fd_id (fd_id_value) + flow_director_filter (port_id) mode raw (add|del|update) flow (flow_id) \ + (drop|fwd) queue (queue_id) fd_id (fd_id_value) \ + packet (packet file name) + For example, to add an ipv4-udp flow type filter:: testpmd> flow_director_filter 0 mode IP add flow ipv4-udp src 2.2.2.3 32 \ @@ -2689,7 +2703,7 @@ Set the global configurations of hash filters:: set_hash_global_config (port_id) (toeplitz|simple_xor|default) \ (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag| \ - ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload) \ + ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|) \ (enable|disable) For example, to enable simple_xor for flow type of ipv6 on port 2:: @@ -2703,8 +2717,8 @@ Set the input set for hash:: set_hash_input_set (port_id) (ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp| \ ipv4-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other| \ - l2_payload) (ovlan|ivlan|src-ipv4|dst-ipv4|src-ipv6|dst-ipv6|ipv4-tos| \ - ipv4-proto|ipv6-tc|ipv6-next-header|udp-src-port|udp-dst-port| \ + l2_payload|) (ovlan|ivlan|src-ipv4|dst-ipv4|src-ipv6|dst-ipv6| \ + ipv4-tos|ipv4-proto|ipv6-tc|ipv6-next-header|udp-src-port|udp-dst-port| \ tcp-src-port|tcp-dst-port|sctp-src-port|sctp-dst-port|sctp-veri-tag| \ udp-key|gre-key|fld-1st|fld-2nd|fld-3rd|fld-4th|fld-5th|fld-6th|fld-7th| \ fld-8th|none) (select|add) @@ -2723,8 +2737,8 @@ Set the input set for flow director:: set_fdir_input_set (port_id) (ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp| \ ipv4-other|ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other| \ - l2_payload) (ivlan|ethertype|src-ipv4|dst-ipv4|src-ipv6|dst-ipv6|ipv4-tos| \ - ipv4-proto|ipv4-ttl|ipv6-tc|ipv6-next-header|ipv6-hop-limits| \ + l2_payload|) (ivlan|ethertype|src-ipv4|dst-ipv4|src-ipv6|dst-ipv6| \ + ipv4-tos|ipv4-proto|ipv4-ttl|ipv6-tc|ipv6-next-header|ipv6-hop-limits| \ tudp-src-port|udp-dst-port|cp-src-port|tcp-dst-port|sctp-src-port| \ sctp-dst-port|sctp-veri-tag|none) (select|add)