Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/39530/?format=api
http://patches.dpdk.org/api/patches/39530/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1525856209-27513-1-git-send-email-radu.nicolau@intel.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": "<1525856209-27513-1-git-send-email-radu.nicolau@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1525856209-27513-1-git-send-email-radu.nicolau@intel.com", "date": "2018-05-09T08:56:49", "name": "[dpdk-dev,v2] examples/ipsec-secgw: limit inflight packets count", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d07967b334f0cbae291fabdd29fc8dd215c03671", "submitter": { "id": 743, "url": "http://patches.dpdk.org/api/people/743/?format=api", "name": "Radu Nicolau", "email": "radu.nicolau@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1525856209-27513-1-git-send-email-radu.nicolau@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/39530/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/39530/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 7E735AA9E;\n\tWed, 9 May 2018 11:03:01 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id CCDE78E7A;\n\tWed, 9 May 2018 11:02:59 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 May 2018 02:02:58 -0700", "from silpixa00383879.ir.intel.com (HELO\n\tsilpixa00383879.ger.corp.intel.com) ([10.237.223.127])\n\tby orsmga008.jf.intel.com with ESMTP; 09 May 2018 02:02:56 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.49,381,1520924400\"; d=\"scan'208\";a=\"39846674\"", "From": "Radu Nicolau <radu.nicolau@intel.com>", "To": "dev@dpdk.org", "Cc": "akhil.goyal@nxp.com, pablo.de.lara.guarch@intel.com,\n\tRadu Nicolau <radu.nicolau@intel.com>, stable@dpdk.org", "Date": "Wed, 9 May 2018 09:56:49 +0100", "Message-Id": "<1525856209-27513-1-git-send-email-radu.nicolau@intel.com>", "X-Mailer": "git-send-email 2.7.5", "In-Reply-To": "<1522753631-9406-1-git-send-email-radu.nicolau@intel.com>", "References": "<1522753631-9406-1-git-send-email-radu.nicolau@intel.com>", "Subject": "[dpdk-dev] [PATCH v2] examples/ipsec-secgw: limit inflight packets\n\tcount", "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Revert previous patch that introduce a performance\ndegradation in certain scenarios and add a configurable\nlimit for number inflight packets.\n\nRevert\ncommit 84d4b5e4ec48 (\"examples/ipsec-secgw: improve IPsec dequeue logic\")\nCc: stable@dpdk.org\n\nSigned-off-by: Radu Nicolau <radu.nicolau@intel.com>\n---\nv2: updated enqueue size trim computation\n\n examples/ipsec-secgw/ipsec.c | 31 ++++++++++++++-----------------\n examples/ipsec-secgw/ipsec.h | 1 +\n 2 files changed, 15 insertions(+), 17 deletions(-)", "diff": "diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c\nindex ee24973..ef63031 100644\n--- a/examples/ipsec-secgw/ipsec.c\n+++ b/examples/ipsec-secgw/ipsec.c\n@@ -348,13 +348,18 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)\n static inline void\n enqueue_cop(struct cdev_qp *cqp, struct rte_crypto_op *cop)\n {\n-\tint32_t ret, i;\n+\tint32_t ret = 0, i;\n \n \tcqp->buf[cqp->len++] = cop;\n \n \tif (cqp->len == MAX_PKT_BURST) {\n-\t\tret = rte_cryptodev_enqueue_burst(cqp->id, cqp->qp,\n-\t\t\t\tcqp->buf, cqp->len);\n+\t\tint enq_size = cqp->len;\n+\t\tif (cqp->in_flight >= MAX_INFLIGHT)\n+\t\t\tenq_size -= (int)(cqp->in_flight - MAX_INFLIGHT);\n+\n+\t\tif (enq_size > 0)\n+\t\t\tret = rte_cryptodev_enqueue_burst(cqp->id, cqp->qp,\n+\t\t\t\t\tcqp->buf, enq_size);\n \t\tif (ret < cqp->len) {\n \t\t\tRTE_LOG_DP(DEBUG, IPSEC, \"Cryptodev %u queue %u:\"\n \t\t\t\t\t\" enqueued %u crypto ops out of %u\\n\",\n@@ -489,9 +494,12 @@ ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,\n \tstruct ipsec_sa *sa;\n \tstruct rte_mbuf *pkt;\n \n-\tfor (i = 0; i < ipsec_ctx->nb_qps && nb_pkts < max_pkts;) {\n+\tfor (i = 0; i < ipsec_ctx->nb_qps && nb_pkts < max_pkts; i++) {\n \t\tstruct cdev_qp *cqp;\n-\t\tcqp = &ipsec_ctx->tbl[ipsec_ctx->last_qp];\n+\n+\t\tcqp = &ipsec_ctx->tbl[ipsec_ctx->last_qp++];\n+\t\tif (ipsec_ctx->last_qp == ipsec_ctx->nb_qps)\n+\t\t\tipsec_ctx->last_qp %= ipsec_ctx->nb_qps;\n \n \t\twhile (ipsec_ctx->ol_pkts_cnt > 0 && nb_pkts < max_pkts) {\n \t\t\tpkt = ipsec_ctx->ol_pkts[--ipsec_ctx->ol_pkts_cnt];\n@@ -506,13 +514,8 @@ ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,\n \t\t\tpkts[nb_pkts++] = pkt;\n \t\t}\n \n-\t\tif (cqp->in_flight == 0) {\n-\t\t\tipsec_ctx->last_qp++;\n-\t\t\tif (ipsec_ctx->last_qp == ipsec_ctx->nb_qps)\n-\t\t\t\tipsec_ctx->last_qp %= ipsec_ctx->nb_qps;\n-\t\t\ti++;\n+\t\tif (cqp->in_flight == 0)\n \t\t\tcontinue;\n-\t\t}\n \n \t\tnb_cops = rte_cryptodev_dequeue_burst(cqp->id, cqp->qp,\n \t\t\t\tcops, max_pkts - nb_pkts);\n@@ -536,12 +539,6 @@ ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,\n \t\t\t\t}\n \t\t\t}\n \t\t\tpkts[nb_pkts++] = pkt;\n-\t\t\tif (cqp->in_flight < max_pkts) {\n-\t\t\t\tipsec_ctx->last_qp++;\n-\t\t\t\tif (ipsec_ctx->last_qp == ipsec_ctx->nb_qps)\n-\t\t\t\t\tipsec_ctx->last_qp %= ipsec_ctx->nb_qps;\n-\t\t\t\ti++;\n-\t\t\t}\n \t\t}\n \t}\n \ndiff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h\nindex c1450f6..9b87278 100644\n--- a/examples/ipsec-secgw/ipsec.h\n+++ b/examples/ipsec-secgw/ipsec.h\n@@ -17,6 +17,7 @@\n #define RTE_LOGTYPE_IPSEC_IPIP RTE_LOGTYPE_USER3\n \n #define MAX_PKT_BURST 32\n+#define MAX_INFLIGHT 128\n #define MAX_QP_PER_LCORE 256\n \n #define MAX_DIGEST_SIZE 32 /* Bytes -- 256 bits */\n", "prefixes": [ "dpdk-dev", "v2" ] }{ "id": 39530, "url": "