From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id CA8F7FE5 for ; Tue, 21 Feb 2017 11:17:14 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2017 02:17:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,189,1484035200"; d="scan'208";a="227857003" Received: from silpixa00397515.ir.intel.com (HELO silpixa00397515.ger.corp.intel.com) ([10.237.223.14]) by fmsmga004.fm.intel.com with ESMTP; 21 Feb 2017 02:17:12 -0800 From: David Hunt To: dev@dpdk.org Cc: bruce.richardson@intel.com Date: Tue, 21 Feb 2017 03:17:36 +0000 Message-Id: <1487647073-129064-1-git-send-email-david.hunt@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485163480-156507-2-git-send-email-david.hunt@intel.com> References: <1485163480-156507-2-git-send-email-david.hunt@intel.com> Subject: [dpdk-dev] [PATCH v7 0/17] distributor library performance enhancements 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: Tue, 21 Feb 2017 10:17:15 -0000 This patch aims to improve the throughput of the distributor library. It uses a similar handshake mechanism to the previous version of the library, in that bits are used to indicate when packets are ready to be sent to a worker and ready to be returned from a worker. One main difference is that instead of sending one packet in a cache line, it makes use of the 7 free spaces in the same cache line in order to send up to 8 packets at a time to/from a worker. The flow matching algorithm has had significant re-work, and now keeps an array of inflight flows and an array of backlog flows, and matches incoming flows to the inflight/backlog flows of all workers so that flow pinning to workers can be maintained. The Flow Match algorithm has both scalar and a vector versions, and a function pointer is used to select the post appropriate function at run time, depending on the presence of the SSE2 cpu flag. On non-x86 platforms, the the scalar match function is selected, which should still gives a good boost in performance over the non-burst API. v2 changes: * Created a common distributor_priv.h header file with common definitions and structures. * Added a scalar version so it can be built and used on machines without sse2 instruction set * Added unit autotests * Added perf autotest v3 changes: * Addressed mailing list review comments * Test code removal * Split out SSE match into separate file to facilitate NEON addition * Cleaned up conditional compilation flags for SSE2 * Addressed c99 style compilation errors * rebased on latest head (Jan 2 2017, Happy New Year to all) v4 changes: * fixed issue building shared libraries v5 changes: * Removed some un-needed code around retries in worker API calls * Cleanup due to review comments on mailing list * Cleanup of non-x86 platform compilation, fallback to scalar match v6 changes: * Fixed intermittent segfault where num pkts not divisible by BURST_SIZE * Cleanup due to review comments on mailing list * Renamed _priv.h to _private.h. v7 changes: * Reorganised patch so there's a more natural progression in the changes, and divided them down into easier to review chunks. * Previous versions of this patch set were effectively two APIs. We now have a single API. Legacy functionality can be used by by using the rte_distributor_create API call with the RTE_DISTRIBUTOR_SINGLE flag when creating a distributor instance. * Added symbol versioning for old API so that ABI is preserved. Notes: Apps must now work in bursts, as up to 8 are given to a worker at a time For performance in matching, Flow ID's are 15-bits If 32 bits Flow IDs are required, use the packet-at-a-time (SINGLE) mode. Performance Gains 2.2GHz Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz 2 x XL710 40GbE NICS to 2 x 40Gbps traffic generator channels 64b packets separate cores for rx, tx, distributor 1 worker - 4.8x 4 workers - 2.9x 8 workers - 1.8x 12 workers - 2.1x 16 workers - 1.8x [01/17] lib: rename legacy distributor lib files [02/17] lib: symbol versioning of functions in distributor [03/17] lib: create rte_distributor_private.h [04/17] lib: add new burst oriented distributor structs [05/17] lib: add new distributor code [06/17] lib: add SIMD flow matching to distributor [07/17] lib: apply symbol versioning to distibutor lib [08/17] test: change params to distributor autotest [09/17] test: switch distributor test over to burst API [10/17] test: test single and burst distributor API [11/17] test: add perf test for distributor burst mode [12/17] example: add extra stats to distributor sample [13/17] sample: distributor: wait for ports to come up [14/17] sample: switch to new distributor API [15/17] lib: make v20 header file private [16/17] doc: distributor library changes for new burst api [17/17] maintainers: add to distributor lib maintainers