get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53852,
    "url": "http://patches.dpdk.org/api/patches/53852/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/5f6e26e27ad524f85ee9a911aeebae69f1ec0c1a.1559147228.git.anatoly.burakov@intel.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": "<5f6e26e27ad524f85ee9a911aeebae69f1ec0c1a.1559147228.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/5f6e26e27ad524f85ee9a911aeebae69f1ec0c1a.1559147228.git.anatoly.burakov@intel.com",
    "date": "2019-05-29T16:31:10",
    "name": "[24/25] net/ena: fix direct access to shared memory config",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8e7af59d52c49d3e1641af89e43aacdebe1460aa",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/5f6e26e27ad524f85ee9a911aeebae69f1ec0c1a.1559147228.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 4813,
            "url": "http://patches.dpdk.org/api/series/4813/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4813",
            "date": "2019-05-29T16:30:46",
            "name": "Make shared memory config non-public",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4813/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53852/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/53852/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 278411BA8F;\n\tWed, 29 May 2019 18:32:04 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 2EE3A1BA46\n\tfor <dev@dpdk.org>; Wed, 29 May 2019 18:31:58 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 May 2019 09:31:58 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby orsmga005.jf.intel.com with ESMTP; 29 May 2019 09:31:56 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Marcin Wojtas <mw@semihalf.com>, Michal Krawczyk <mk@semihalf.com>,\n\tGuy Tzalik <gtzalik@amazon.com>, Evgeny Schemeilin <evgenys@amazon.com>, \n\tstephen@networkplumber.org, thomas@monjalon.net,\n\tdavid.marchand@redhat.com",
        "Date": "Wed, 29 May 2019 17:31:10 +0100",
        "Message-Id": "<5f6e26e27ad524f85ee9a911aeebae69f1ec0c1a.1559147228.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": [
            "<cover.1559147228.git.anatoly.burakov@intel.com>",
            "<cover.1559147228.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1559147228.git.anatoly.burakov@intel.com>",
            "<cover.1559147228.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 24/25] net/ena: fix direct access to shared\n\tmemory config",
        "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 ENA driver calculates a ring's NUMA node affinity by directly\naccessing the memzone list. Fix it to do it through the public\nAPI's instead.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n drivers/net/ena/ena_ethdev.c | 18 +++---------------\n 1 file changed, 3 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c\nindex b6651fc0f..e745e9e92 100644\n--- a/drivers/net/ena/ena_ethdev.c\n+++ b/drivers/net/ena/ena_ethdev.c\n@@ -274,20 +274,6 @@ static const struct eth_dev_ops ena_dev_ops = {\n \n #define NUMA_NO_NODE\tSOCKET_ID_ANY\n \n-static inline int ena_cpu_to_node(int cpu)\n-{\n-\tstruct rte_config *config = rte_eal_get_configuration();\n-\tstruct rte_fbarray *arr = &config->mem_config->memzones;\n-\tconst struct rte_memzone *mz;\n-\n-\tif (unlikely(cpu >= RTE_MAX_MEMZONE))\n-\t\treturn NUMA_NO_NODE;\n-\n-\tmz = rte_fbarray_get(arr, cpu);\n-\n-\treturn mz->socket_id;\n-}\n-\n static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,\n \t\t\t\t       struct ena_com_rx_ctx *ena_rx_ctx)\n {\n@@ -1099,6 +1085,7 @@ static int ena_create_io_queue(struct ena_ring *ring)\n {\n \tstruct ena_adapter *adapter;\n \tstruct ena_com_dev *ena_dev;\n+\tstruct rte_memseg_list *msl;\n \tstruct ena_com_create_io_ctx ctx =\n \t\t/* policy set to _HOST just to satisfy icc compiler */\n \t\t{ ENA_ADMIN_PLACEMENT_POLICY_HOST,\n@@ -1126,7 +1113,8 @@ static int ena_create_io_queue(struct ena_ring *ring)\n \t}\n \tctx.qid = ena_qid;\n \tctx.msix_vector = -1; /* interrupts not used */\n-\tctx.numa_node = ena_cpu_to_node(ring->id);\n+\tmsl = rte_mem_virt2memseg_list(ring);\n+\tctx.numa_node = msl->socket_id;\n \n \trc = ena_com_create_io_queue(ena_dev, &ctx);\n \tif (rc) {\n",
    "prefixes": [
        "24/25"
    ]
}