Show a cover letter.

GET /api/covers/58127/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 58127,
    "url": "http://patchwork.dpdk.org/api/covers/58127/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/cover/20190828144614.25284-1-honnappa.nagarahalli@arm.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190828144614.25284-1-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190828144614.25284-1-honnappa.nagarahalli@arm.com",
    "date": "2019-08-28T14:46:09",
    "name": "[0/5] lib/ring: templates to support custom element size",
    "submitter": {
        "id": 1045,
        "url": "http://patchwork.dpdk.org/api/people/1045/?format=api",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/cover/20190828144614.25284-1-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 6155,
            "url": "http://patchwork.dpdk.org/api/series/6155/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6155",
            "date": "2019-08-28T14:46:09",
            "name": "lib/ring: templates to support custom element size",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/6155/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/covers/58127/comments/",
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 666E954AE;\n\tWed, 28 Aug 2019 16:46:30 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n\tby dpdk.org (Postfix) with ESMTP id 24BB62952\n\tfor <dev@dpdk.org>; Wed, 28 Aug 2019 16:46:29 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7363A28;\n\tWed, 28 Aug 2019 07:46:28 -0700 (PDT)",
            "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n\t[10.118.12.34])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\t67E0F3F246; Wed, 28 Aug 2019 07:46:28 -0700 (PDT)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "To": "olivier.matz@6wind.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, \n\tbruce.richardson@intel.com, pablo.de.lara.guarch@intel.com,\n\thonnappa.nagarahalli@arm.com",
        "Cc": "dev@dpdk.org, dharmik.thakkar@arm.com, gavin.hu@arm.com,\n\truifeng.wang@arm.com, nd@arm.com",
        "Date": "Wed, 28 Aug 2019 09:46:09 -0500",
        "Message-Id": "<20190828144614.25284-1-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH 0/5] lib/ring: templates to support custom\n\telement size",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The current rte_ring hard-codes the type of the ring element to 'void *',\nhence the size of the element is hard-coded to 32b/64b. Since the ring\nelement type is not an input to rte_ring APIs, it results in couple\nof issues:\n\n1) If an application requires to store an element which is not 64b, it\n   needs to writes its own ring APIs similar to rte_event_ring APIs. This\n   creates additional burden on the programmers, who simply end up making\n   work-arounds and often waste memory.\n2) If there are multiple libraries that store elements of the same\n   type, currently they would have to write their own rte_ring APIs. This\n   results in code duplication.\n\nThis patch consists of 4 parts:\n1) New APIs to support configurable ring element size\n   These will help reduce code duplication in the templates. I think these\n   can be made internal (do not expose to DPDK applications, but expose to\n   DPDK libraries), feedback needed.\n\n2) rte_ring templates\n   The templates provide an easy way to add new APIs for different ring\n   element types/sizes which can be used by multiple libraries. These\n   also allow for creating APIs to store elements of custom types\n   (for ex: a structure)\n\n   The template needs 4 parameters:\n   a) RTE_RING_TMPLT_API_SUFFIX - This is used as a suffix to the\n      rte_ring APIs.\n      For ex: if RTE_RING_TMPLT_API_SUFFIX is '32b', the API name will be\n      rte_ring_create_32b\n   b) RTE_RING_TMPLT_ELEM_SIZE - Size of the ring element in bytes.\n      For ex: sizeof(uint32_t)\n   c) RTE_RING_TMPLT_ELEM_TYPE - Type of the ring element.\n      For ex: uint32_t. If a common ring library does not use a standard\n      data type, it should create its own type by defining a structure\n      with standard data type. For ex: for an elment size of 96b, one\n      could define a structure\n\n      struct s_96b {\n          uint32_t a[3];\n      }\n      The common library can use this structure to define\n      RTE_RING_TMPLT_ELEM_TYPE.\n\n      The application using this common ring library should define its\n      element type as a union with the above structure.\n\n      union app_element_type {\n          struct s_96b v;\n          struct app_element {\n              uint16_t a;\n              uint16_t b;\n              uint32_t c;\n              uint32_t d;\n          }\n      }\n   d) RTE_RING_TMPLT_EXPERIMENTAL - Indicates if the new APIs being defined\n      are experimental. Should be set to empty to remove the experimental\n      tag.\n\n   The ring library consists of some APIs that are defined as inline\n   functions and some APIs that are non-inline functions. The non-inline\n   functions are in rte_ring_template.c. However, this file needs to be\n   included in other .c files. Any feedback on how to handle this is\n   appreciated.\n\n   Note that the templates help create the APIs that are dependent on the\n   element size (for ex: rte_ring_create, enqueue/dequeue etc). Other APIs\n   that do NOT depend on the element size do not need to be part of the\n   template (for ex: rte_ring_dump, rte_ring_count, rte_ring_free_count\n   etc).\n\n3) APIs for 32b ring element size\n   This uses the templates to create APIs to enqueue/dequeue elements of\n   size 32b.\n\n4) rte_hash libray is changed to use 32b ring APIs\n   The 32b APIs are used in rte_hash library to store the free slot index\n   and free bucket index.\n\nThis patch results in following checkpatch issue:\nWARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'\n\nThe patch is following the rules in the existing code. Please let me know\nif this needs to be fixed.\n\nHonnappa Nagarahalli (5):\n  lib/ring: apis to support configurable element size\n  lib/ring: add template to support different element sizes\n  tools/checkpatch: relax constraints on __rte_experimental\n  lib/ring: add ring APIs to support 32b ring elements\n  lib/hash: use ring with 32b element size to save memory\n\n devtools/checkpatches.sh             |  11 +-\n lib/librte_hash/rte_cuckoo_hash.c    |  55 ++---\n lib/librte_hash/rte_cuckoo_hash.h    |   2 +-\n lib/librte_ring/Makefile             |   9 +-\n lib/librte_ring/meson.build          |  11 +-\n lib/librte_ring/rte_ring.c           |  34 ++-\n lib/librte_ring/rte_ring.h           |  72 ++++++\n lib/librte_ring/rte_ring_32.c        |  19 ++\n lib/librte_ring/rte_ring_32.h        |  36 +++\n lib/librte_ring/rte_ring_template.c  |  46 ++++\n lib/librte_ring/rte_ring_template.h  | 330 +++++++++++++++++++++++++++\n lib/librte_ring/rte_ring_version.map |   4 +\n 12 files changed, 582 insertions(+), 47 deletions(-)\n create mode 100644 lib/librte_ring/rte_ring_32.c\n create mode 100644 lib/librte_ring/rte_ring_32.h\n create mode 100644 lib/librte_ring/rte_ring_template.c\n create mode 100644 lib/librte_ring/rte_ring_template.h"
}