Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/65554/?format=api
http://patches.dpdk.org/api/patches/65554/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1580824721-21527-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": "<1580824721-21527-10-git-send-email-lbartosik@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1580824721-21527-10-git-send-email-lbartosik@marvell.com", "date": "2020-02-04T13:58:37", "name": "[v3,09/13] examples/ipsec-secgw: add event helper config init/uninit", "commit_ref": null, "pull_url": null, "state": "superseded", "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/1580824721-21527-10-git-send-email-lbartosik@marvell.com/mbox/", "series": [ { "id": 8416, "url": "http://patches.dpdk.org/api/series/8416/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8416", "date": "2020-02-04T13:58:28", "name": "add eventmode to ipsec-secgw", "version": 3, "mbox": "http://patches.dpdk.org/series/8416/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/65554/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/65554/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 D70EDA0534;\n\tTue, 4 Feb 2020 15:00:36 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3F4C21C1F1;\n\tTue, 4 Feb 2020 14:59:21 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1CF1F1C1E8\n for <dev@dpdk.org>; Tue, 4 Feb 2020 14:59:19 +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 014Dsuv9005016; Tue, 4 Feb 2020 05:59:19 -0800", "from sc-exch01.marvell.com ([199.233.58.181])\n by mx0a-0016f401.pphosted.com with ESMTP id 2xw7jvmm7f-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 04 Feb 2020 05:59:19 -0800", "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Feb\n 2020 05:59:17 -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; Tue, 4 Feb 2020 05:59:17 -0800", "from luke.marvell.com (unknown [10.95.130.32])\n by maili.marvell.com (Postfix) with ESMTP id C234D3F7141;\n Tue, 4 Feb 2020 05:59:14 -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=MJZWdIm+CSdvr644hN2tkp1VyDR50oV6YaD+XiBkbEM=;\n b=y2xpq2OU62H1Np5RxSvCEhEDCfeQWMKhNTno/vQWid4slPWT84RgKjM0A8r3wRNsiTy/\n 1Ro4Uhed/4pSFx61JOfERfYS4EFzErLxl7nC1dDkxrUP2a2vapF7h/SQIBwYyPMmXssN\n AXlcU4VcJaiTHYPf6CXxNeaLjTGdrqGyd27vAM1z4dwKnE9UeixKGK7qDNLICFyYPETV\n KQrG/ulaHye5apPPgM8vV09brsl24yZBYY8qsVcC8i7bPijDdOLML9xEhacQ05lIThEH\n ocd+UbhrPIomYHVSvgg02XUUYMj1DJQ5r9wQRhap6zqOvHjYb0NbiCoNRK7YmqMWPy+z iw==", "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": "Tue, 4 Feb 2020 14:58:37 +0100", "Message-ID": "<1580824721-21527-10-git-send-email-lbartosik@marvell.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1580824721-21527-1-git-send-email-lbartosik@marvell.com>", "References": "<1579527918-360-1-git-send-email-anoobj@marvell.com>\n <1580824721-21527-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-04_04:2020-02-04,\n 2020-02-04 signatures=0", "Subject": "[dpdk-dev] [PATCH v3 09/13] 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 6b21884..423576d 100644\n--- a/examples/ipsec-secgw/event_helper.c\n+++ b/examples/ipsec-secgw/event_helper.c\n@@ -1385,6 +1385,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 15a7bd6..7ad975f 100644\n--- a/examples/ipsec-secgw/event_helper.h\n+++ b/examples/ipsec-secgw/event_helper.h\n@@ -50,6 +50,9 @@ extern \"C\" {\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@@ -204,6 +207,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": [ "v3", "09/13" ] }{ "id": 65554, "url": "