From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DE26028F3 for ; Wed, 23 Aug 2017 15:51:21 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 23 Aug 2017 06:51:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,417,1498546800"; d="scan'208";a="121888151" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga004.jf.intel.com with ESMTP; 23 Aug 2017 06:51:19 -0700 From: Bernard Iremonger To: dev@dpdk.org, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, cristian.dumitrescu@intel.com, adrien.mazarguil@6wind.com Cc: Bernard Iremonger Date: Wed, 23 Aug 2017 14:51:09 +0100 Message-Id: <1503496275-27492-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <20170525154634.44352-1-ferruh.yigit@intel.com> References: <20170525154634.44352-1-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v1 0/6] Flow classification library 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: , X-List-Received-Date: Wed, 23 Aug 2017 13:51:22 -0000 DPDK works with packets, but some network administration tools works based on flow information. This library is suggested to provide a helper API to convert packet based information to the flow records. Basically the library consist of APIs to validate, create and destroy the rule and to query the stats. Application should call the query API for all received packets. The library header file has more comments on how library works and provided APIs. Packets to flow conversion will cause performance drop, that is why conversion done on demand by an API call provided by this library. The initial implementation is to provide counting of IPv4 five tuple packets for UDP, TCP and SCTP but the library is planned to be as generic as possible. The flow information provided by this library is missing to implement full IPFIX features, but this is planned to be initial step. Flows are defined using rte_flow, also measurements (actions) are provided by rte_flow. To support more IPFIX measurements, the implementation may require extending rte_flow in addition to extending this library. The library uses both flows and actions defined by rte_flow.h so this library has a dependency on rte_flow.h. For further steps, this library can be expanded to benefit from hardware filters for better performance. It will be more beneficial to shape this library to cover more use cases, please feel free to comment on possible other use cases and desired functionalities. Changes since RFC v3: added rte_flow_classify_validate API. librte_table ACL is used for packet matching. a table_acl parameter has been added to all of the API's an error parameter has been been added to all of the API's This patchset also contains the following: some changes to librte_ether and librte_table. a bug fix to rte_table_acl.c the flow_classify sample application. the flow_classify_autotest unit test program. Changes Bernard Iremonger (5): librte_table: move structure to header file librte_table: fix acl entry add and delete functions librte_ether: initialise IPv4 protocol mask for rte_flow examples/flow_classify: flow classify sample application test: flow classify library unit tests Ferruh Yigit (1): librte_flow_classify: add librte_flow_classify library config/common_base | 6 + doc/api/doxy-api-index.md | 1 + doc/api/doxy-api.conf | 1 + examples/flow_classify/Makefile | 57 ++ examples/flow_classify/flow_classify.c | 625 +++++++++++++++++++++ lib/Makefile | 3 + lib/librte_eal/common/include/rte_log.h | 1 + lib/librte_ether/rte_flow.h | 1 + lib/librte_flow_classify/Makefile | 51 ++ lib/librte_flow_classify/rte_flow_classify.c | 559 ++++++++++++++++++ lib/librte_flow_classify/rte_flow_classify.h | 204 +++++++ lib/librte_flow_classify/rte_flow_classify_parse.c | 546 ++++++++++++++++++ lib/librte_flow_classify/rte_flow_classify_parse.h | 74 +++ .../rte_flow_classify_version.map | 10 + lib/librte_table/rte_table_acl.c | 33 +- lib/librte_table/rte_table_acl.h | 24 + mk/rte.app.mk | 2 +- test/test/Makefile | 1 + test/test/test_flow_classify.c | 487 ++++++++++++++++ test/test/test_flow_classify.h | 184 ++++++ 20 files changed, 2840 insertions(+), 30 deletions(-) create mode 100644 examples/flow_classify/Makefile create mode 100644 examples/flow_classify/flow_classify.c create mode 100644 lib/librte_flow_classify/Makefile create mode 100644 lib/librte_flow_classify/rte_flow_classify.c create mode 100644 lib/librte_flow_classify/rte_flow_classify.h create mode 100644 lib/librte_flow_classify/rte_flow_classify_parse.c create mode 100644 lib/librte_flow_classify/rte_flow_classify_parse.h create mode 100644 lib/librte_flow_classify/rte_flow_classify_version.map create mode 100644 test/test/test_flow_classify.c create mode 100644 test/test/test_flow_classify.h -- 1.9.1