get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41214,
    "url": "http://patches.dpdk.org/api/patches/41214/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180615165224.25004-21-jasvinder.singh@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": "<20180615165224.25004-21-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180615165224.25004-21-jasvinder.singh@intel.com",
    "date": "2018-06-15T16:52:22",
    "name": "[v2,20/22] net/softnic: receive and transmit queue setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1cede4503f129ec41f687ba0cfdad96e14da8dec",
    "submitter": {
        "id": 285,
        "url": "http://patches.dpdk.org/api/people/285/?format=api",
        "name": "Jasvinder Singh",
        "email": "jasvinder.singh@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patches.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180615165224.25004-21-jasvinder.singh@intel.com/mbox/",
    "series": [
        {
            "id": 147,
            "url": "http://patches.dpdk.org/api/series/147/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=147",
            "date": "2018-06-15T16:52:03",
            "name": "[v2,01/22] net/softnic: restructuring",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/147/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41214/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/41214/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 CE8671C11E;\n\tFri, 15 Jun 2018 18:53:23 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 7F0011C01E\n\tfor <dev@dpdk.org>; Fri, 15 Jun 2018 18:52:45 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Jun 2018 09:52:44 -0700",
            "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby fmsmga006.fm.intel.com with ESMTP; 15 Jun 2018 09:52:44 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,227,1526367600\"; d=\"scan'208\";a=\"237791147\"",
        "From": "Jasvinder Singh <jasvinder.singh@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "cristian.dumitrescu@intel.com",
        "Date": "Fri, 15 Jun 2018 17:52:22 +0100",
        "Message-Id": "<20180615165224.25004-21-jasvinder.singh@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20180615165224.25004-1-jasvinder.singh@intel.com>",
        "References": "<20180608124155.140663-2-jasvinder.singh@intel.com>\n\t<20180615165224.25004-1-jasvinder.singh@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 20/22] 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 0f445a8..1b75708 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": [
        "v2",
        "20/22"
    ]
}