Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/66621/?format=api
http://patches.dpdk.org/api/patches/66621/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200313020806.21654-2-wei.zhao1@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": "<20200313020806.21654-2-wei.zhao1@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200313020806.21654-2-wei.zhao1@intel.com", "date": "2020-03-13T02:08:00", "name": "[1/7] net/ice: enable switch flow on DCF", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "279da22c1030a3ac8a21ce4394dd3badb8913965", "submitter": { "id": 495, "url": "http://patches.dpdk.org/api/people/495/?format=api", "name": "Zhao1, Wei", "email": "wei.zhao1@intel.com" }, "delegate": { "id": 31221, "url": "http://patches.dpdk.org/api/users/31221/?format=api", "username": "yexl", "first_name": "xiaolong", "last_name": "ye", "email": "xiaolong.ye@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200313020806.21654-2-wei.zhao1@intel.com/mbox/", "series": [ { "id": 8900, "url": "http://patches.dpdk.org/api/series/8900/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8900", "date": "2020-03-13T02:07:59", "name": "add switch filter support for intel DCF", "version": 1, "mbox": "http://patches.dpdk.org/series/8900/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/66621/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/66621/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 73BBBA0567;\n\tFri, 13 Mar 2020 03:28:50 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5C6C01C02D;\n\tFri, 13 Mar 2020 03:28:45 +0100 (CET)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by dpdk.org (Postfix) with ESMTP id 8AC671C02B\n for <dev@dpdk.org>; Fri, 13 Mar 2020 03:28:43 +0100 (CET)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Mar 2020 19:28:43 -0700", "from unknown (HELO localhost.localdomain.bj.intel.com)\n ([172.16.182.123])\n by fmsmga004.fm.intel.com with ESMTP; 12 Mar 2020 19:28:41 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,546,1574150400\"; d=\"scan'208\";a=\"266587167\"", "From": "Wei Zhao <wei.zhao1@intel.com>", "To": "dev@dpdk.org", "Cc": "qi.z.zhang@intel.com, xiaolong.ye@intel.com,\n Wei Zhao <wei.zhao1@intel.com>", "Date": "Fri, 13 Mar 2020 10:08:00 +0800", "Message-Id": "<20200313020806.21654-2-wei.zhao1@intel.com>", "X-Mailer": "git-send-email 2.19.1", "In-Reply-To": "<20200313020806.21654-1-wei.zhao1@intel.com>", "References": "<20200313020806.21654-1-wei.zhao1@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 1/7] net/ice: enable switch flow on DCF", "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": "DCF on CVL is a control plane VF which take the responsibility to\nconfigure all the PF/global resources, this patch add support DCF\non to program forward rule to direct packetS to VFs.\n\nSigned-off-by: Wei Zhao <wei.zhao1@intel.com>\n---\n drivers/net/ice/ice_dcf_ethdev.c | 10 ++++++--\n drivers/net/ice/ice_dcf_parent.c | 7 ++++++\n drivers/net/ice/ice_fdir_filter.c | 6 +++++\n drivers/net/ice/ice_hash.c | 6 +++++\n drivers/net/ice/ice_switch_filter.c | 39 ++++++++++++++++++++++++++++-\n 5 files changed, 65 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex f65b962d4..759d92afb 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -115,8 +115,8 @@ ice_dcf_dev_allmulticast_disable(__rte_unused struct rte_eth_dev *dev)\n static int\n ice_dcf_dev_filter_ctrl(struct rte_eth_dev *dev,\n \t\t\tenum rte_filter_type filter_type,\n-\t\t\t__rte_unused enum rte_filter_op filter_op,\n-\t\t\t__rte_unused void *arg)\n+\t\t\tenum rte_filter_op filter_op,\n+\t\t\tvoid *arg)\n {\n \tint ret = 0;\n \n@@ -124,6 +124,12 @@ ice_dcf_dev_filter_ctrl(struct rte_eth_dev *dev,\n \t\treturn -EINVAL;\n \n \tswitch (filter_type) {\n+\tcase RTE_ETH_FILTER_GENERIC:\n+\t\tif (filter_op != RTE_ETH_FILTER_GET)\n+\t\t\treturn -EINVAL;\n+\t\t*(const void **)arg = &ice_flow_ops;\n+\t\tbreak;\n+\n \tdefault:\n \t\tPMD_DRV_LOG(WARNING, \"Filter type (%d) not supported\",\n \t\t\t filter_type);\ndiff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c\nindex bca9cd34a..c2dc13936 100644\n--- a/drivers/net/ice/ice_dcf_parent.c\n+++ b/drivers/net/ice/ice_dcf_parent.c\n@@ -314,6 +314,12 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)\n \t}\n \tparent_adapter->active_pkg_type = ice_load_pkg_type(parent_hw);\n \n+\terr = ice_flow_init(parent_adapter);\n+\tif (err) {\n+\t\tPMD_INIT_LOG(ERR, \"Failed to initialize flow\");\n+\t\tgoto uninit_hw;\n+\t}\n+\n \tice_dcf_update_vf_vsi_map(parent_hw,\n \t\t\t\t hw->num_vfs, hw->vf_vsi_map);\n \n@@ -344,5 +350,6 @@ ice_dcf_uninit_parent_adapter(struct rte_eth_dev *eth_dev)\n \trte_eal_alarm_cancel(ice_dcf_vsi_update_service_handler,\n \t\t\t &adapter->real_hw);\n \n+\tice_flow_uninit(parent_adapter);\n \tice_dcf_uninit_parent_hw(parent_hw);\n }\ndiff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c\nindex d737c1acd..c9343c1fa 100644\n--- a/drivers/net/ice/ice_fdir_filter.c\n+++ b/drivers/net/ice/ice_fdir_filter.c\n@@ -1061,6 +1061,9 @@ ice_fdir_init(struct ice_adapter *ad)\n \tstruct ice_flow_parser *parser;\n \tint ret;\n \n+\tif (ad->hw.dcf_enabled)\n+\t\treturn 0;\n+\n \tret = ice_fdir_setup(pf);\n \tif (ret)\n \t\treturn ret;\n@@ -1081,6 +1084,9 @@ ice_fdir_uninit(struct ice_adapter *ad)\n \tstruct ice_pf *pf = &ad->pf;\n \tstruct ice_flow_parser *parser;\n \n+\tif (ad->hw.dcf_enabled)\n+\t\treturn;\n+\n \tif (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)\n \t\tparser = &ice_fdir_parser_comms;\n \telse\ndiff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c\nindex d891538bd..69d805248 100644\n--- a/drivers/net/ice/ice_hash.c\n+++ b/drivers/net/ice/ice_hash.c\n@@ -243,6 +243,9 @@ ice_hash_init(struct ice_adapter *ad)\n {\n \tstruct ice_flow_parser *parser = NULL;\n \n+\tif (ad->hw.dcf_enabled)\n+\t\treturn 0;\n+\n \tif (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)\n \t\tparser = &ice_hash_parser_os;\n \telse if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)\n@@ -560,6 +563,9 @@ ice_hash_destroy(struct ice_adapter *ad,\n static void\n ice_hash_uninit(struct ice_adapter *ad)\n {\n+\tif (ad->hw.dcf_enabled)\n+\t\treturn;\n+\n \tif (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)\n \t\tice_unregister_parser(&ice_hash_parser_os, ad);\n \telse if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)\ndiff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c\nindex 4a9356b31..c55e44e1a 100644\n--- a/drivers/net/ice/ice_switch_filter.c\n+++ b/drivers/net/ice/ice_switch_filter.c\n@@ -913,6 +913,39 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],\n \treturn 0;\n }\n \n+static int\n+ice_switch_parse_dcf_action(const struct rte_flow_action *actions,\n+\t\t\t struct rte_flow_error *error,\n+\t\t\t struct ice_adv_rule_info *rule_info)\n+{\n+\tconst struct rte_flow_action_vf *act_vf;\n+\tconst struct rte_flow_action *action;\n+\tenum rte_flow_action_type action_type;\n+\n+\tfor (action = actions; action->type !=\n+\t\t\t\tRTE_FLOW_ACTION_TYPE_END; action++) {\n+\t\taction_type = action->type;\n+\t\tswitch (action_type) {\n+\t\tcase RTE_FLOW_ACTION_TYPE_VF:\n+\t\t\trule_info->sw_act.fltr_act = ICE_FWD_TO_VSI;\n+\t\t\tact_vf = action->conf;\n+\t\t\trule_info->sw_act.vsi_handle = act_vf->id;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\trte_flow_error_set(error,\n+\t\t\t\t\t EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\t actions,\n+\t\t\t\t\t \"Invalid action type or queue number\");\n+\t\t\treturn -rte_errno;\n+\t\t}\n+\t}\n+\n+\trule_info->sw_act.src = rule_info->sw_act.vsi_handle;\n+\trule_info->rx = 1;\n+\trule_info->priority = 5;\n+\n+\treturn 0;\n+}\n \n static int\n ice_switch_parse_action(struct ice_pf *pf,\n@@ -1081,7 +1114,11 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,\n \t\tgoto error;\n \t}\n \n-\tret = ice_switch_parse_action(pf, actions, error, &rule_info);\n+\tif (ad->hw.dcf_enabled)\n+\t\tret = ice_switch_parse_dcf_action(actions, error, &rule_info);\n+\telse\n+\t\tret = ice_switch_parse_action(pf, actions, error, &rule_info);\n+\n \tif (ret) {\n \t\trte_flow_error_set(error, EINVAL,\n \t\t\t\t RTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n", "prefixes": [ "1/7" ] }{ "id": 66621, "url": "