From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E2DE87D3A for ; Wed, 23 Aug 2017 13:36:29 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 04:36:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,416,1498546800"; d="scan'208";a="893316378" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by FMSMGA003.fm.intel.com with ESMTP; 23 Aug 2017 04:36:24 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net Date: Wed, 23 Aug 2017 12:36:22 +0100 Message-Id: <1503488186-90047-1-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/4] meter: add meter configuration profile api 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 11:36:30 -0000 This patch set adds support for meter configuration profiles. Benefits: simplified configuration procedure, improved performance. Q1: What is the configuration profile and why does it make sense? A1: The configuration profile represents the set of configuration parameters for a given meter object, such as the rates and sizes for the token buckets. The configuration profile concept makes sense when many meter objects share the same configuration, which is the typical usage model: thousands of traffic flows are each individually metered according to just a few service levels (i.e. profiles). Q2: How is the configuration profile improving the performance? A2: The performance improvement is achieved by reducing the memory footprint of a meter object, which results in better cache utilization for the typical case when large arrays of meter objects are used. The internal data structures stored for each meter object contain: a) Constant fields: Low level translation of the configuration parameters that does not change post-configuration. This is really duplicated for all meters that use the same configuration. This is the configuration profile data that is moved away from the meter object. Current size (implementation dependent): srTCM = 32 bytes, trTCM = 32 bytes. b) Variable fields: Time stamps and running counters that change during the on-going traffic metering process. Current size (implementation dependant): srTCM = 24 bytes, trTCM = 32 bytes. Therefore, by moving the constant fields to a separate profile data structure shared by all the meters with the same configuration, the size of the meter object is reduced by ~50%. Cristian Dumitrescu (4): meter: add meter configuration profile test: meter autotest update qos_meter: accommodate meter api changes deprecation: removed the librte_meter notice doc/guides/rel_notes/deprecation.rst | 3 - examples/qos_meter/main.c | 36 ++++--- examples/qos_meter/main.h | 32 ++++--- lib/librte_meter/rte_meter.c | 88 ++++++++++------- lib/librte_meter/rte_meter.h | 170 ++++++++++++++++++++++----------- lib/librte_meter/rte_meter_version.map | 8 ++ test/test/test_meter.c | 138 ++++++++++++++++---------- 7 files changed, 306 insertions(+), 169 deletions(-) -- 2.7.4