get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118977,
    "url": "https://patches.dpdk.org/api/patches/118977/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20221024071214.20980-1-olivier.matz@6wind.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": "<20221024071214.20980-1-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221024071214.20980-1-olivier.matz@6wind.com",
    "date": "2022-10-24T07:12:14",
    "name": "[v2] app/test: fix PMD perf test on devices with no socket ID",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0ac3efb618c44bdce4e88a32993d584799bf90a0",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20221024071214.20980-1-olivier.matz@6wind.com/mbox/",
    "series": [
        {
            "id": 25377,
            "url": "https://patches.dpdk.org/api/series/25377/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=25377",
            "date": "2022-10-24T07:12:14",
            "name": "[v2] app/test: fix PMD perf test on devices with no socket ID",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/25377/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/118977/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/118977/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 A9A9BA00C5;\n\tMon, 24 Oct 2022 09:12:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 44B974113C;\n\tMon, 24 Oct 2022 09:12:29 +0200 (CEST)",
            "from mail-wm1-f47.google.com (mail-wm1-f47.google.com\n [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id 9D76840E5A\n for <dev@dpdk.org>; Mon, 24 Oct 2022 09:12:27 +0200 (CEST)",
            "by mail-wm1-f47.google.com with SMTP id v11so6008798wmd.1\n for <dev@dpdk.org>; Mon, 24 Oct 2022 00:12:27 -0700 (PDT)",
            "from gojira.dev.6wind.com ([185.13.181.2])\n by smtp.gmail.com with ESMTPSA id\n p5-20020a1c5445000000b003c71358a42dsm8705312wmi.18.2022.10.24.00.12.24\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 24 Oct 2022 00:12:25 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=WpQQwJB3WU0HmW0QJBuhASa6CIVCs1JgJLjDKarI4Jc=;\n b=fuORXWlB9igGXzVX4NXDK5HlQwPMPtfQDsAkYhqWBhE8SCHxY841uAyKgpGy25jANe\n HnPk/W8psIE0IBIW0mah7JSYSE8KmMg9ZCbDNirzURyRDCCikIXi1R4IQk2mYGnXeDuV\n tFZWziaWbC720SdK+/MmFJKt9PtaqEgmOnWHwJfNyLuI9QAnx0GqzSyjlfkCXJI7YNg6\n 8ZFcgjA/VhtdIejainUE+8NGkQSu8YEOKbfmK1BLLMNK/6JV2JdRzSQSXbTsZbs/YJmy\n CysLor6+7/1F+bIOdZak9weCsI8cJcFNCfd1UiArNs0VDUvuXmbzmWklIqDUfcUENB0A\n VQnQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=WpQQwJB3WU0HmW0QJBuhASa6CIVCs1JgJLjDKarI4Jc=;\n b=vkHp6o3wRyNl9nJbq53w+FbIYtPcpUZyOo8bIm8TENUqKZZvqZlrmBCoL9+yydlSN7\n CtTsi1FZeJ0F0t32SJTMOtR7qthI10fKcsRzP9E4bCqseoOKjyMMrZd5PeJCGgGFNO/h\n RDiRSjyH0T4YjFCKvfiJuMtDWbKjxIWci6C6YEwvL+jUlDE6ZQSOu1nRBlkAMufAeczR\n 4VOrqeJsaLnIAC4lH5V/y+X1cdepzY23DUnNNyQxBwSAENcyBHSv/W9Z3uroRfd5Oudy\n CV1kSWp3xi8z6J1MOQJFupzJ4NL4+Jw9NoEkpjJfLVAmhwQN6+mAHB5VEC2AkV0e1RSS\n TgOw==",
        "X-Gm-Message-State": "ACrzQf13vrOk8zyQt/2exzHm1jeVS8lBbChqgSAquG+0y1h3Fk5t6Eyp\n 3EayQ1wlr+5huz0f4dYPC2txv6NRfeO7mg==",
        "X-Google-Smtp-Source": "\n AMsMyM5hy5j/Jzk1jrn+YiytFLlcH86cPBMF4LVgK0szNJE9HMWAlGS4q23iib3sYEv1UOGBJ2nAIg==",
        "X-Received": "by 2002:a05:600c:1616:b0:3cd:f079:e34a with SMTP id\n m22-20020a05600c161600b003cdf079e34amr3685034wmn.11.1666595547288;\n Mon, 24 Oct 2022 00:12:27 -0700 (PDT)",
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "David Marchand <david.marchand@redhat.com>, linglix.chen@intel.com,\n yux.jiang@intel.com",
        "Subject": "[PATCH v2] app/test: fix PMD perf test on devices with no socket ID",
        "Date": "Mon, 24 Oct 2022 09:12:14 +0200",
        "Message-Id": "<20221024071214.20980-1-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20221022083108.3759-1-olivier.matz@6wind.com>",
        "References": "<20221022083108.3759-1-olivier.matz@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "If the socket ID of a device is unknown, rte_eth_dev_socket_id(portid)\nnow returns -1 instead of 0 since commit 7dcd73e37965 (\"drivers/bus: set\ndevice NUMA node to unknown by default\").\n\nThis change breaks the pmd_perf test on environment where the device\nsocket ID is unknown. The test fails with the following error, because\nit does not find a lcore on socket -1:\n\n> No avail lcore to run test\n\nTake the new behavior in account in the pmd_perf test: in this\nenvironment, the test can now run on any lcore, and not only those from\nsocket 0 (this was the old behavior).\n\nBugzilla ID: 1105\nFixes: 7dcd73e37965 (\"drivers/bus: set device NUMA node to unknown by default\")\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n\nv2:\n* fix typo (-SOCKET_ID_ANY instead of SOCKET_ID_ANY)\n\n app/test/test_pmd_perf.c | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c\nindex fe765c4173..ff84d251ff 100644\n--- a/app/test/test_pmd_perf.c\n+++ b/app/test/test_pmd_perf.c\n@@ -265,13 +265,14 @@ init_mbufpool(unsigned nb_mbuf)\n }\n \n static uint16_t\n-alloc_lcore(uint16_t socketid)\n+alloc_lcore(int socketid)\n {\n \tunsigned lcore_id;\n \n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\n \t\tif (LCORE_AVAIL != lcore_conf[lcore_id].status ||\n-\t\t    lcore_conf[lcore_id].socketid != socketid ||\n+\t\t    (socketid != SOCKET_ID_ANY &&\n+\t\t     lcore_conf[lcore_id].socketid != socketid) ||\n \t\t    lcore_id == rte_get_main_lcore())\n \t\t\tcontinue;\n \t\tlcore_conf[lcore_id].status = LCORE_USED;\n@@ -711,17 +712,18 @@ test_pmd_perf(void)\n \tnum = 0;\n \tRTE_ETH_FOREACH_DEV(portid) {\n \t\tif (socketid == -1) {\n-\t\t\tsocketid = rte_eth_dev_socket_id(portid);\n-\t\t\tworker_id = alloc_lcore(socketid);\n+\t\t\tworker_id = alloc_lcore(rte_eth_dev_socket_id(portid));\n \t\t\tif (worker_id == (uint16_t)-1) {\n \t\t\t\tprintf(\"No avail lcore to run test\\n\");\n \t\t\t\treturn -1;\n \t\t\t}\n+\t\t\tsocketid = rte_lcore_to_socket_id(worker_id);\n \t\t\tprintf(\"Performance test runs on lcore %u socket %u\\n\",\n \t\t\t       worker_id, socketid);\n \t\t}\n \n-\t\tif (socketid != rte_eth_dev_socket_id(portid)) {\n+\t\tif (socketid != rte_eth_dev_socket_id(portid) &&\n+\t\t    rte_eth_dev_socket_id(portid) != SOCKET_ID_ANY) {\n \t\t\tprintf(\"Skip port %d\\n\", portid);\n \t\t\tcontinue;\n \t\t}\n",
    "prefixes": [
        "v2"
    ]
}