[dpdk-dev] [PATCH v3] meter: add meter configuration profile api

Jasvinder Singh jasvinder.singh at intel.com
Mon Jan 8 11:00:43 CET 2018


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 (1):
  lib/librte_meter: add meter configuration profile

 doc/guides/rel_notes/deprecation.rst               |   3 -
 doc/guides/rel_notes/release_18_02.rst             |   2 +-
 .../pipeline/pipeline_flow_actions_be.c            |  25 ++-
 examples/qos_meter/main.c                          |  39 ++++-
 examples/qos_meter/main.h                          |  32 ++--
 lib/librte_meter/Makefile                          |   2 +-
 lib/librte_meter/rte_meter.c                       |  93 ++++++----
 lib/librte_meter/rte_meter.h                       | 195 ++++++++++++++-------
 lib/librte_meter/rte_meter_version.map             |   8 +
 test/test/test_meter.c                             | 194 +++++++++++---------
 10 files changed, 392 insertions(+), 201 deletions(-)

-- 
2.9.3



More information about the dev mailing list