Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/66106/?format=api
http://patches.dpdk.org/api/patches/66106/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1582820317-7333-10-git-send-email-lbartosik@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": "<1582820317-7333-10-git-send-email-lbartosik@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1582820317-7333-10-git-send-email-lbartosik@marvell.com", "date": "2020-02-27T16:18:31", "name": "[v5,09/15] examples/ipsec-secgw: add event helper config init/uninit", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b0d563a6d9fd391b8334d6ad9dd5b4ab2b980556", "submitter": { "id": 1305, "url": "http://patches.dpdk.org/api/people/1305/?format=api", "name": "Lukas Bartosik [C]", "email": "lbartosik@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/1582820317-7333-10-git-send-email-lbartosik@marvell.com/mbox/", "series": [ { "id": 8713, "url": "http://patches.dpdk.org/api/series/8713/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8713", "date": "2020-02-27T16:18:22", "name": "add eventmode to ipsec-secgw", "version": 5, "mbox": "http://patches.dpdk.org/series/8713/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/66106/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/66106/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 18666A055F;\n\tThu, 27 Feb 2020 17:20:36 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1A0411C026;\n\tThu, 27 Feb 2020 17:19:16 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 3CC5D2C4F\n for <dev@dpdk.org>; Thu, 27 Feb 2020 17:19:12 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 01RFsgap002477; Thu, 27 Feb 2020 08:19:11 -0800", "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0b-0016f401.pphosted.com with ESMTP id 2ydchth8g2-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 27 Feb 2020 08:19:11 -0800", "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 Feb\n 2020 08:19:09 -0800", "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 27 Feb 2020 08:19:09 -0800", "from luke.marvell.com (unknown [10.95.130.81])\n by maili.marvell.com (Postfix) with ESMTP id A389B3F704C;\n Thu, 27 Feb 2020 08:19:06 -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 : in-reply-to : references : mime-version :\n content-type; s=pfpt0818; bh=56hv1fEUQpgjUcj/adH7rv695hZsV2WEQpocMqORJwM=;\n b=l4nmXV/VjvOshxJEreDvASRjVt9eQpzuauheGKzAE2YvQfCsrO9B+pbulrOJ/BL0LPgy\n TLsnVIGhUDOLtp21LY/6Tg/g97YYIRZJxX2Snmm9mtd4nJHmInXwyTERwzWQcsgqQCm0\n lCqmMbUJZt4982ndfc/1341KACFGJ2pVNLRRIYWiFWfJkl9B503pojmJs2QYYyQy/yk+\n 0NdsTr6H37OH+XpnMuHQS4lHJ+Z6rz/sUDqxpUkbnMS/Qa6ukfqkNIvdWZmurAU1v0sw\n lUIRWkOsBsZLOHMB0ZIJh18midefWRG9srzcapOpH9IEFgp9FVHw5N7X57WV/diK0q6K Xw==", "From": "Lukasz Bartosik <lbartosik@marvell.com>", "To": "Akhil Goyal <akhil.goyal@nxp.com>, Radu Nicolau <radu.nicolau@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>", "CC": "Jerin Jacob <jerinj@marvell.com>, Narayana Prasad <pathreya@marvell.com>,\n Ankur Dwivedi <adwivedi@marvell.com>, Anoob Joseph <anoobj@marvell.com>,\n Archana Muniganti <marchana@marvell.com>, Tejasree Kondoj\n <ktejasree@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>,\n \"Konstantin Ananyev\" <konstantin.ananyev@intel.com>, <dev@dpdk.org>", "Date": "Thu, 27 Feb 2020 17:18:31 +0100", "Message-ID": "<1582820317-7333-10-git-send-email-lbartosik@marvell.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1582820317-7333-1-git-send-email-lbartosik@marvell.com>", "References": "<1582185727-6749-1-git-send-email-lbartosik@marvell.com>\n <1582820317-7333-1-git-send-email-lbartosik@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-02-27_05:2020-02-26,\n 2020-02-27 signatures=0", "Subject": "[dpdk-dev] [PATCH v5 09/15] examples/ipsec-secgw: add event helper\n\tconfig init/uninit", "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": "Add eventmode helper eh_conf_init and eh_conf_uninit\nfunctions which purpose is to initialize and\nunitialize eventmode helper configuration.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Lukasz Bartosik <lbartosik@marvell.com>\n---\n examples/ipsec-secgw/event_helper.c | 103 ++++++++++++++++++++++++++++++++++++\n examples/ipsec-secgw/event_helper.h | 23 ++++++++\n 2 files changed, 126 insertions(+)", "diff": "diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c\nindex fe047ab..0854fc2 100644\n--- a/examples/ipsec-secgw/event_helper.c\n+++ b/examples/ipsec-secgw/event_helper.c\n@@ -1379,6 +1379,109 @@ eh_display_link_conf(struct eventmode_conf *em_conf)\n \tEH_LOG_INFO(\"\");\n }\n \n+struct eh_conf *\n+eh_conf_init(void)\n+{\n+\tstruct eventmode_conf *em_conf = NULL;\n+\tstruct eh_conf *conf = NULL;\n+\tunsigned int eth_core_id;\n+\tvoid *bitmap = NULL;\n+\tuint32_t nb_bytes;\n+\n+\t/* Allocate memory for config */\n+\tconf = calloc(1, sizeof(struct eh_conf));\n+\tif (conf == NULL) {\n+\t\tEH_LOG_ERR(\"Failed to allocate memory for eventmode helper \"\n+\t\t\t \"config\");\n+\t\treturn NULL;\n+\t}\n+\n+\t/* Set default conf */\n+\n+\t/* Packet transfer mode: poll */\n+\tconf->mode = EH_PKT_TRANSFER_MODE_POLL;\n+\n+\t/* Keep all ethernet ports enabled by default */\n+\tconf->eth_portmask = -1;\n+\n+\t/* Allocate memory for event mode params */\n+\tconf->mode_params = calloc(1, sizeof(struct eventmode_conf));\n+\tif (conf->mode_params == NULL) {\n+\t\tEH_LOG_ERR(\"Failed to allocate memory for event mode params\");\n+\t\tgoto free_conf;\n+\t}\n+\n+\t/* Get eventmode conf */\n+\tem_conf = conf->mode_params;\n+\n+\t/* Allocate and initialize bitmap for eth cores */\n+\tnb_bytes = rte_bitmap_get_memory_footprint(RTE_MAX_LCORE);\n+\tif (!nb_bytes) {\n+\t\tEH_LOG_ERR(\"Failed to get bitmap footprint\");\n+\t\tgoto free_em_conf;\n+\t}\n+\n+\tbitmap = rte_zmalloc(\"event-helper-ethcore-bitmap\", nb_bytes,\n+\t\t\t RTE_CACHE_LINE_SIZE);\n+\tif (!bitmap) {\n+\t\tEH_LOG_ERR(\"Failed to allocate memory for eth cores bitmap\\n\");\n+\t\tgoto free_em_conf;\n+\t}\n+\n+\tem_conf->eth_core_mask = rte_bitmap_init(RTE_MAX_LCORE, bitmap,\n+\t\t\t\t\t\t nb_bytes);\n+\tif (!em_conf->eth_core_mask) {\n+\t\tEH_LOG_ERR(\"Failed to initialize bitmap\");\n+\t\tgoto free_bitmap;\n+\t}\n+\n+\t/* Set schedule type as not set */\n+\tem_conf->ext_params.sched_type = SCHED_TYPE_NOT_SET;\n+\n+\t/* Set two cores as eth cores for Rx & Tx */\n+\n+\t/* Use first core other than master core as Rx core */\n+\teth_core_id = rte_get_next_lcore(0,\t/* curr core */\n+\t\t\t\t\t 1,\t/* skip master core */\n+\t\t\t\t\t 0\t/* wrap */);\n+\n+\trte_bitmap_set(em_conf->eth_core_mask, eth_core_id);\n+\n+\t/* Use next core as Tx core */\n+\teth_core_id = rte_get_next_lcore(eth_core_id,\t/* curr core */\n+\t\t\t\t\t 1,\t\t/* skip master core */\n+\t\t\t\t\t 0\t\t/* wrap */);\n+\n+\trte_bitmap_set(em_conf->eth_core_mask, eth_core_id);\n+\n+\treturn conf;\n+\n+free_bitmap:\n+\trte_free(bitmap);\n+free_em_conf:\n+\tfree(em_conf);\n+free_conf:\n+\tfree(conf);\n+\treturn NULL;\n+}\n+\n+void\n+eh_conf_uninit(struct eh_conf *conf)\n+{\n+\tstruct eventmode_conf *em_conf = NULL;\n+\n+\tif (!conf || !conf->mode_params)\n+\t\treturn;\n+\n+\t/* Get eventmode conf */\n+\tem_conf = conf->mode_params;\n+\n+\t/* Free evenmode configuration memory */\n+\trte_free(em_conf->eth_core_mask);\n+\tfree(em_conf);\n+\tfree(conf);\n+}\n+\n void\n eh_display_conf(struct eh_conf *conf)\n {\ndiff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h\nindex 25c8563..e17cab1 100644\n--- a/examples/ipsec-secgw/event_helper.h\n+++ b/examples/ipsec-secgw/event_helper.h\n@@ -46,6 +46,9 @@\n /* Max adapters that one Tx core can handle */\n #define EVENT_MODE_MAX_ADAPTERS_PER_TX_CORE EVENT_MODE_MAX_TX_ADAPTERS\n \n+/* Used to indicate that queue schedule type is not set */\n+#define SCHED_TYPE_NOT_SET\t3\n+\n /**\n * Packet transfer mode of the application\n */\n@@ -200,6 +203,26 @@ struct eh_app_worker_params {\n };\n \n /**\n+ * Allocate memory for event helper configuration and initialize\n+ * it with default values.\n+ *\n+ * @return\n+ * - pointer to event helper configuration structure on success.\n+ * - NULL on failure.\n+ */\n+struct eh_conf *\n+eh_conf_init(void);\n+\n+/**\n+ * Uninitialize event helper configuration and release its memory\n+. *\n+ * @param conf\n+ * Event helper configuration\n+ */\n+void\n+eh_conf_uninit(struct eh_conf *conf);\n+\n+/**\n * Initialize event mode devices\n *\n * Application can call this function to get the event devices, eth devices\n", "prefixes": [ "v5", "09/15" ] }{ "id": 66106, "url": "