Show a cover letter.

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

{
    "id": 58894,
    "url": "https://patches.dpdk.org/api/covers/58894/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/cover/20190906190510.11146-1-honnappa.nagarahalli@arm.com/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<20190906190510.11146-1-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190906190510.11146-1-honnappa.nagarahalli@arm.com",
    "date": "2019-09-06T19:05:04",
    "name": "[v2,0/6] lib/ring: templates to support custom element size",
    "submitter": {
        "id": 1045,
        "url": "https://patches.dpdk.org/api/people/1045/?format=api",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/cover/20190906190510.11146-1-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 6316,
            "url": "https://patches.dpdk.org/api/series/6316/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6316",
            "date": "2019-09-06T19:05:04",
            "name": "lib/ring: templates to support custom element size",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/6316/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/covers/58894/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 8B8C01F40E;\n\tFri,  6 Sep 2019 21:05:30 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n\tby dpdk.org (Postfix) with ESMTP id 32D611F3ED\n\tfor <dev@dpdk.org>; Fri,  6 Sep 2019 21:05: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 78DAA28;\n\tFri,  6 Sep 2019 12:05: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\t6DF403F59C; Fri,  6 Sep 2019 12:05: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",
        "Cc": "dev@dpdk.org, pbhagavatula@marvell.com, jerinj@marvell.com,\n\tHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "Date": "Fri,  6 Sep 2019 14:05:04 -0500",
        "Message-Id": "<20190906190510.11146-1-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190828144614.25284-1-honnappa.nagarahalli@arm.com>",
        "References": "<20190828144614.25284-1-honnappa.nagarahalli@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v2 0/6] 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 write its own ring APIs similar to rte_event_ring APIs. This\n   creates additional burden on the programmers, who 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 several 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\n5) Event Dev changed to use ring templates\n   Event Dev defines its own 128b ring APIs using the templates. This helps\n   in keeping the 'struct rte_event' as is. If Event Dev has to use generic\n   128b ring APIs, it requires 'struct rte_event' to change to\n   'union rte_event' to include a generic data type such as '__int128_t'.\n   This breaks the API compatibility and results in large number of\n   changes.\n   With this change, the event rings are stored on rte_ring's tailq.\n   Event Dev specific ring list is NOT available. IMO, this does not have\n   any impact to the user.\n\nThis patch results in following checkpatch issue:\nWARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'\n\nHowever, this patch is following the rules in the existing code. Please\nlet me know if this needs to be fixed.\n\nv2\n - Change Event Ring implementation to use ring templates\n   (Jerin, Pavan)\n\nHonnappa Nagarahalli (6):\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  lib/eventdev: use ring templates for event rings\n\n devtools/checkpatches.sh                  |  11 +-\n lib/librte_eventdev/Makefile              |   2 +\n lib/librte_eventdev/meson.build           |   2 +\n lib/librte_eventdev/rte_event_ring.c      | 146 +---------\n lib/librte_eventdev/rte_event_ring.h      |  41 +--\n lib/librte_eventdev/rte_event_ring_128b.c |  19 ++\n lib/librte_eventdev/rte_event_ring_128b.h |  44 +++\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 18 files changed, 660 insertions(+), 223 deletions(-)\n create mode 100644 lib/librte_eventdev/rte_event_ring_128b.c\n create mode 100644 lib/librte_eventdev/rte_event_ring_128b.h\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"
}