get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/91102/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 91102,
    "url": "http://patches.dpdk.org/api/patches/91102/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210412082901.652736-3-kda@semihalf.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20210412082901.652736-3-kda@semihalf.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210412082901.652736-3-kda@semihalf.com",
    "date": "2021-04-12T08:29:00",
    "name": "[2/3] stack: add lock-free support indication",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "813734ae64f18ec3f9051421d86d3b574d36227d",
    "submitter": {
        "id": 2179,
        "url": "http://patches.dpdk.org/api/people/2179/?format=api",
        "name": "Stanislaw Kardach",
        "email": "kda@semihalf.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210412082901.652736-3-kda@semihalf.com/mbox/",
    "series": [
        {
            "id": 16287,
            "url": "http://patches.dpdk.org/api/series/16287/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16287",
            "date": "2021-04-12T08:28:58",
            "name": "add lock-free stack support discovery",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/16287/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/91102/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/91102/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4151CA0C44;\n\tMon, 12 Apr 2021 10:29:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 95DD1140FC0;\n\tMon, 12 Apr 2021 10:29:33 +0200 (CEST)",
            "from mail-lf1-f51.google.com (mail-lf1-f51.google.com\n [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id AB1794014E\n for <dev@dpdk.org>; Mon, 12 Apr 2021 10:29:30 +0200 (CEST)",
            "by mail-lf1-f51.google.com with SMTP id b14so20012078lfv.8\n for <dev@dpdk.org>; Mon, 12 Apr 2021 01:29:30 -0700 (PDT)",
            "from toster.semihalf.com (host-193.106.246.139.static.3s.pl.\n [193.106.246.139])\n by smtp.gmail.com with ESMTPSA id x4sm2691118ljd.112.2021.04.12.01.29.29\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 12 Apr 2021 01:29:30 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=semihalf-com.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=tU24hPsZkZ7o3h6ovCZ80IvRq1RBxTdPMb3w7zVoAkc=;\n b=BpLIOCmzsCmBL5p54jA06Bd43maHRwhb6CEdIuwTQCe0KtExXD+pxJlnTsrhv+WpW8\n 1l9CrLWtA6u8YJFmns/tqG7aQKfVbjN7eY4iAD/vEjUqnufFtxNKGAE9vzhay0vdMmN1\n iAM9tQv8JHHRxdnHxq4n61anLdmlsGfH32BzxbFlR9Zt0DfvD/XSczf4LxJCImCJsj6U\n 57t5RxGz50GdGFyE7m2k+bjKPLGLQGf8jzCq3taJ/gqzYrq9WYGu/PUdje6DqC/GfmFV\n Q67pRiz7ZuHmiW7K3pXf0gZ+i3t9VZqWFwLWOLbvse0jqvoZvz5DcHoUNsfhlYbt/4k+\n YeBA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=tU24hPsZkZ7o3h6ovCZ80IvRq1RBxTdPMb3w7zVoAkc=;\n b=lVLGMayW3eWRxUQnyx3u7zq6krfMlIalciM5JYRPvIxWQeQCqGnEPjEe1QioheTPWO\n KIfKu/NeUKdtzPpDTWeUssS5Cf/ueLjvh17Jugbc/Ka4WcO/mNLRd96JY5Y2J7wp2oRg\n a2ib70li9H5dnUCJNt02ZjG6ATQHTMK5KhOLsU3t2vbQW/iAVej3NUmY3FRqKn9kvkD8\n MtT6gA4ND8V0vgY0VsdGoZokw9kCHqrpmbse9wrWrvLajFguOwNphme0+XnLRTCOwf03\n atZ5mrcBMmAdib1r7L7xKJXrQqG0++eUFJxeFnSHi9wDq+TVDjEQ4SLf9XuI+h0rC1F1\n m8CA==",
        "X-Gm-Message-State": "AOAM533NK+oBRo4HVbDXLJ+v6qlU9sAf5W8fBtPlIYZ9GxG7rGhORavT\n F+Of/bkejv3VuhUDYZEU15Sq7g==",
        "X-Google-Smtp-Source": "\n ABdhPJxSs01v2e3I1MmYolWILMTd5PUkcLnLddkRGMfrvwU3P6W7mwRQMwlmv36ZobWklcIFy3A2cA==",
        "X-Received": "by 2002:ac2:5a4e:: with SMTP id r14mr10030220lfn.78.1618216170281;\n Mon, 12 Apr 2021 01:29:30 -0700 (PDT)",
        "From": "Stanislaw Kardach <kda@semihalf.com>",
        "To": "Olivier Matz <olivier.matz@6wind.com>",
        "Cc": "dev@dpdk.org, Stanislaw Kardach <kda@semihalf.com>, phil.yang@arm.com,\n stable@dpdk.org",
        "Date": "Mon, 12 Apr 2021 10:29:00 +0200",
        "Message-Id": "<20210412082901.652736-3-kda@semihalf.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210412082901.652736-1-kda@semihalf.com>",
        "References": "<20210412082901.652736-1-kda@semihalf.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 2/3] stack: add lock-free support indication",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently it is impossible to detect programatically whether lock-free\nimplementation of rte_stack is supported. One could check whether the\nheader guard for lock-free stubs is defined (_RTE_STACK_LF_STUBS_H_) but\nthat's an unstable implementation detail. Because of that currently all\nlock-free ring creations silently succeed (as long as the stack header\nis 16B long) which later leads to push and pop operations being NOPs.\nThe observable effect is that stack_lf_autotest fails on platforms not\nsupporting the lock-free. Instead it should just skip the lock-free test\naltogether.\n\nThis commit adds a new errno value (ENOTSUP) that may be returned by\nrte_stack_create() to indicate that a given combination of flags is not\nsupported on a current platform.\nThis is detected by checking a compile-time flag in the include logic in\nrte_stack_lf.h which may be used by applications to check the lock-free\nsupport at compile time.\n\nSigned-off-by: Stanislaw Kardach <kda@semihalf.com>\nFixes: 7911ba0473e0 (\"stack: enable lock-free implementation for aarch64\")\nCc: phil.yang@arm.com\nCc: stable@dpdk.org\n---\n doc/guides/rel_notes/release_21_05.rst | 4 ++++\n lib/librte_stack/rte_stack.c           | 4 +++-\n lib/librte_stack/rte_stack.h           | 1 +\n lib/librte_stack/rte_stack_lf.h        | 5 +++++\n 4 files changed, 13 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex 6f5858c8f..42ed60da8 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -166,6 +166,10 @@ API Changes\n * pci: The value ``PCI_ANY_ID`` is marked as deprecated\n   and can be replaced with ``RTE_PCI_ANY_ID``.\n \n+* Lock-free ``rte_stack`` no longer silently ignores push and pop when it's not\n+  supported on the current platform. Instead ``rte_stack_create()`` fails and\n+  ``rte_errno`` is set to ``ENOTSUP``.\n+\n \n ABI Changes\n -----------\ndiff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c\nindex 8a51fba17..10d3b2eeb 100644\n--- a/lib/librte_stack/rte_stack.c\n+++ b/lib/librte_stack/rte_stack.c\n@@ -64,9 +64,11 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,\n \n #ifdef RTE_ARCH_64\n \tRTE_BUILD_BUG_ON(sizeof(struct rte_stack_lf_head) != 16);\n-#else\n+#endif\n+#if !defined(RTE_STACK_LF_SUPPORTED)\n \tif (flags & RTE_STACK_F_LF) {\n \t\tSTACK_LOG_ERR(\"Lock-free stack is not supported on your platform\\n\");\n+\t\trte_errno = ENOTSUP;\n \t\treturn NULL;\n \t}\n #endif\ndiff --git a/lib/librte_stack/rte_stack.h b/lib/librte_stack/rte_stack.h\nindex b82c74e72..27640f87b 100644\n--- a/lib/librte_stack/rte_stack.h\n+++ b/lib/librte_stack/rte_stack.h\n@@ -205,6 +205,7 @@ rte_stack_free_count(struct rte_stack *s)\n  *    - EEXIST - a stack with the same name already exists\n  *    - ENOMEM - insufficient memory to create the stack\n  *    - ENAMETOOLONG - name size exceeds RTE_STACK_NAMESIZE\n+ *    - ENOTSUP - platform does not support given flags combination.\n  */\n struct rte_stack *\n rte_stack_create(const char *name, unsigned int count, int socket_id,\ndiff --git a/lib/librte_stack/rte_stack_lf.h b/lib/librte_stack/rte_stack_lf.h\nindex eb106e64e..f2b012cd0 100644\n--- a/lib/librte_stack/rte_stack_lf.h\n+++ b/lib/librte_stack/rte_stack_lf.h\n@@ -13,6 +13,11 @@\n #else\n #include \"rte_stack_lf_generic.h\"\n #endif\n+\n+/**\n+ * Indicates that RTE_STACK_F_LF is supported.\n+ */\n+#define RTE_STACK_LF_SUPPORTED\n #endif\n \n /**\n",
    "prefixes": [
        "2/3"
    ]
}