get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 40846,
    "url": "http://patchwork.dpdk.org/api/patches/40846/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180608124155.140663-21-jasvinder.singh@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20180608124155.140663-21-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180608124155.140663-21-jasvinder.singh@intel.com",
    "date": "2018-06-08T12:41:54",
    "name": "[dpdk-dev,20/21] net/softnic: receive and transmit queue setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1cede4503f129ec41f687ba0cfdad96e14da8dec",
    "submitter": {
        "id": 285,
        "url": "http://patchwork.dpdk.org/api/people/285/?format=api",
        "name": "Jasvinder Singh",
        "email": "jasvinder.singh@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patchwork.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180608124155.140663-21-jasvinder.singh@intel.com/mbox/",
    "series": [
        {
            "id": 52,
            "url": "http://patchwork.dpdk.org/api/series/52/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=52",
            "date": "2018-06-08T12:41:35",
            "name": "[dpdk-dev,01/21] net/softnic: restructuring",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/52/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/40846/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/40846/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 72FCA7F0C;\n\tFri,  8 Jun 2018 14:42:52 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id D3B046CA3\n\tfor <dev@dpdk.org>; Fri,  8 Jun 2018 14:42:22 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jun 2018 05:42:20 -0700",
            "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby fmsmga005.fm.intel.com with ESMTP; 08 Jun 2018 05:42:18 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.49,490,1520924400\"; d=\"scan'208\";a=\"235505401\"",
        "From": "Jasvinder Singh <jasvinder.singh@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "cristian.dumitrescu@intel.com",
        "Date": "Fri,  8 Jun 2018 13:41:54 +0100",
        "Message-Id": "<20180608124155.140663-21-jasvinder.singh@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20180608124155.140663-1-jasvinder.singh@intel.com>",
        "References": "<20180608124155.140663-1-jasvinder.singh@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 20/21] net/softnic: receive and transmit queue\n\tsetup",
        "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://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": "<https://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": "Implements softnic receive and transmit queues setup using swq object.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic.c | 62 ++++++++++++++++++-----------------\n 1 file changed, 32 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c\nindex 9641725..e91e1cb 100644\n--- a/drivers/net/softnic/rte_eth_softnic.c\n+++ b/drivers/net/softnic/rte_eth_softnic.c\n@@ -88,26 +88,27 @@ static int\n pmd_rx_queue_setup(struct rte_eth_dev *dev,\n \tuint16_t rx_queue_id,\n \tuint16_t nb_rx_desc,\n-\tunsigned int socket_id,\n+\tunsigned int socket_id __rte_unused,\n \tconst struct rte_eth_rxconf *rx_conf __rte_unused,\n \tstruct rte_mempool *mb_pool __rte_unused)\n {\n-\tuint32_t size = RTE_ETH_NAME_MAX_LEN + strlen(\"_rxq\") + 4;\n-\tchar name[size];\n-\tstruct rte_ring *r;\n-\n-\tsnprintf(name, sizeof(name), \"%s_rxq%04x\",\n-\t\tdev->data->name,\n-\t\trx_queue_id);\n-\n-\tr = rte_ring_create(name,\n-\t\tnb_rx_desc,\n-\t\tsocket_id,\n-\t\tRING_F_SP_ENQ | RING_F_SC_DEQ);\n-\tif (r == NULL)\n+\tchar name[NAME_SIZE];\n+\tstruct pmd_internals *p = dev->data->dev_private;\n+\tstruct swq *swq;\n+\n+\tstruct swq_params params = {\n+\t\t.size = nb_rx_desc,\n+\t};\n+\n+\tsnprintf(name, sizeof(name), \"RXQ%u\", rx_queue_id);\n+\n+\tswq = swq_create(p,\n+\t\tname,\n+\t\t&params);\n+\tif (swq == NULL)\n \t\treturn -1;\n \n-\tdev->data->rx_queues[rx_queue_id] = r;\n+\tdev->data->rx_queues[rx_queue_id] = swq->r;\n \treturn 0;\n }\n \n@@ -115,25 +116,26 @@ static int\n pmd_tx_queue_setup(struct rte_eth_dev *dev,\n \tuint16_t tx_queue_id,\n \tuint16_t nb_tx_desc,\n-\tunsigned int socket_id,\n+\tunsigned int socket_id __rte_unused,\n \tconst struct rte_eth_txconf *tx_conf __rte_unused)\n {\n-\tuint32_t size = RTE_ETH_NAME_MAX_LEN + strlen(\"_txq\") + 4;\n-\tchar name[size];\n-\tstruct rte_ring *r;\n-\n-\tsnprintf(name, sizeof(name), \"%s_txq%04x\",\n-\t\tdev->data->name,\n-\t\ttx_queue_id);\n-\n-\tr = rte_ring_create(name,\n-\t\tnb_tx_desc,\n-\t\tsocket_id,\n-\t\tRING_F_SP_ENQ | RING_F_SC_DEQ);\n-\tif (r == NULL)\n+\tchar name[NAME_SIZE];\n+\tstruct pmd_internals *p = dev->data->dev_private;\n+\tstruct swq *swq;\n+\n+\tstruct swq_params params = {\n+\t\t.size = nb_tx_desc,\n+\t};\n+\n+\tsnprintf(name, sizeof(name), \"TXQ%u\", tx_queue_id);\n+\n+\tswq = swq_create(p,\n+\t\tname,\n+\t\t&params);\n+\tif (swq == NULL)\n \t\treturn -1;\n \n-\tdev->data->tx_queues[tx_queue_id] = r;\n+\tdev->data->tx_queues[tx_queue_id] = swq->r;\n \treturn 0;\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "20/21"
    ]
}