Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/103422/?format=api
http://patches.dpdk.org/api/patches/103422/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211102053918.4063391-3-junfeng.guo@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": "<20211102053918.4063391-3-junfeng.guo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211102053918.4063391-3-junfeng.guo@intel.com", "date": "2021-11-02T05:39:16", "name": "[v9,2/4] net/ice/base: add function to set HW profile for raw flow", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "731e4069598b92f430f234fcf1d83f375211c318", "submitter": { "id": 1785, "url": "http://patches.dpdk.org/api/people/1785/?format=api", "name": "Junfeng Guo", "email": "junfeng.guo@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211102053918.4063391-3-junfeng.guo@intel.com/mbox/", "series": [ { "id": 20192, "url": "http://patches.dpdk.org/api/series/20192/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20192", "date": "2021-11-02T05:39:14", "name": "enable protocol agnostic flow offloading in FDIR", "version": 9, "mbox": "http://patches.dpdk.org/series/20192/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/103422/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/103422/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 293D8A0C4E;\n\tTue, 2 Nov 2021 06:40:38 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9D2DB41109;\n\tTue, 2 Nov 2021 06:40:34 +0100 (CET)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 3E94241104\n for <dev@dpdk.org>; Tue, 2 Nov 2021 06:40:32 +0100 (CET)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Nov 2021 22:40:31 -0700", "from dpdk-junfengguo-v1.sh.intel.com ([10.67.119.216])\n by orsmga007.jf.intel.com with ESMTP; 01 Nov 2021 22:40:27 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10155\"; a=\"218382108\"", "E=Sophos;i=\"5.87,201,1631602800\"; d=\"scan'208\";a=\"218382108\"", "E=Sophos;i=\"5.87,201,1631602800\"; d=\"scan'208\";a=\"488945157\"" ], "X-ExtLoop1": "1", "From": "Junfeng Guo <junfeng.guo@intel.com>", "To": "qi.z.zhang@intel.com,\n\tjingjing.wu@intel.com,\n\tbeilei.xing@intel.com", "Cc": "dev@dpdk.org, ferruh.yigit@intel.com, ting.xu@intel.com,\n junfeng.guo@intel.com", "Date": "Tue, 2 Nov 2021 13:39:16 +0800", "Message-Id": "<20211102053918.4063391-3-junfeng.guo@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211102053918.4063391-1-junfeng.guo@intel.com>", "References": "<20211101083612.2380503-5-junfeng.guo@intel.com>\n <20211102053918.4063391-1-junfeng.guo@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v9 2/4] net/ice/base: add function to set HW\n profile for raw flow", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Based on the parser library, we can directly set HW profile and\nassociate the main/ctrl vsi.\n\nThis patch set also updated the release date in README.\n\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n drivers/net/ice/base/README | 2 +-\n drivers/net/ice/base/ice_flex_pipe.c | 49 ++++++++++++++++\n drivers/net/ice/base/ice_flex_pipe.h | 3 +\n drivers/net/ice/base/ice_flow.c | 84 ++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_flow.h | 4 ++\n 5 files changed, 141 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ice/base/README b/drivers/net/ice/base/README\nindex 87a1cebfac..0b23fc4795 100644\n--- a/drivers/net/ice/base/README\n+++ b/drivers/net/ice/base/README\n@@ -6,7 +6,7 @@ Intel® ICE driver\n ==================\n \n This directory contains source code of FreeBSD ice driver of version\n-2021.04.29 released by the team which develops\n+2021.10.28 released by the team which develops\n basic drivers for any ice NIC. The directory of base/ contains the\n original source package.\n This driver is valid for the product(s) listed below\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 06a233990f..395787806b 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -6365,3 +6365,52 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \n \treturn status;\n }\n+\n+/**\n+ * ice_flow_assoc_hw_prof - add profile id flow for main/ctrl VSI flow entry\n+ * @hw: pointer to the HW struct\n+ * @blk: HW block\n+ * @dest_vsi_handle: dest VSI handle\n+ * @fdir_vsi_handle: fdir programming VSI handle\n+ * @id: profile id (handle)\n+ *\n+ * Calling this function will update the hardware tables to enable the\n+ * profile indicated by the ID parameter for the VSIs specified in the VSI\n+ * array. Once successfully called, the flow will be enabled.\n+ */\n+enum ice_status\n+ice_flow_assoc_hw_prof(struct ice_hw *hw, enum ice_block blk,\n+\t\t u16 dest_vsi_handle, u16 fdir_vsi_handle, int id)\n+{\n+\tenum ice_status status = ICE_SUCCESS;\n+\tu16 vsi_num;\n+\n+\tvsi_num = ice_get_hw_vsi_num(hw, dest_vsi_handle);\n+\tstatus = ice_add_prof_id_flow(hw, blk, vsi_num, id);\n+\tif (status) {\n+\t\tice_debug(hw, ICE_DBG_FLOW, \"HW profile add failed for main VSI flow entry, %d\\n\",\n+\t\t\t status);\n+\t\tgoto err_add_prof;\n+\t}\n+\n+\tif (blk != ICE_BLK_FD)\n+\t\treturn status;\n+\n+\tvsi_num = ice_get_hw_vsi_num(hw, fdir_vsi_handle);\n+\tstatus = ice_add_prof_id_flow(hw, blk, vsi_num, id);\n+\tif (status) {\n+\t\tice_debug(hw, ICE_DBG_FLOW, \"HW profile add failed for ctrl VSI flow entry, %d\\n\",\n+\t\t\t status);\n+\t\tgoto err_add_entry;\n+\t}\n+\n+\treturn status;\n+\n+err_add_entry:\n+\tvsi_num = ice_get_hw_vsi_num(hw, dest_vsi_handle);\n+\tice_rem_prof_id_flow(hw, blk, vsi_num, id);\n+err_add_prof:\n+\tice_flow_rem_prof(hw, blk, id);\n+\n+\treturn status;\n+}\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h\nindex dd332312dd..23ba45564a 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.h\n+++ b/drivers/net/ice/base/ice_flex_pipe.h\n@@ -76,6 +76,9 @@ enum ice_status\n ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);\n enum ice_status\n ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);\n+enum ice_status\n+ice_flow_assoc_hw_prof(struct ice_hw *hw, enum ice_block blk,\n+\t\t u16 dest_vsi_handle, u16 fdir_vsi_handle, int id);\n enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);\n enum ice_status\n ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);\ndiff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c\nindex 77b6b130c1..f699dbbc74 100644\n--- a/drivers/net/ice/base/ice_flow.c\n+++ b/drivers/net/ice/base/ice_flow.c\n@@ -2524,6 +2524,90 @@ ice_flow_disassoc_prof(struct ice_hw *hw, enum ice_block blk,\n \treturn status;\n }\n \n+#define FLAG_GTP_EH_PDU_LINK\tBIT_ULL(13)\n+#define FLAG_GTP_EH_PDU\t\tBIT_ULL(14)\n+\n+#define FLAG_GTPU_MSK\t\\\n+\t(FLAG_GTP_EH_PDU | FLAG_GTP_EH_PDU_LINK)\n+#define FLAG_GTPU_DW\t\\\n+\t(FLAG_GTP_EH_PDU | FLAG_GTP_EH_PDU_LINK)\n+#define FLAG_GTPU_UP\t\\\n+\t(FLAG_GTP_EH_PDU)\n+/**\n+ * ice_flow_set_hw_prof - Set HW flow profile based on the parsed profile info\n+ * @hw: pointer to the HW struct\n+ * @dest_vsi_handle: dest VSI handle\n+ * @fdir_vsi_handle: fdir programming VSI handle\n+ * @prof: stores parsed profile info from raw flow\n+ * @blk: classification stage\n+ */\n+enum ice_status\n+ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,\n+\t\t u16 fdir_vsi_handle, struct ice_parser_profile *prof,\n+\t\t enum ice_block blk)\n+{\n+\tint id = ice_find_first_bit(prof->ptypes, UINT16_MAX);\n+\tstruct ice_flow_prof_params *params;\n+\tu8 fv_words = hw->blk[blk].es.fvw;\n+\tenum ice_status status;\n+\tu16 vsi_num;\n+\tint i, idx;\n+\n+\tparams = (struct ice_flow_prof_params *)ice_malloc(hw, sizeof(*params));\n+\tif (!params)\n+\t\treturn ICE_ERR_NO_MEMORY;\n+\n+\tfor (i = 0; i < ICE_MAX_FV_WORDS; i++) {\n+\t\tparams->es[i].prot_id = ICE_PROT_INVALID;\n+\t\tparams->es[i].off = ICE_FV_OFFSET_INVAL;\n+\t}\n+\n+\tfor (i = 0; i < prof->fv_num; i++) {\n+\t\tif (hw->blk[blk].es.reverse)\n+\t\t\tidx = fv_words - i - 1;\n+\t\telse\n+\t\t\tidx = i;\n+\t\tparams->es[idx].prot_id = prof->fv[i].proto_id;\n+\t\tparams->es[idx].off = prof->fv[i].offset;\n+\t\tparams->mask[idx] = CPU_TO_BE16(prof->fv[i].msk);\n+\t}\n+\n+\tswitch (prof->flags) {\n+\tcase FLAG_GTPU_DW:\n+\t\tparams->attr = ice_attr_gtpu_down;\n+\t\tparams->attr_cnt = ARRAY_SIZE(ice_attr_gtpu_down);\n+\t\tbreak;\n+\tcase FLAG_GTPU_UP:\n+\t\tparams->attr = ice_attr_gtpu_up;\n+\t\tparams->attr_cnt = ARRAY_SIZE(ice_attr_gtpu_up);\n+\t\tbreak;\n+\tdefault:\n+\t\tif (prof->flags_msk & FLAG_GTPU_MSK) {\n+\t\t\tparams->attr = ice_attr_gtpu_session;\n+\t\t\tparams->attr_cnt = ARRAY_SIZE(ice_attr_gtpu_session);\n+\t\t}\n+\t\tbreak;\n+\t}\n+\n+\tstatus = ice_add_prof(hw, blk, id, (u8 *)prof->ptypes,\n+\t\t\t params->attr, params->attr_cnt,\n+\t\t\t params->es, params->mask, false);\n+\tif (status)\n+\t\tgoto free_params;\n+\n+\tstatus = ice_flow_assoc_hw_prof(hw, blk, dest_vsi_handle,\n+\t\t\t\t\tfdir_vsi_handle, id);\n+\tif (status)\n+\t\tgoto free_params;\n+\n+\treturn ICE_SUCCESS;\n+\n+free_params:\n+\tice_free(hw, params);\n+\n+\treturn status;\n+}\n+\n /**\n * ice_flow_add_prof - Add a flow profile for packet segments and matched fields\n * @hw: pointer to the HW struct\ndiff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h\nindex 371d960066..dea7b3c0e8 100644\n--- a/drivers/net/ice/base/ice_flow.h\n+++ b/drivers/net/ice/base/ice_flow.h\n@@ -548,6 +548,10 @@ enum ice_status\n ice_flow_assoc_vsig_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi_handle,\n \t\t\tu16 vsig);\n enum ice_status\n+ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,\n+\t\t u16 fdir_vsi_handle, struct ice_parser_profile *prof,\n+\t\t enum ice_block blk);\n+enum ice_status\n ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id,\n \t\t u8 *hw_prof);\n \n", "prefixes": [ "v9", "2/4" ] }{ "id": 103422, "url": "