get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 25235,
    "url": "https://patches.dpdk.org/api/patches/25235/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170609175120.77652-1-ferruh.yigit@intel.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": "<20170609175120.77652-1-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170609175120.77652-1-ferruh.yigit@intel.com",
    "date": "2017-06-09T17:51:18",
    "name": "[dpdk-dev,v3,1/3] net/ring: set ethernet device field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "38f4d85fba14b9ebf0dc89a9e2952a83a65a342f",
    "submitter": {
        "id": 324,
        "url": "https://patches.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170609175120.77652-1-ferruh.yigit@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/25235/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/25235/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id A35554A63;\n\tFri,  9 Jun 2017 19:51:28 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id CFA8D3798\n\tfor <dev@dpdk.org>; Fri,  9 Jun 2017 19:51:26 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Jun 2017 10:51:25 -0700",
            "from silpixa00372839.ir.intel.com (HELO\n\tsilpixa00372839.ger.corp.intel.com) ([10.237.222.154])\n\tby orsmga001.jf.intel.com with ESMTP; 09 Jun 2017 10:51:22 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.39,319,1493708400\"; d=\"scan'208\";\n\ta=\"1139701911\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "Bruce Richardson <bruce.richardson@intel.com>",
        "Cc": "dev@dpdk.org,\n\tFerruh Yigit <ferruh.yigit@intel.com>",
        "Date": "Fri,  9 Jun 2017 18:51:18 +0100",
        "Message-Id": "<20170609175120.77652-1-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20170606151008.62680-1-ferruh.yigit@intel.com>",
        "References": "<20170606151008.62680-1-ferruh.yigit@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/3] net/ring: set ethernet device field",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/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 eth_dev->device link was missing for ring PMD, adding it.\n\nThis is to generalize rte_device access from eth_dev.\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\n drivers/net/ring/rte_eth_ring.c | 33 +++++++++++++++++++++++----------\n 1 file changed, 23 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c\nindex d4dce95..6feb137 100644\n--- a/drivers/net/ring/rte_eth_ring.c\n+++ b/drivers/net/ring/rte_eth_ring.c\n@@ -263,7 +263,8 @@ static int\n do_eth_dev_ring_create(const char *name,\n \t\tstruct rte_ring * const rx_queues[], const unsigned nb_rx_queues,\n \t\tstruct rte_ring *const tx_queues[], const unsigned nb_tx_queues,\n-\t\tconst unsigned numa_node, enum dev_action action)\n+\t\tconst unsigned int numa_node, enum dev_action action,\n+\t\tstruct rte_eth_dev **eth_dev_p)\n {\n \tstruct rte_eth_dev_data *data = NULL;\n \tstruct pmd_internals *internals = NULL;\n@@ -349,6 +350,8 @@ do_eth_dev_ring_create(const char *name,\n \teth_dev->rx_pkt_burst = eth_ring_rx;\n \teth_dev->tx_pkt_burst = eth_ring_tx;\n \n+\t*eth_dev_p = eth_dev;\n+\n \treturn data->port_id;\n \n error:\n@@ -369,6 +372,8 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],\n \t\tconst unsigned nb_tx_queues,\n \t\tconst unsigned numa_node)\n {\n+\tstruct rte_eth_dev *eth_dev = NULL;\n+\n \t/* do some parameter checking */\n \tif (rx_queues == NULL && nb_rx_queues > 0) {\n \t\trte_errno = EINVAL;\n@@ -384,7 +389,8 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],\n \t}\n \n \treturn do_eth_dev_ring_create(name, rx_queues, nb_rx_queues,\n-\t\t\ttx_queues, nb_tx_queues, numa_node, DEV_ATTACH);\n+\t\t\ttx_queues, nb_tx_queues, numa_node, DEV_ATTACH,\n+\t\t\t&eth_dev);\n }\n \n int\n@@ -396,7 +402,7 @@ rte_eth_from_ring(struct rte_ring *r)\n \n static int\n eth_dev_ring_create(const char *name, const unsigned numa_node,\n-\t\tenum dev_action action)\n+\t\tenum dev_action action, struct rte_eth_dev **eth_dev)\n {\n \t/* rx and tx are so-called from point of view of first port.\n \t * They are inverted from the point of view of second port\n@@ -418,7 +424,7 @@ eth_dev_ring_create(const char *name, const unsigned numa_node,\n \t}\n \n \tif (do_eth_dev_ring_create(name, rxtx, num_rings, rxtx, num_rings,\n-\t\tnuma_node, action) < 0)\n+\t\tnuma_node, action, eth_dev) < 0)\n \t\treturn -1;\n \n \treturn 0;\n@@ -508,6 +514,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)\n \tstruct rte_kvargs *kvlist = NULL;\n \tint ret = 0;\n \tstruct node_action_list *info = NULL;\n+\tstruct rte_eth_dev *eth_dev = NULL;\n \n \tname = rte_vdev_device_name(dev);\n \tparams = rte_vdev_device_args(dev);\n@@ -515,12 +522,13 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)\n \tRTE_LOG(INFO, PMD, \"Initializing pmd_ring for %s\\n\", name);\n \n \tif (params == NULL || params[0] == '\\0') {\n-\t\tret = eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE);\n+\t\tret = eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE,\n+\t\t\t\t&eth_dev);\n \t\tif (ret == -1) {\n \t\t\tRTE_LOG(INFO, PMD,\n \t\t\t\t\"Attach to pmd_ring for %s\\n\", name);\n \t\t\tret = eth_dev_ring_create(name, rte_socket_id(),\n-\t\t\t\t\t\t  DEV_ATTACH);\n+\t\t\t\t\t\t  DEV_ATTACH, &eth_dev);\n \t\t}\n \t}\n \telse {\n@@ -530,13 +538,13 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)\n \t\t\tRTE_LOG(INFO, PMD, \"Ignoring unsupported parameters when creating\"\n \t\t\t\t\t\" rings-backed ethernet device\\n\");\n \t\t\tret = eth_dev_ring_create(name, rte_socket_id(),\n-\t\t\t\t\t\t  DEV_CREATE);\n+\t\t\t\t\t\t  DEV_CREATE, &eth_dev);\n \t\t\tif (ret == -1) {\n \t\t\t\tRTE_LOG(INFO, PMD,\n \t\t\t\t\t\"Attach to pmd_ring for %s\\n\",\n \t\t\t\t\tname);\n \t\t\t\tret = eth_dev_ring_create(name, rte_socket_id(),\n-\t\t\t\t\t\t\t  DEV_ATTACH);\n+\t\t\t\t\t\t\t  DEV_ATTACH, &eth_dev);\n \t\t\t}\n \t\t\treturn ret;\n \t\t} else {\n@@ -560,7 +568,8 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)\n \t\t\tfor (info->count = 0; info->count < info->total; info->count++) {\n \t\t\t\tret = eth_dev_ring_create(info->list[info->count].name,\n \t\t\t\t\t\t\t  info->list[info->count].node,\n-\t\t\t\t\t\t\t  info->list[info->count].action);\n+\t\t\t\t\t\t\t  info->list[info->count].action,\n+\t\t\t\t\t\t\t  &eth_dev);\n \t\t\t\tif ((ret == -1) &&\n \t\t\t\t    (info->list[info->count].action == DEV_CREATE)) {\n \t\t\t\t\tRTE_LOG(INFO, PMD,\n@@ -568,12 +577,16 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)\n \t\t\t\t\t\tname);\n \t\t\t\t\tret = eth_dev_ring_create(name,\n \t\t\t\t\t\t\tinfo->list[info->count].node,\n-\t\t\t\t\t\t\tDEV_ATTACH);\n+\t\t\t\t\t\t\tDEV_ATTACH,\n+\t\t\t\t\t\t\t&eth_dev);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \n+\tif (eth_dev)\n+\t\teth_dev->device = &dev->device;\n+\n out_free:\n \trte_kvargs_free(kvlist);\n \trte_free(info);\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "1/3"
    ]
}