get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64408,
    "url": "http://patches.dpdk.org/api/patches/64408/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1578667598-18942-1-git-send-email-anoobj@marvell.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": "<1578667598-18942-1-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1578667598-18942-1-git-send-email-anoobj@marvell.com",
    "date": "2020-01-10T14:46:38",
    "name": "examples/ipsec-secgw: increase number of qps to lcore_params",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c8302df163fe880c8a8bf1ea2f3f371c01c64247",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1578667598-18942-1-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 8052,
            "url": "http://patches.dpdk.org/api/series/8052/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8052",
            "date": "2020-01-10T14:46:38",
            "name": "examples/ipsec-secgw: increase number of qps to lcore_params",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8052/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64408/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/64408/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C09A3A04F9;\n\tFri, 10 Jan 2020 15:47:15 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 085E41EAB1;\n\tFri, 10 Jan 2020 15:47:15 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 63F711EAAA\n for <dev@dpdk.org>; Fri, 10 Jan 2020 15:47:12 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 00AEimHF011630; Fri, 10 Jan 2020 06:47:11 -0800",
            "from sc-exch04.marvell.com ([199.233.58.184])\n by mx0a-0016f401.pphosted.com with ESMTP id 2xeqey8r2v-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 10 Jan 2020 06:47:11 -0800",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com\n (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 10 Jan\n 2020 06:47:09 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Fri, 10 Jan 2020 06:47:10 -0800",
            "from ajoseph83.caveonetworks.com (unknown [10.29.45.60])\n by maili.marvell.com (Postfix) with ESMTP id 66EAA3F7040;\n Fri, 10 Jan 2020 06:47:07 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : mime-version : content-transfer-encoding :\n content-type; s=pfpt0818; bh=V2ax9Xn3flsuSbcxpDeMVztYSWutRXShK1nE2LqjJIA=;\n b=VfaagJF8YSyZ3XDyH8GvsPVdJt6nx2nu5uVfGZbMq90bDeQ0SrxtgEfME6VMl9rEGa0Z\n uwI4+vQU1FwiiVZQQXroYuzMeiNE7MA440INZYaHRjGTBVyFucNFOrpKJsNUFlppKgNJ\n MZguYi89jQhb2ByhNds7jw4aCexEtK4wsi7/Z/oqFlOkz27xA8CgMWqZKGaFBx1P/12J\n 1uHk8Ev/uUlWYI7pWh3lhVcJTKQgwjJfrgArBXgVym/GHtY4Ypg4FnfMZ2B44SG86mc2\n 78Cs98zOYJkRZ1MaeY0d5o6TH9Q86SUj0IqDcao14M6qGzZAsguZQeBSbUhFTYT+yXA4 cg==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <akhil.goyal@nxp.com>, Konstantin Ananyev\n <konstantin.ananyev@intel.com>, Radu Nicolau <radu.nicolau@intel.com>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Lukasz Bartosik <lbartosik@marvell.com>, Narayana Prasad\n <pathreya@marvell.com>, <dev@dpdk.org>",
        "Date": "Fri, 10 Jan 2020 20:16:38 +0530",
        "Message-ID": "<1578667598-18942-1-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-01-10_01:2020-01-10,\n 2020-01-09 signatures=0",
        "Subject": "[dpdk-dev] [PATCH] examples/ipsec-secgw: increase number of qps to\n\tlcore_params",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently only one qp will be used for one core. The number of qps can\nbe increased to match the number of lcore params.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n examples/ipsec-secgw/ipsec-secgw.c | 39 +++++++++++++++++++-------------------\n examples/ipsec-secgw/ipsec.h       |  4 +++-\n 2 files changed, 23 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c\nindex 3b5aaf6..d8c435e 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -1709,6 +1709,8 @@ add_mapping(struct rte_hash *map, const char *str, uint16_t cdev_id,\n \tunsigned long i;\n \tstruct cdev_key key = { 0 };\n \n+\tkey.port_id = params->port_id;\n+\tkey.queue_id = params->queue_id;\n \tkey.lcore_id = params->lcore_id;\n \tif (cipher)\n \t\tkey.cipher_algo = cipher->sym.cipher.algo;\n@@ -1721,23 +1723,17 @@ add_mapping(struct rte_hash *map, const char *str, uint16_t cdev_id,\n \tif (ret != -ENOENT)\n \t\treturn 0;\n \n-\tfor (i = 0; i < ipsec_ctx->nb_qps; i++)\n-\t\tif (ipsec_ctx->tbl[i].id == cdev_id)\n-\t\t\tbreak;\n-\n-\tif (i == ipsec_ctx->nb_qps) {\n-\t\tif (ipsec_ctx->nb_qps == MAX_QP_PER_LCORE) {\n-\t\t\tprintf(\"Maximum number of crypto devices assigned to \"\n-\t\t\t\t\"a core, increase MAX_QP_PER_LCORE value\\n\");\n-\t\t\treturn 0;\n-\t\t}\n-\t\tipsec_ctx->tbl[i].id = cdev_id;\n-\t\tipsec_ctx->tbl[i].qp = qp;\n-\t\tipsec_ctx->nb_qps++;\n-\t\tprintf(\"%s cdev mapping: lcore %u using cdev %u qp %u \"\n-\t\t\t\t\"(cdev_id_qp %lu)\\n\", str, key.lcore_id,\n-\t\t\t\tcdev_id, qp, i);\n+\ti = ipsec_ctx->nb_qps;\n+\tif (ipsec_ctx->nb_qps == MAX_QP_PER_LCORE) {\n+\t\tprintf(\"Maximum number of crypto devices assigned to a core, \"\n+\t\t       \"increase MAX_QP_PER_LCORE value\\n\");\n+\t\treturn 0;\n \t}\n+\tipsec_ctx->tbl[i].id = cdev_id;\n+\tipsec_ctx->tbl[i].qp = qp;\n+\tipsec_ctx->nb_qps++;\n+\tprintf(\"%s cdev mapping: lcore %u using cdev %u qp %u \"\n+\t       \"(cdev_id_qp %lu)\\n\", str, key.lcore_id, cdev_id, qp, i);\n \n \tret = rte_hash_add_key_data(map, &key, (void *)i);\n \tif (ret < 0) {\n@@ -1785,8 +1781,10 @@ add_cdev_mapping(struct rte_cryptodev_info *dev_info, uint16_t cdev_id,\n \t\t\tcontinue;\n \n \t\tif (i->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n-\t\t\tret |= add_mapping(map, str, cdev_id, qp, params,\n+\t\t\tret = add_mapping(map, str, cdev_id, qp, params,\n \t\t\t\t\tipsec_ctx, NULL, NULL, i);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n \t\t\tcontinue;\n \t\t}\n \n@@ -1801,12 +1799,15 @@ add_cdev_mapping(struct rte_cryptodev_info *dev_info, uint16_t cdev_id,\n \t\t\tif (j->sym.xform_type != RTE_CRYPTO_SYM_XFORM_AUTH)\n \t\t\t\tcontinue;\n \n-\t\t\tret |= add_mapping(map, str, cdev_id, qp, params,\n+\t\t\tret = add_mapping(map, str, cdev_id, qp, params,\n \t\t\t\t\t\tipsec_ctx, i, j, NULL);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n+\t\t\tcontinue;\n \t\t}\n \t}\n \n-\treturn ret;\n+\treturn 0;\n }\n \n /* Check if the device is enabled by cryptodev_mask */\ndiff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h\nindex 8e07521..92fd5eb 100644\n--- a/examples/ipsec-secgw/ipsec.h\n+++ b/examples/ipsec-secgw/ipsec.h\n@@ -200,7 +200,9 @@ struct ipsec_ctx {\n };\n \n struct cdev_key {\n-\tuint16_t lcore_id;\n+\tuint16_t port_id;\n+\tuint8_t queue_id;\n+\tuint8_t lcore_id;\n \tuint8_t cipher_algo;\n \tuint8_t auth_algo;\n \tuint8_t aead_algo;\n",
    "prefixes": []
}