get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 88254,
    "url": "https://patches.dpdk.org/api/patches/88254/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210225182250.1149592-16-thomas@monjalon.net/",
    "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": "<20210225182250.1149592-16-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210225182250.1149592-16-thomas@monjalon.net",
    "date": "2021-02-25T18:22:48",
    "name": "[v5,15/17] vdpa/mlx5: replace pthread functions unavailable in musl",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ebc848f621f58314129839625a4ac38c1e464163",
    "submitter": {
        "id": 685,
        "url": "https://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210225182250.1149592-16-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 15388,
            "url": "https://patches.dpdk.org/api/series/15388/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15388",
            "date": "2021-02-25T18:22:33",
            "name": "Alpine/musl build support",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/15388/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/88254/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/88254/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 7686CA0547;\n\tThu, 25 Feb 2021 19:25:19 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9EECF1608DD;\n\tThu, 25 Feb 2021 19:24:06 +0100 (CET)",
            "from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 4FEAA1608D0;\n Thu, 25 Feb 2021 19:24:05 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.nyi.internal (Postfix) with ESMTP id ECD9F5C0120;\n Thu, 25 Feb 2021 13:24:04 -0500 (EST)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Thu, 25 Feb 2021 13:24:04 -0500",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id E575524005C;\n Thu, 25 Feb 2021 13:24:03 -0500 (EST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm3; bh=x0sjAmwEHobre\n 5Wb/pLeyfeXRaZJn3qbMF4ORYFQo7I=; b=chPQBIQkBE0qZMq2lVZj62j5QKZBV\n 3cHmOrSV/E4WJI/vDLg9Mclf3w2jEEgACgkIwPOpDeg0S01qTjuRDGQKepjm+NqP\n pulbusGdCot2aTwMuCE4mUMPsbCabQNgbwJMhDw4aZbCW0tR9wf0X4bNEi0yBOLD\n xY/5bF8jy6kqBKGbIEHDNOo4eniMBsUMee6owB4KPHWBNsaT00mpZuo8NpZTHI4/\n /BJvSjWhRQFpJXFevSyk0eU29d95jNeEBYW5y182UX1HN2UTLjvbvkP7Na0XgrOl\n dV2UlFeWFs7q2SdRL71DfsSnSoC0F/8gaTH4LnQpFQKLRgMSR0A3y0uLA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm2; bh=x0sjAmwEHobre5Wb/pLeyfeXRaZJn3qbMF4ORYFQo7I=; b=keXBTcIZ\n EwGQ1IikumEu06Htx8WvpOWRrRen8knAXijRGnlxjpYj8yoX2ndZJ1ljXvM7r86Y\n 5p7JTH8IQ3t1FWYx2KIucwrSp2PYScJA0bucZYcqq1bSTVDQDicsulYgUyw9eGRU\n 5ShXVhhYBQYbrpmO6aGaI41stdIdQvkZxGVNz/Kf1avB7GA/j7q6lsI/CVke7slp\n ttr+Uu3qlL9vMhLD/DFyTsi/098Z7ip4Dh51EPP8dwxer5KdcZoORdgkLbwdUz8q\n Ee0smENPd+r7drneiH3r12INMyXbDibqSpVMgtqT+GF66FyeQ00USe/duNRO6/DA\n B2J+dMfq8/9uYw=="
        ],
        "X-ME-Sender": "<xms:ROs3YNx6GMzXTcDNOBWOM4rahqEg7dp_GQjqDdEby9DIcAvUgwebBw>\n <xme:ROs3YNQTlDeXKr4ojEgSCMJfBYexZz9GjRvPC7ewp7tXj3LJJ-s95w7DuISqng-oW\n GbC0_s4GLsfywUyXg>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeduledrkeelgdduudegucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg\n uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf\n hiiigvpedutdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr\n lhhonhdrnhgvth",
        "X-ME-Proxy": "<xmx:ROs3YHVBrcpUJGj187yn7YbYFkeH0Xs-SWmCT4RZCvmgwt14XL8yhA>\n <xmx:ROs3YPhoUwd8_KWXzfVB2Yylkil-HY46u6NgMYHuw6wC_XBlv7HX-w>\n <xmx:ROs3YPBFth_Ob0mZknh4WDxUeHkd25Tk1-SR6rQFovm48ys2mQtsLA>\n <xmx:ROs3YK8G81HFqRsiyMemwzzVYK1Eey20Tce_IAOMthgoxdGRJl9CWQ>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "ncopa@alpinelinux.org, stable@dpdk.org, Matan Azrad <matan@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n Xueming Li <xuemingl@nvidia.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Thu, 25 Feb 2021 19:22:48 +0100",
        "Message-Id": "<20210225182250.1149592-16-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.30.1",
        "In-Reply-To": "<20210225182250.1149592-1-thomas@monjalon.net>",
        "References": "<20190313170657.16688-1-ncopa@alpinelinux.org>\n <20210225182250.1149592-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 15/17] vdpa/mlx5: replace pthread functions\n unavailable in musl",
        "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": "1/ The function pthread_yield() does not exist in musl libc,\nand can be replaced with sched_yield() after including sched.h.\n\n2/ The function pthread_attr_setaffinity_np() does not exist in musl libc,\nand can be replaced with pthread_setaffinity_np() after pthread_create().\n\nFixes: b7fa0bf4d5c6 (\"vdpa/mlx5: fix polling threads scheduling\")\nFixes: 5cf3fd3af4df (\"vdpa/mlx5: add CPU core parameter to bind polling thread\")\nCc: stable@dpdk.org\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n drivers/vdpa/mlx5/mlx5_vdpa_event.c | 25 +++++++++++++------------\n 1 file changed, 13 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c\nindex 86adc864f5..49632dfaa7 100644\n--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c\n+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c\n@@ -3,6 +3,7 @@\n  */\n #include <unistd.h>\n #include <stdint.h>\n+#include <sched.h>\n #include <fcntl.h>\n #include <sys/eventfd.h>\n \n@@ -234,7 +235,7 @@ mlx5_vdpa_timer_sleep(struct mlx5_vdpa_priv *priv, uint32_t max)\n \t\tusleep(priv->timer_delay_us);\n \telse\n \t\t/* Give-up CPU to improve polling threads scheduling. */\n-\t\tpthread_yield();\n+\t\tsched_yield();\n }\n \n static void *\n@@ -515,17 +516,6 @@ mlx5_vdpa_cqe_event_setup(struct mlx5_vdpa_priv *priv)\n \t\tpthread_cond_init(&priv->timer_cond, NULL);\n \t\tpriv->timer_on = 0;\n \t\tpthread_attr_init(&attr);\n-\t\tCPU_ZERO(&cpuset);\n-\t\tif (priv->event_core != -1)\n-\t\t\tCPU_SET(priv->event_core, &cpuset);\n-\t\telse\n-\t\t\tcpuset = rte_lcore_cpuset(rte_get_main_lcore());\n-\t\tret = pthread_attr_setaffinity_np(&attr, sizeof(cpuset),\n-\t\t\t\t\t\t  &cpuset);\n-\t\tif (ret) {\n-\t\t\tDRV_LOG(ERR, \"Failed to set thread affinity.\");\n-\t\t\treturn -1;\n-\t\t}\n \t\tret = pthread_attr_setschedpolicy(&attr, SCHED_RR);\n \t\tif (ret) {\n \t\t\tDRV_LOG(ERR, \"Failed to set thread sched policy = RR.\");\n@@ -542,6 +532,17 @@ mlx5_vdpa_cqe_event_setup(struct mlx5_vdpa_priv *priv)\n \t\t\tDRV_LOG(ERR, \"Failed to create timer thread.\");\n \t\t\treturn -1;\n \t\t}\n+\t\tCPU_ZERO(&cpuset);\n+\t\tif (priv->event_core != -1)\n+\t\t\tCPU_SET(priv->event_core, &cpuset);\n+\t\telse\n+\t\t\tcpuset = rte_lcore_cpuset(rte_get_main_lcore());\n+\t\tret = pthread_setaffinity_np(priv->timer_tid,\n+\t\t\t\t\t     sizeof(cpuset), &cpuset);\n+\t\tif (ret) {\n+\t\t\tDRV_LOG(ERR, \"Failed to set thread affinity.\");\n+\t\t\tgoto error;\n+\t\t}\n \t\tsnprintf(name, sizeof(name), \"vDPA-mlx5-%d\", priv->vid);\n \t\tret = pthread_setname_np(priv->timer_tid, name);\n \t\tif (ret) {\n",
    "prefixes": [
        "v5",
        "15/17"
    ]
}