From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 6F323B6D for ; Mon, 28 Nov 2016 11:03:57 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 28 Nov 2016 02:03:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,563,1473145200"; d="scan'208";a="35066650" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 28 Nov 2016 02:03:55 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 28 Nov 2016 02:03:55 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.142]) with mapi id 14.03.0248.002; Mon, 28 Nov 2016 18:03:53 +0800 From: "Pei, Yulong" To: Adrien Mazarguil , "dev@dpdk.org" CC: Thomas Monjalon , "De Lara Guarch, Pablo" , Olivier Matz , "Xing, Beilei" Thread-Topic: [dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow) Thread-Index: AQHSQCXqegeiIyEmT0C3yyGJNnZHW6DuOaVw Date: Mon, 28 Nov 2016 10:03:53 +0000 Message-ID: <188971FCDA171749BED5DA74ABF3E6F03946BD34@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDRiNTdkOTAtYjc1Mi00NTQ3LTliZmItOTg4MGIyN2YxNWY5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5qWE56WW1XbnFGYUxlTFlNRm9UdHZFUTRpQkVLamt5T1hHXC83TGZTU1VnPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow) 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: Mon, 28 Nov 2016 10:03:58 -0000 Hi Adrien, I think that you already did test for your patchset, do you have any auto= mated test scripts can be shared for validation since there did not have te= stpmd flow command documentation yet? Best Regards Yulong Pei -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien Mazarguil Sent: Thursday, November 17, 2016 12:23 AM To: dev@dpdk.org Cc: Thomas Monjalon ; De Lara Guarch, Pablo ; Olivier Matz Subject: [dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow) As previously discussed in RFC v1 [1], RFC v2 [2], with changes described i= n [3] (also pasted below), here is the first non-draft series for this new = API. Its capabilities are so generic that its name had to be vague, it may be ca= lled "Generic flow API", "Generic flow interface" (possibly shortened as "G= FI") to refer to the name of the new filter type, or "rte_flow" from the pr= efix used for its public symbols. I personally favor the latter. While it is currently meant to supersede existing filter types in order for= all PMDs to expose a common filtering/classification interface, it may eve= ntually evolve to cover the following ideas as well: - Rx/Tx offloads configuration through automatic offloads for specific packets, e.g. performing checksum on TCP packets could be expressed with an egress rule with a TCP pattern and a kind of checksum action. - RSS configuration (already defined actually). Could be global or per rule depending on hardware capabilities. - Switching configuration for devices with many physical ports; rules doing both ingress and egress could even be used to completely bypass software if supported by hardware. [1] http://dpdk.org/ml/archives/dev/2016-July/043365.html [2] http://dpdk.org/ml/archives/dev/2016-August/045383.html [3] http://dpdk.org/ml/archives/dev/2016-November/050044.html Changes since RFC v2: - New separate VLAN pattern item (previously part of the ETH definition), found to be much more convenient. - Removed useless "any" field from VF pattern item, the same effect can be achieved by not providing a specification structure. - Replaced bit-fields from the VXLAN pattern item to avoid endianness conversion issues on 24-bit fields. - Updated struct rte_flow_item with a new "last" field to create inclusive ranges. They are defined as the interval between (spec & mask) and (last & mask). All three parameters are optional. - Renamed ID action MARK. - Renamed "queue" fields in actions QUEUE and DUP to "index". - "rss_conf" field in RSS action is now const. - VF action now uses a 32 bit ID like its pattern item counterpart. - Removed redundant struct rte_flow_pattern, API functions now expect struct rte_flow_item lists terminated by END items. - Replaced struct rte_flow_actions for the same reason, with struct rte_flow_action lists terminated by END actions. - Error types (enum rte_flow_error_type) have been updated and the cause pointer in struct rte_flow_error is now const. - Function prototypes (rte_flow_create, rte_flow_validate) have also been updated for clarity. Additions: - Public wrapper functions rte_flow_{validate|create|destroy|flush|query} are now implemented in rte_flow.c, with their symbols exported and versioned. Related filter type RTE_ETH_FILTER_GENERIC has been added. - A separate header (rte_flow_driver.h) has been added for driver-side functionality, in particular struct rte_flow_ops which contains PMD callbacks returned by RTE_ETH_FILTER_GENERIC query. - testpmd now exposes most of this API through the new "flow" command. What remains to be done: - Using endian-aware integer types (rte_beX_t) where necessary for clarity. - API documentation (based on RFC). - testpmd flow command documentation (although context-aware command completion should already help quite a bit in this regard). - A few pattern item / action properties cannot be configured yet (e.g. rss_conf parameter for RSS action) and a few completions (e.g. possible queue IDs) should be added. Adrien Mazarguil (22): ethdev: introduce generic flow API cmdline: add support for dynamic tokens cmdline: add alignment constraint app/testpmd: implement basic support for rte_flow app/testpmd: add flow command app/testpmd: add rte_flow integer support app/testpmd: add flow list command app/testpmd: add flow flush command app/testpmd: add flow destroy command app/testpmd: add flow validate/create commands app/testpmd: add flow query command app/testpmd: add rte_flow item spec handler app/testpmd: add rte_flow item spec prefix length app/testpmd: add rte_flow bit-field support app/testpmd: add item any to flow command app/testpmd: add various items to flow command app/testpmd: add item raw to flow command app/testpmd: add items eth/vlan to flow command app/testpmd: add items ipv4/ipv6 to flow command app/testpmd: add L4 items to flow command app/testpmd: add various actions to flow command app/testpmd: add queue actions to flow command MAINTAINERS | 4 + app/test-pmd/Makefile | 1 + app/test-pmd/cmdline.c | 32 + app/test-pmd/cmdline_flow.c | 2581 +++++++++++++++++++++++++++ app/test-pmd/config.c | 484 +++++ app/test-pmd/csumonly.c | 1 + app/test-pmd/flowgen.c | 1 + app/test-pmd/icmpecho.c | 1 + app/test-pmd/ieee1588fwd.c | 1 + app/test-pmd/iofwd.c | 1 + app/test-pmd/macfwd.c | 1 + app/test-pmd/macswap.c | 1 + app/test-pmd/parameters.c | 1 + app/test-pmd/rxonly.c | 1 + app/test-pmd/testpmd.c | 6 + app/test-pmd/testpmd.h | 27 + app/test-pmd/txonly.c | 1 + lib/librte_cmdline/cmdline_parse.c | 67 +- lib/librte_cmdline/cmdline_parse.h | 21 + lib/librte_ether/Makefile | 3 + lib/librte_ether/rte_eth_ctrl.h | 1 + lib/librte_ether/rte_ether_version.map | 10 + lib/librte_ether/rte_flow.c | 159 ++ lib/librte_ether/rte_flow.h | 947 ++++++++++ lib/librte_ether/rte_flow_driver.h | 177 ++ 25 files changed, 4521 insertions(+), 9 deletions(-) create mode 100644 a= pp/test-pmd/cmdline_flow.c create mode 100644 lib/librte_ether/rte_flow.c = create mode 100644 lib/librte_ether/rte_flow.h create mode 100644 lib/lib= rte_ether/rte_flow_driver.h -- 2.1.4