Show a patch.

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

{
    "id": 41802,
    "url": "http://patches.dpdk.org/api/patches/41802/",
    "web_url": "http://patches.dpdk.org/patch/41802/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180628005304.26544-4-pablo.de.lara.guarch@intel.com>",
    "date": "2018-06-28T00:52:51",
    "name": "[v3,03/16] app/crypto-perf: limit number of sessions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1829d22a068d6f29f476207a3aecf628803a92a1",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/41802/mbox/",
    "series": [
        {
            "id": 286,
            "url": "http://patches.dpdk.org/api/series/286/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=286",
            "date": "2018-06-28T00:52:48",
            "name": "Cryptodev API changes for 18.08",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/286/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41802/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41802/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "X-ExtLoop1": "1",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Mailer": "git-send-email 2.14.4",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A87681B027;\n\tThu, 28 Jun 2018 10:59:35 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id D797D7EC7\n\tfor <dev@dpdk.org>; Thu, 28 Jun 2018 10:59:22 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Jun 2018 01:59:19 -0700",
            "from silpixa00399466.ir.intel.com (HELO\n\tsilpixa00399466.ger.corp.intel.com) ([10.237.223.220])\n\tby orsmga002.jf.intel.com with ESMTP; 28 Jun 2018 01:59:06 -0700"
        ],
        "References": "<20180608220234.10170-1-pablo.de.lara.guarch@intel.com>\n\t<20180628005304.26544-1-pablo.de.lara.guarch@intel.com>",
        "X-Amp-File-Uploaded": "False",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<20180628005304.26544-4-pablo.de.lara.guarch@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,282,1526367600\"; d=\"scan'208\";a=\"70667016\"",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "In-Reply-To": "<20180628005304.26544-1-pablo.de.lara.guarch@intel.com>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "declan.doherty@intel.com, akhil.goyal@nxp.com,\n\tshally.verma@caviumnetworks.com, ravi1.kumar@amd.com,\n\tjerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com,\n\tfiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Thu, 28 Jun 2018 01:52:51 +0100",
        "Cc": "dev@dpdk.org,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of\n\tsessions"
    },
    "content": "Instead of creating a fixed number of sessions,\ncalculate the necessary number based on number of devices\nand queue pairs used.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n app/test-crypto-perf/main.c | 31 ++++++++++++++++++++++++++++---\n 1 file changed, 28 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c\nindex 4ae14390b..b02d3f597 100644\n--- a/app/test-crypto-perf/main.c\n+++ b/app/test-crypto-perf/main.c\n@@ -21,7 +21,6 @@\n #include \"cperf_test_verify.h\"\n #include \"cperf_test_pmd_cyclecount.h\"\n \n-#define NUM_SESSIONS 2048\n #define SESS_MEMPOOL_CACHE_SIZE 64\n \n const char *cperf_test_type_strs[] = {\n@@ -149,15 +148,41 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,\n \t\t\t.nb_descriptors = opts->nb_descriptors\n \t\t};\n \n+\t\tuint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;\n+\t\t/* Two sessions objects are required for each session\n+\t\t * (one for the header, one for the private data)\n+\t\t */\n+\t\tuint32_t sessions_needed = 2 * enabled_cdev_count *\n+\t\t\t\t\t\topts->nb_qps;\n+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER\n+\t\tif (!strcmp((const char *)opts->device_type,\n+\t\t\t\t\t\"crypto_scheduler\")) {\n+\t\t\tuint32_t nb_slaves =\n+\t\t\t\trte_cryptodev_scheduler_slaves_get(cdev_id,\n+\t\t\t\t\t\t\t\tNULL);\n+\n+\t\t\tsessions_needed = 2 * enabled_cdev_count *\n+\t\t\t\topts->nb_qps * nb_slaves;\n+\t\t}\n+#endif\n+\t\t/*\n+\t\t * A single session is required per queue pair\n+\t\t * in each device\n+\t\t */\n+\t\tif (dev_max_nb_sess < opts->nb_qps) {\n+\t\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\t\"Device does not support at least \"\n+\t\t\t\t\"%u sessions\\n\", opts->nb_qps);\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n \t\tif (session_pool_socket[socket_id] == NULL) {\n \t\t\tchar mp_name[RTE_MEMPOOL_NAMESIZE];\n \t\t\tstruct rte_mempool *sess_mp;\n \n \t\t\tsnprintf(mp_name, RTE_MEMPOOL_NAMESIZE,\n \t\t\t\t\"sess_mp_%u\", socket_id);\n-\n \t\t\tsess_mp = rte_mempool_create(mp_name,\n-\t\t\t\t\t\tNUM_SESSIONS,\n+\t\t\t\t\t\tsessions_needed,\n \t\t\t\t\t\tmax_sess_size,\n \t\t\t\t\t\tSESS_MEMPOOL_CACHE_SIZE,\n \t\t\t\t\t\t0, NULL, NULL, NULL,\n",
    "prefixes": [
        "v3",
        "03/16"
    ]
}