Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41492/?format=api
https://patches.dpdk.org/api/patches/41492/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180625084856.25205-5-pablo.de.lara.guarch@intel.com/", "project": { "id": 1, "url": "https://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": "<20180625084856.25205-5-pablo.de.lara.guarch@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180625084856.25205-5-pablo.de.lara.guarch@intel.com", "date": "2018-06-25T08:48:45", "name": "[v2,04/15] test/crypto: limit number of sessions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fc384d63a3ae7e9e671ac237d657ffab896f9d24", "submitter": { "id": 9, "url": "https://patches.dpdk.org/api/people/9/?format=api", "name": "De Lara Guarch, Pablo", "email": "pablo.de.lara.guarch@intel.com" }, "delegate": { "id": 22, "url": "https://patches.dpdk.org/api/users/22/?format=api", "username": "pdelarag", "first_name": "Pablo", "last_name": "de Lara Guarch", "email": "pablo.de.lara.guarch@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180625084856.25205-5-pablo.de.lara.guarch@intel.com/mbox/", "series": [ { "id": 226, "url": "https://patches.dpdk.org/api/series/226/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=226", "date": "2018-06-25T08:48:41", "name": "Cryptodev API changes for 18.08", "version": 2, "mbox": "https://patches.dpdk.org/series/226/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/41492/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/41492/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 909B65592;\n\tMon, 25 Jun 2018 18:54:59 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 507154CA6\n\tfor <dev@dpdk.org>; Mon, 25 Jun 2018 18:54:50 +0200 (CEST)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2018 09:54:49 -0700", "from silpixa00399466.ir.intel.com (HELO\n\tsilpixa00399466.ger.corp.intel.com) ([10.237.223.220])\n\tby fmsmga004.fm.intel.com with ESMTP; 25 Jun 2018 09:54:47 -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,270,1526367600\"; d=\"scan'208\";a=\"66193854\"", "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>", "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", "Cc": "dev@dpdk.org,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>", "Date": "Mon, 25 Jun 2018 09:48:45 +0100", "Message-Id": "<20180625084856.25205-5-pablo.de.lara.guarch@intel.com>", "X-Mailer": "git-send-email 2.14.4", "In-Reply-To": "<20180625084856.25205-1-pablo.de.lara.guarch@intel.com>", "References": "<20180608220234.10170-1-pablo.de.lara.guarch@intel.com>\n\t<20180625084856.25205-1-pablo.de.lara.guarch@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 04/15] test/crypto: limit number of sessions", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "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": [ "v2", "04/15" ] }{ "id": 41492, "url": "