Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/94788/?format=api
https://patches.dpdk.org/api/patches/94788/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210624070759.45204-1-beilei.xing@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": "<20210624070759.45204-1-beilei.xing@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210624070759.45204-1-beilei.xing@intel.com", "date": "2021-06-24T07:07:59", "name": "net/i40e: fix FDIR input set conflict issue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "88132aee10b91eec5a10e50d4eda69b6eb53d471", "submitter": { "id": 410, "url": "https://patches.dpdk.org/api/people/410/?format=api", "name": "Xing, Beilei", "email": "beilei.xing@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210624070759.45204-1-beilei.xing@intel.com/mbox/", "series": [ { "id": 17467, "url": "https://patches.dpdk.org/api/series/17467/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17467", "date": "2021-06-24T07:07:59", "name": "net/i40e: fix FDIR input set conflict issue", "version": 1, "mbox": "https://patches.dpdk.org/series/17467/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/94788/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/94788/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 CBAA2A0C41;\n\tThu, 24 Jun 2021 09:20:58 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 581BD40141;\n\tThu, 24 Jun 2021 09:20:58 +0200 (CEST)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 1C4734003C;\n Thu, 24 Jun 2021 09:20:56 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jun 2021 00:20:55 -0700", "from dpdk-beileix-3.sh.intel.com ([10.67.110.182])\n by orsmga001.jf.intel.com with ESMTP; 24 Jun 2021 00:20:53 -0700" ], "IronPort-SDR": [ "\n 2OWVnvsWUlJBIDXz6ENXF0xy09xM3u6VKV/v+l2l44NKMKKCSy+x3dqXJ0gbhvkmwrHsHW/Irf\n MNM7nilITMQw==", "\n YiUktK4r17nyLIhERQ48w4f9aIDzwTdRsl/mDx4GuegfLXPs5Zhi7PrPNbmcFYzHT5FcZC/ONT\n sgFWPMRg9Swg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10024\"; a=\"187795208\"", "E=Sophos;i=\"5.83,295,1616482800\"; d=\"scan'208\";a=\"187795208\"", "E=Sophos;i=\"5.83,295,1616482800\"; d=\"scan'208\";a=\"487649369\"" ], "X-ExtLoop1": "1", "From": "beilei.xing@intel.com", "To": "qi.z.zhang@intel.com", "Cc": "dev@dpdk.org,\n\tBeilei Xing <beilei.xing@intel.com>,\n\tstable@dpdk.org", "Date": "Thu, 24 Jun 2021 15:07:59 +0800", "Message-Id": "<20210624070759.45204-1-beilei.xing@intel.com>", "X-Mailer": "git-send-email 2.26.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] net/i40e: fix FDIR input set conflict issue", "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": "From: Beilei Xing <beilei.xing@intel.com>\n\nCurrently, there'll be conflict error when running\nthe folowing commands:\n1. flow create 0 ingress\n pattern eth / ipv4 / udp src is 32 / end\n actions queue index 2 / end\n2. flow destroy 0 rule 0\n3. flow create 0 ingress\n pattern eth / ipv4 / udp dst is 32 / end\n actions queue index 2 / end\n\nThis patch fixes the input set conflict issue.\n\nFixes: 42044b69c67d (\"net/i40e: support input set selection for FDIR\")\nFixes: 4a072ad43442 (\"net/i40e: fix flow director config after flow validate\")\nCc: stable@dpdk.org\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 5 +++++\n drivers/net/i40e/i40e_ethdev.h | 2 +-\n drivers/net/i40e/i40e_fdir.c | 7 ++++---\n drivers/net/i40e/i40e_flow.c | 2 +-\n 4 files changed, 11 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex dd61258739..df716c180f 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -1087,6 +1087,7 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)\n \tchar fdir_hash_name[RTE_HASH_NAMESIZE];\n \tuint32_t alloc = hw->func_caps.fd_filters_guaranteed;\n \tuint32_t best = hw->func_caps.fd_filters_best_effort;\n+\tenum i40e_filter_pctype pctype;\n \tstruct rte_bitmap *bmp = NULL;\n \tuint32_t bmp_size;\n \tvoid *mem = NULL;\n@@ -1135,6 +1136,10 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)\n \t\tgoto err_fdir_filter_array_alloc;\n \t}\n \n+\tfor (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;\n+\t pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)\n+\t\tpf->fdir.flow_count[pctype] = 0;\n+\n \tfdir_info->fdir_space_size = alloc + best;\n \tfdir_info->fdir_actual_cnt = 0;\n \tfdir_info->fdir_guarantee_total_space = alloc;\ndiff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h\nindex ba6acd1878..585a0d8eb2 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -788,7 +788,7 @@ struct i40e_fdir_info {\n \tbool flex_pit_flag[I40E_MAX_FLXPLD_LAYER];\n \tbool flex_mask_flag[I40E_FILTER_PCTYPE_MAX];\n \n-\tbool inset_flag[I40E_FILTER_PCTYPE_MAX]; /* Mark if input set is set */\n+\tuint32_t flow_count[I40E_FILTER_PCTYPE_MAX];\n \n \tuint32_t flex_flow_count[I40E_MAX_FLXPLD_LAYER];\n };\ndiff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c\nindex 20658816ee..6f73936091 100644\n--- a/drivers/net/i40e/i40e_fdir.c\n+++ b/drivers/net/i40e/i40e_fdir.c\n@@ -1607,13 +1607,13 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,\n \t}\n \n \t/* Check if the configuration is conflicted */\n-\tif (pf->fdir.inset_flag[pctype] &&\n+\tif (pf->fdir.flow_count[pctype] &&\n \t memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) {\n \t\tPMD_DRV_LOG(ERR, \"Conflict with the first rule's input set.\");\n \t\treturn -EINVAL;\n \t}\n \n-\tif (pf->fdir.inset_flag[pctype] &&\n+\tif (pf->fdir.flow_count[pctype] &&\n \t !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))\n \t\treturn 0;\n \n@@ -1666,7 +1666,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,\n \tI40E_WRITE_FLUSH(hw);\n \n \tpf->fdir.input_set[pctype] = input_set;\n-\tpf->fdir.inset_flag[pctype] = 1;\n \treturn 0;\n }\n \n@@ -1890,11 +1889,13 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,\n \t}\n \n \tif (add) {\n+\t\tfdir_info->flow_count[pctype]++;\n \t\tfdir_info->fdir_actual_cnt++;\n \t\tif (fdir_info->fdir_invalprio == 1 &&\n \t\t\t\tfdir_info->fdir_guarantee_free_space > 0)\n \t\t\tfdir_info->fdir_guarantee_free_space--;\n \t} else {\n+\t\tfdir_info->flow_count[pctype]--;\n \t\tfdir_info->fdir_actual_cnt--;\n \t\tif (fdir_info->fdir_invalprio == 1 &&\n \t\t\t\tfdir_info->fdir_guarantee_free_space <\ndiff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c\nindex 2cc9ad9ef7..ff8441b378 100644\n--- a/drivers/net/i40e/i40e_flow.c\n+++ b/drivers/net/i40e/i40e_flow.c\n@@ -4940,7 +4940,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)\n \n \t\tfor (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;\n \t\t pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {\n-\t\t\tpf->fdir.inset_flag[pctype] = 0;\n+\t\t\tpf->fdir.flow_count[pctype] = 0;\n \t\t\tpf->fdir.flex_mask_flag[pctype] = 0;\n \t\t}\n \n", "prefixes": [] }{ "id": 94788, "url": "