Show a patch.

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

{
    "id": 41799,
    "url": "http://patches.dpdk.org/api/patches/41799/",
    "web_url": "http://patches.dpdk.org/patch/41799/",
    "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-5-pablo.de.lara.guarch@intel.com>",
    "date": "2018-06-28T00:52:52",
    "name": "[v3,04/16] test/crypto: limit number of sessions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fc384d63a3ae7e9e671ac237d657ffab896f9d24",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/",
        "name": "Pablo de Lara",
        "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/41799/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/41799/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41799/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 771798DA6;\n\tThu, 28 Jun 2018 10:59:29 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id BFA277EC7\n\tfor <dev@dpdk.org>; Thu, 28 Jun 2018 10:59:21 +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:08 -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-5-pablo.de.lara.guarch@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,282,1526367600\"; d=\"scan'208\";a=\"70667018\"",
        "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:52 +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 04/16] test/crypto: limit number of sessions"
    },
    "content": "Instead of using the maximum number of sessions\nallowed by the PMDs (which will change to unlimited most\nof the PMDs), limit the number to a small sufficient amount.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n test/test/test_cryptodev.c | 27 +++++++++++++++++++++------\n 1 file changed, 21 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c\nindex 389f79677..5c906cfae 100644\n--- a/test/test/test_cryptodev.c\n+++ b/test/test/test_cryptodev.c\n@@ -39,6 +39,7 @@\n #include \"test_cryptodev_hmac_test_vectors.h\"\n \n #define VDEV_ARGS_SIZE 100\n+#define MAX_NB_SESSIONS            4\n \n static int gbl_driver_id;\n \n@@ -435,9 +436,16 @@ testsuite_setup(void)\n \t * Create mempool with maximum number of sessions * 2,\n \t * to include the session headers\n \t */\n+\tif (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {\n+\t\tRTE_LOG(ERR, USER1, \"Device does not support \"\n+\t\t\t\t\"at least %u sessions\\n\",\n+\t\t\t\tMAX_NB_SESSIONS);\n+\t\treturn TEST_FAILED;\n+\t}\n+\n \tts_params->session_mpool = rte_mempool_create(\n \t\t\t\t\"test_sess_mp\",\n-\t\t\t\tinfo.sym.max_nb_sessions * 2,\n+\t\t\t\tMAX_NB_SESSIONS * 2,\n \t\t\t\tsession_size,\n \t\t\t\t0, 0, NULL, NULL, NULL,\n \t\t\t\tNULL, SOCKET_ID_ANY,\n@@ -6499,10 +6507,10 @@ test_multi_session(void)\n \n \tsessions = rte_malloc(NULL,\n \t\t\t(sizeof(struct rte_cryptodev_sym_session *) *\n-\t\t\tdev_info.sym.max_nb_sessions) + 1, 0);\n+\t\t\tMAX_NB_SESSIONS) + 1, 0);\n \n \t/* Create multiple crypto sessions*/\n-\tfor (i = 0; i < dev_info.sym.max_nb_sessions; i++) {\n+\tfor (i = 0; i < MAX_NB_SESSIONS; i++) {\n \n \t\tsessions[i] = rte_cryptodev_sym_session_create(\n \t\t\t\tts_params->session_mpool);\n@@ -6551,7 +6559,7 @@ test_multi_session(void)\n \tTEST_ASSERT_NULL(sessions[i],\n \t\t\t\"Session creation succeeded unexpectedly!\");\n \n-\tfor (i = 0; i < dev_info.sym.max_nb_sessions; i++) {\n+\tfor (i = 0; i < MAX_NB_SESSIONS; i++) {\n \t\trte_cryptodev_sym_session_clear(ts_params->valid_devs[0],\n \t\t\t\tsessions[i]);\n \t\trte_cryptodev_sym_session_free(sessions[i]);\n@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)\n \n \tsessions = rte_malloc(NULL,\n \t\t\t(sizeof(struct rte_cryptodev_sym_session *)\n-\t\t\t\t\t* dev_info.sym.max_nb_sessions) + 1, 0);\n+\t\t\t\t\t* MAX_NB_SESSIONS) + 1, 0);\n \n \tfor (i = 0; i < MB_SESSION_NUMBER; i++) {\n \t\tsessions[i] = rte_cryptodev_sym_session_create(\n@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)\n \t\tunsigned int session_size =\n \t\t\trte_cryptodev_sym_get_private_session_size(i);\n \n+\t\tif (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {\n+\t\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\t\t\"Device does not support \"\n+\t\t\t\t\t\"at least %u sessions\\n\",\n+\t\t\t\t\tMAX_NB_SESSIONS);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n \t\t/*\n \t\t * Create mempool with maximum number of sessions * 2,\n \t\t * to include the session headers\n@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)\n \t\tif (ts_params->session_mpool == NULL) {\n \t\t\tts_params->session_mpool = rte_mempool_create(\n \t\t\t\t\t\"test_sess_mp\",\n-\t\t\t\t\tinfo.sym.max_nb_sessions * 2,\n+\t\t\t\t\tMAX_NB_SESSIONS * 2,\n \t\t\t\t\tsession_size,\n \t\t\t\t\t0, 0, NULL, NULL, NULL,\n \t\t\t\t\tNULL, SOCKET_ID_ANY,\n",
    "prefixes": [
        "v3",
        "04/16"
    ]
}