Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/116015/?format=api
https://patches.dpdk.org/api/patches/116015/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220907051040.119588-3-jie1x.wang@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": "<20220907051040.119588-3-jie1x.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220907051040.119588-3-jie1x.wang@intel.com", "date": "2022-09-07T05:10:37", "name": "[v5,2/5] net/iavf: add flow subscription to AVF", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "73e39a65661b2555e616ffa8e7643633c61eaed3", "submitter": { "id": 2201, "url": "https://patches.dpdk.org/api/people/2201/?format=api", "name": "Jie Wang", "email": "jie1x.wang@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220907051040.119588-3-jie1x.wang@intel.com/mbox/", "series": [ { "id": 24576, "url": "https://patches.dpdk.org/api/series/24576/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24576", "date": "2022-09-07T05:10:35", "name": "support flow subscription", "version": 5, "mbox": "https://patches.dpdk.org/series/24576/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/116015/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/116015/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 67BECA0550;\n\tWed, 7 Sep 2022 07:11:34 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6BD61427F1;\n\tWed, 7 Sep 2022 07:11:27 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id C3E4A427EB\n for <dev@dpdk.org>; Wed, 7 Sep 2022 07:11:24 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Sep 2022 22:11:24 -0700", "from intel-cd-odc-gavin.cd.intel.com ([10.240.178.187])\n by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Sep 2022 22:11:22 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1662527485; x=1694063485;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=gVoyauOnQLCXr0vfeC8DaAoxRZdXUuz8GSxEikAtako=;\n b=fSeOhWLHj4Y/JmJIDCQKoA8qSTmR0AMOWERFX8t+4R5Q3PdfGa7xOx7t\n S3fR6nh2VWw0Xtp02RLBUU4cp7Had/tZ6qpxfD7J83Ux72CTjirvPnkw2\n XHcx+yKsLHtV1fSHTMfScCQpXhs11wJyeZD7j4/gFbdcOEaO47HwkfvB7\n u+Dgy7e4K9rdpPKMJRBxT207PBJfKDLWUY5kaHPZ/VQ7IrIdi9FIxYEYX\n eLhqggX97K6RhFSOW49GmFKPxxpcRs19cJb3zkW/46H+fGXmoKt+i+M3O\n MlmMgoOTX76IJHdYgk8NpUSS6p1lkaweiEapkUZY9kElfJJrCr13aiNhF Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10462\"; a=\"283779080\"", "E=Sophos;i=\"5.93,295,1654585200\"; d=\"scan'208\";a=\"283779080\"", "E=Sophos;i=\"5.93,295,1654585200\"; d=\"scan'208\";a=\"676013001\"" ], "From": "Jie Wang <jie1x.wang@intel.com>", "To": "dev@dpdk.org", "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com,\n beilei.xing@intel.com, stevex.yang@intel.com,\n Jie Wang <jie1x.wang@intel.com>", "Subject": "[PATCH v5 2/5] net/iavf: add flow subscription to AVF", "Date": "Wed, 7 Sep 2022 13:10:37 +0800", "Message-Id": "<20220907051040.119588-3-jie1x.wang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220907051040.119588-1-jie1x.wang@intel.com>", "References": "<20220809062122.1203281-1-jie1x.wang@intel.com>\n <20220907051040.119588-1-jie1x.wang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "Add the skeletal code of flow subscription to AVF driver.\n\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\n---\n doc/guides/rel_notes/release_22_11.rst | 4 +\n drivers/net/iavf/iavf_fsub.c | 112 +++++++++++++++++++++++++\n drivers/net/iavf/iavf_generic_flow.c | 17 +++-\n drivers/net/iavf/iavf_generic_flow.h | 1 +\n drivers/net/iavf/iavf_vchnl.c | 1 +\n drivers/net/iavf/meson.build | 1 +\n 6 files changed, 135 insertions(+), 1 deletion(-)\n create mode 100644 drivers/net/iavf/iavf_fsub.c", "diff": "diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex 8c021cf050..bb77a03e24 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -55,6 +55,10 @@ New Features\n Also, make sure to start the actual text at the margin.\n =======================================================\n \n+* **Updated Intel iavf driver.**\n+\n+ * Added flow subscription support.\n+\n \n Removed Items\n -------------\ndiff --git a/drivers/net/iavf/iavf_fsub.c b/drivers/net/iavf/iavf_fsub.c\nnew file mode 100644\nindex 0000000000..17f9bb2976\n--- /dev/null\n+++ b/drivers/net/iavf/iavf_fsub.c\n@@ -0,0 +1,112 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2022 Intel Corporation\n+ */\n+\n+#include <sys/queue.h>\n+#include <stdio.h>\n+#include <errno.h>\n+#include <stdint.h>\n+#include <string.h>\n+#include <unistd.h>\n+#include <stdarg.h>\n+#include <rte_debug.h>\n+#include <rte_ether.h>\n+#include <rte_ethdev.h>\n+#include <rte_log.h>\n+#include <rte_malloc.h>\n+#include <rte_eth_ctrl.h>\n+#include <rte_tailq.h>\n+#include <rte_flow_driver.h>\n+#include <rte_flow.h>\n+#include <iavf.h>\n+#include \"iavf_generic_flow.h\"\n+\n+\n+static struct iavf_flow_parser iavf_fsub_parser;\n+\n+static struct iavf_pattern_match_item iavf_fsub_pattern_list[] = {};\n+\n+static int\n+iavf_fsub_create(__rte_unused struct iavf_adapter *ad,\n+\t\t __rte_unused struct rte_flow *flow,\n+\t\t __rte_unused void *meta,\n+\t\t __rte_unused struct rte_flow_error *error)\n+{\n+\treturn -rte_errno;\n+}\n+\n+static int\n+iavf_fsub_destroy(__rte_unused struct iavf_adapter *ad,\n+\t\t __rte_unused struct rte_flow *flow,\n+\t\t __rte_unused struct rte_flow_error *error)\n+{\n+\treturn -rte_errno;\n+}\n+\n+static int\n+iavf_fsub_validation(__rte_unused struct iavf_adapter *ad,\n+\t\t __rte_unused struct rte_flow *flow,\n+\t\t __rte_unused void *meta,\n+\t\t __rte_unused struct rte_flow_error *error)\n+{\n+\treturn -rte_errno;\n+};\n+\n+static int\n+iavf_fsub_parse(__rte_unused struct iavf_adapter *ad,\n+\t\t__rte_unused struct iavf_pattern_match_item *array,\n+\t\t__rte_unused uint32_t array_len,\n+\t\t__rte_unused const struct rte_flow_item pattern[],\n+\t\t__rte_unused const struct rte_flow_action actions[],\n+\t\t__rte_unused void **meta,\n+\t\t__rte_unused struct rte_flow_error *error)\n+{\n+\treturn -rte_errno;\n+}\n+\n+static int\n+iavf_fsub_init(struct iavf_adapter *ad)\n+{\n+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);\n+\tstruct iavf_flow_parser *parser;\n+\n+\tif (!vf->vf_res)\n+\t\treturn -EINVAL;\n+\n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_FSUB_PF)\n+\t\tparser = &iavf_fsub_parser;\n+\telse\n+\t\treturn -ENOTSUP;\n+\n+\treturn iavf_register_parser(parser, ad);\n+}\n+\n+static void\n+iavf_fsub_uninit(struct iavf_adapter *ad)\n+{\n+\tiavf_unregister_parser(&iavf_fsub_parser, ad);\n+}\n+\n+static struct\n+iavf_flow_engine iavf_fsub_engine = {\n+\t.init = iavf_fsub_init,\n+\t.uninit = iavf_fsub_uninit,\n+\t.create = iavf_fsub_create,\n+\t.destroy = iavf_fsub_destroy,\n+\t.validation = iavf_fsub_validation,\n+\t.type = IAVF_FLOW_ENGINE_FSUB,\n+};\n+\n+static struct\n+iavf_flow_parser iavf_fsub_parser = {\n+\t.engine = &iavf_fsub_engine,\n+\t.array = iavf_fsub_pattern_list,\n+\t.array_len = RTE_DIM(iavf_fsub_pattern_list),\n+\t.parse_pattern_action = iavf_fsub_parse,\n+\t.stage = IAVF_FLOW_STAGE_DISTRIBUTOR,\n+};\n+\n+RTE_INIT(iavf_fsub_engine_init)\n+{\n+\tiavf_register_flow_engine(&iavf_fsub_engine);\n+}\ndiff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c\nindex e1a611e319..b04614ba6e 100644\n--- a/drivers/net/iavf/iavf_generic_flow.c\n+++ b/drivers/net/iavf/iavf_generic_flow.c\n@@ -1866,6 +1866,8 @@ iavf_register_parser(struct iavf_flow_parser *parser,\n {\n \tstruct iavf_parser_list *list = NULL;\n \tstruct iavf_flow_parser_node *parser_node;\n+\tstruct iavf_flow_parser_node *existing_node;\n+\tvoid *temp;\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);\n \n \tparser_node = rte_zmalloc(\"iavf_parser\", sizeof(*parser_node), 0);\n@@ -1880,14 +1882,26 @@ iavf_register_parser(struct iavf_flow_parser *parser,\n \t\tTAILQ_INSERT_TAIL(list, parser_node, node);\n \t} else if (parser->engine->type == IAVF_FLOW_ENGINE_FDIR) {\n \t\tlist = &vf->dist_parser_list;\n+\t\tRTE_TAILQ_FOREACH_SAFE(existing_node, list, node, temp) {\n+\t\t\tif (existing_node->parser->engine->type ==\n+\t\t\t IAVF_FLOW_ENGINE_FSUB) {\n+\t\t\t\tTAILQ_INSERT_AFTER(list, existing_node,\n+\t\t\t\t\t\t parser_node, node);\n+\t\t\t\tgoto DONE;\n+\t\t\t}\n+\t\t}\n \t\tTAILQ_INSERT_HEAD(list, parser_node, node);\n \t} else if (parser->engine->type == IAVF_FLOW_ENGINE_IPSEC_CRYPTO) {\n \t\tlist = &vf->ipsec_crypto_parser_list;\n \t\tTAILQ_INSERT_HEAD(list, parser_node, node);\n+\t} else if (parser->engine->type == IAVF_FLOW_ENGINE_FSUB) {\n+\t\tlist = &vf->dist_parser_list;\n+\t\tTAILQ_INSERT_HEAD(list, parser_node, node);\n \t} else {\n \t\treturn -EINVAL;\n \t}\n \n+DONE:\n \treturn 0;\n }\n \n@@ -1902,7 +1916,8 @@ iavf_unregister_parser(struct iavf_flow_parser *parser,\n \n \tif (parser->engine->type == IAVF_FLOW_ENGINE_HASH)\n \t\tlist = &vf->rss_parser_list;\n-\telse if (parser->engine->type == IAVF_FLOW_ENGINE_FDIR)\n+\telse if ((parser->engine->type == IAVF_FLOW_ENGINE_FDIR) ||\n+\t\t (parser->engine->type == IAVF_FLOW_ENGINE_FSUB))\n \t\tlist = &vf->dist_parser_list;\n \n \tif (list == NULL)\ndiff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h\nindex 52eb1caf29..448facffa5 100644\n--- a/drivers/net/iavf/iavf_generic_flow.h\n+++ b/drivers/net/iavf/iavf_generic_flow.h\n@@ -480,6 +480,7 @@ enum iavf_flow_engine_type {\n \tIAVF_FLOW_ENGINE_IPSEC_CRYPTO,\n \tIAVF_FLOW_ENGINE_FDIR,\n \tIAVF_FLOW_ENGINE_HASH,\n+\tIAVF_FLOW_ENGINE_FSUB,\n \tIAVF_FLOW_ENGINE_MAX,\n };\n \ndiff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex 21bd1e2193..6d84add423 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -502,6 +502,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)\n \t\tVIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC |\n \t\tVIRTCHNL_VF_OFFLOAD_FDIR_PF |\n \t\tVIRTCHNL_VF_OFFLOAD_ADV_RSS_PF |\n+\t\tVIRTCHNL_VF_OFFLOAD_FSUB_PF |\n \t\tVIRTCHNL_VF_OFFLOAD_REQ_QUEUES |\n \t\tVIRTCHNL_VF_OFFLOAD_CRC |\n \t\tVIRTCHNL_VF_OFFLOAD_VLAN_V2 |\ndiff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build\nindex 2da37de662..6df771f917 100644\n--- a/drivers/net/iavf/meson.build\n+++ b/drivers/net/iavf/meson.build\n@@ -16,6 +16,7 @@ sources = files(\n 'iavf_hash.c',\n 'iavf_tm.c',\n 'iavf_ipsec_crypto.c',\n+ 'iavf_fsub.c',\n )\n \n if arch_subdir == 'x86'\n", "prefixes": [ "v5", "2/5" ] }{ "id": 116015, "url": "