get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53417,
    "url": "http://patches.dpdk.org/api/patches/53417/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1557906862-1116-2-git-send-email-david.marchand@redhat.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": "<1557906862-1116-2-git-send-email-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1557906862-1116-2-git-send-email-david.marchand@redhat.com",
    "date": "2019-05-15T07:54:20",
    "name": "[2/4] net/softnic: do not dereference global config struct",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2ab0903dc99ebe7bae64f38ee8424c98b71490ea",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1557906862-1116-2-git-send-email-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 4660,
            "url": "http://patches.dpdk.org/api/series/4660/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4660",
            "date": "2019-05-15T07:54:19",
            "name": "[1/4] net/cxgbe: do not dereference global config struct",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4660/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53417/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/53417/checks/",
    "tags": {},
    "related": [],
    "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 280A45B2C;\n\tWed, 15 May 2019 09:54:40 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 49D555B1C;\n\tWed, 15 May 2019 09:54:38 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 70579A971A;\n\tWed, 15 May 2019 07:54:37 +0000 (UTC)",
            "from dmarchan.remote.csb (ovpn-116-80.ams2.redhat.com\n\t[10.36.116.80])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id C085F5D6A6;\n\tWed, 15 May 2019 07:54:35 +0000 (UTC)"
        ],
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, stephen@networkplumber.org, stable@dpdk.org,\n\tJasvinder Singh <jasvinder.singh@intel.com>,\n\tCristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "Date": "Wed, 15 May 2019 09:54:20 +0200",
        "Message-Id": "<1557906862-1116-2-git-send-email-david.marchand@redhat.com>",
        "In-Reply-To": "<1557906862-1116-1-git-send-email-david.marchand@redhat.com>",
        "References": "<1557906862-1116-1-git-send-email-david.marchand@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Wed, 15 May 2019 07:54:37 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH 2/4] net/softnic: do not dereference global\n\tconfig struct",
        "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": "Prefer the existing apis rather than direct access the configuration\nstructure.\n\nFixes: a958a5c07f4b (\"net/softnic: support service cores\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/softnic/rte_eth_softnic_thread.c | 13 ++++---------\n 1 file changed, 4 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c\nindex 855408e..d610b16 100644\n--- a/drivers/net/softnic/rte_eth_softnic_thread.c\n+++ b/drivers/net/softnic/rte_eth_softnic_thread.c\n@@ -99,17 +99,12 @@\n static inline int\n thread_is_valid(struct pmd_internals *softnic, uint32_t thread_id)\n {\n-\tstruct rte_config *cfg = rte_eal_get_configuration();\n-\tenum rte_lcore_role_t role;\n-\n-\tif ((thread_id >= RTE_MAX_LCORE) ||\n-\t\t(thread_id == cfg->master_lcore))\n+\tif (thread_id == rte_get_master_lcore())\n \t\treturn 0; /* FALSE */\n \n-\trole = cfg->lcore_role[thread_id];\n-\n-\tif ((softnic->params.sc && (role == ROLE_SERVICE)) ||\n-\t\t(!softnic->params.sc && (role == ROLE_RTE)))\n+\tif (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE))\n+\t\treturn 1; /* TRUE */\n+\tif (!softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_RTE))\n \t\treturn 1; /* TRUE */\n \n \treturn 0; /* FALSE */\n",
    "prefixes": [
        "2/4"
    ]
}