Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/66660/?format=api
https://patches.dpdk.org/api/patches/66660/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200315031244.43986-1-qi.z.zhang@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": "<20200315031244.43986-1-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200315031244.43986-1-qi.z.zhang@intel.com", "date": "2020-03-15T03:12:44", "name": "net/ice: fix wrong interrupt vector overwritten", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "2cd93a06bf3e5f4eca1643d8c2665d6fbd355cb5", "submitter": { "id": 504, "url": "https://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200315031244.43986-1-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 8911, "url": "https://patches.dpdk.org/api/series/8911/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=8911", "date": "2020-03-15T03:12:44", "name": "net/ice: fix wrong interrupt vector overwritten", "version": 1, "mbox": "https://patches.dpdk.org/series/8911/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/66660/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/66660/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 753A2A0577;\n\tSun, 15 Mar 2020 04:09:22 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 332B02C2B;\n\tSun, 15 Mar 2020 04:09:21 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 58D8E2BE3;\n Sun, 15 Mar 2020 04:09:19 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Mar 2020 20:09:17 -0700", "from dpdk51.sh.intel.com ([10.67.110.245])\n by orsmga002.jf.intel.com with ESMTP; 14 Mar 2020 20:09:15 -0700" ], "IronPort-SDR": [ "\n ctr5yef5LeIuR9CtmOdTKBORGRbDV9RhwXKEfBENS3Bc6l88A42eJAB8zlBtqHyLonyy7C4+C8\n TW9ojFopAVvw==", "\n kVLev1TpDqcP5GNMQ+9f+G+t84WbJKv1FsB4KJDktLZui+/2b5PXLQLL21TU0KC69bXLJ4A11h\n sPAzW6XPaO0g==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,554,1574150400\"; d=\"scan'208\";a=\"262303727\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "beilei.xing@intel.com,\n\tyahui.cao@intel.com", "Cc": "xiaolong.ye@intel.com, dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n stable@dpdk.org", "Date": "Sun, 15 Mar 2020 11:12:44 +0800", "Message-Id": "<20200315031244.43986-1-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "Subject": "[dpdk-dev] [PATCH] net/ice: fix wrong interrupt vector overwritten", "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": "ice_vsi_queues_bind_intr is shared by data rx queue and fdir rx queue's\ninterrupt binding. while when configure a fdir queue, it is possible that\na data path Rx queue 0's vector number be recorded in intr_handle->intr_vec\nbe overwritten by the fdir queue's vector number, this may cause interrupt\nRx mode does not work on the Rx queue 0.\n\nFixes: 84dc7a95a2d3 (\"net/ice: enable flow director engine\")\nCc: stable@dpdk.org\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/ice_ethdev.c | 33 ++++++++++++++-------------------\n drivers/net/ice/ice_ethdev.h | 6 +++++-\n drivers/net/ice/ice_fdir_filter.c | 5 ++++-\n 3 files changed, 23 insertions(+), 21 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 85ef83e92..a192f44bc 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -2619,16 +2619,15 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,\n }\n \n void\n-ice_vsi_queues_bind_intr(struct ice_vsi *vsi)\n+ice_vsi_queues_bind_intr(struct ice_vsi *vsi,\n+\t\t\t bool intr_use_misc,\n+\t\t\t int intr_num_max,\n+\t\t\t int *intr_vec)\n {\n-\tstruct rte_eth_dev *dev = vsi->adapter->eth_dev;\n-\tstruct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);\n-\tstruct rte_intr_handle *intr_handle = &pci_dev->intr_handle;\n \tstruct ice_hw *hw = ICE_VSI_TO_HW(vsi);\n \tuint16_t msix_vect = vsi->msix_intr;\n-\tuint16_t nb_msix = RTE_MIN(vsi->nb_msix, intr_handle->nb_efd);\n+\tuint16_t nb_msix = RTE_MIN(vsi->nb_msix, intr_num_max);\n \tuint16_t queue_idx = 0;\n-\tint record = 0;\n \tint i;\n \n \t/* clear Rx/Tx queue interrupt */\n@@ -2637,15 +2636,9 @@ ice_vsi_queues_bind_intr(struct ice_vsi *vsi)\n \t\tICE_WRITE_REG(hw, QINT_RQCTL(vsi->base_queue + i), 0);\n \t}\n \n-\t/* PF bind interrupt */\n-\tif (rte_intr_dp_is_en(intr_handle)) {\n-\t\tqueue_idx = 0;\n-\t\trecord = 1;\n-\t}\n-\n \tfor (i = 0; i < vsi->nb_used_qps; i++) {\n \t\tif (nb_msix <= 1) {\n-\t\t\tif (!rte_intr_allow_others(intr_handle))\n+\t\t\tif (intr_use_misc)\n \t\t\t\tmsix_vect = ICE_MISC_VEC_ID;\n \n \t\t\t/* uio mapping all queue to one msix_vect */\n@@ -2653,9 +2646,8 @@ ice_vsi_queues_bind_intr(struct ice_vsi *vsi)\n \t\t\t\t\t vsi->base_queue + i,\n \t\t\t\t\t vsi->nb_used_qps - i);\n \n-\t\t\tfor (; !!record && i < vsi->nb_used_qps; i++)\n-\t\t\t\tintr_handle->intr_vec[queue_idx + i] =\n-\t\t\t\t\tmsix_vect;\n+\t\t\tfor (; intr_vec && i < vsi->nb_used_qps; i++)\n+\t\t\t\tintr_vec[queue_idx + i] = msix_vect;\n \t\t\tbreak;\n \t\t}\n \n@@ -2663,8 +2655,8 @@ ice_vsi_queues_bind_intr(struct ice_vsi *vsi)\n \t\t__vsi_queues_bind_intr(vsi, msix_vect,\n \t\t\t\t vsi->base_queue + i, 1);\n \n-\t\tif (!!record)\n-\t\t\tintr_handle->intr_vec[queue_idx + i] = msix_vect;\n+\t\tif (intr_vec)\n+\t\t\tintr_vec[queue_idx + i] = msix_vect;\n \n \t\tmsix_vect++;\n \t\tnb_msix--;\n@@ -2736,7 +2728,10 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)\n \n \t/* Map queues with MSIX interrupt */\n \tvsi->nb_used_qps = dev->data->nb_rx_queues;\n-\tice_vsi_queues_bind_intr(vsi);\n+\tice_vsi_queues_bind_intr(vsi,\n+\t\t\t\t !rte_intr_allow_others(intr_handle),\n+\t\t\t\t intr_handle->nb_efd,\n+\t\t\t\t intr_handle->intr_vec);\n \n \t/* Enable interrupts for all the queues */\n \tice_vsi_enable_queues_intr(vsi);\ndiff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\nindex da557a254..942ada8af 100644\n--- a/drivers/net/ice/ice_ethdev.h\n+++ b/drivers/net/ice/ice_ethdev.h\n@@ -8,6 +8,7 @@\n #include <rte_kvargs.h>\n \n #include <rte_ethdev_driver.h>\n+#include <rte_ethdev_pci.h>\n \n #include \"base/ice_common.h\"\n #include \"base/ice_adminq_cmd.h\"\n@@ -463,7 +464,10 @@ int\n ice_release_vsi(struct ice_vsi *vsi);\n void ice_vsi_enable_queues_intr(struct ice_vsi *vsi);\n void ice_vsi_disable_queues_intr(struct ice_vsi *vsi);\n-void ice_vsi_queues_bind_intr(struct ice_vsi *vsi);\n+void ice_vsi_queues_bind_intr(struct ice_vsi *vsi,\n+\t\t\t bool intr_use_misc,\n+\t\t\t int intr_num_max,\n+\t\t\t int *intr_vec);\n \n static inline int\n ice_align_floor(int n)\ndiff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c\nindex 5a791610f..387807819 100644\n--- a/drivers/net/ice/ice_fdir_filter.c\n+++ b/drivers/net/ice/ice_fdir_filter.c\n@@ -433,6 +433,8 @@ ice_fdir_setup(struct ice_pf *pf)\n {\n \tstruct rte_eth_dev *eth_dev = pf->adapter->eth_dev;\n \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n+\tstruct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(eth_dev);\n+\tstruct rte_intr_handle *intr_handle = &pci_dev->intr_handle;\n \tconst struct rte_memzone *mz = NULL;\n \tchar z_name[RTE_MEMZONE_NAMESIZE];\n \tstruct ice_vsi *vsi;\n@@ -501,7 +503,8 @@ ice_fdir_setup(struct ice_pf *pf)\n \n \t/* Enable FDIR MSIX interrupt */\n \tvsi->nb_used_qps = 1;\n-\tice_vsi_queues_bind_intr(vsi);\n+\tice_vsi_queues_bind_intr(vsi, !rte_intr_allow_others(intr_handle),\n+\t\t\t\t 1, NULL);\n \tice_vsi_enable_queues_intr(vsi);\n \n \t/* reserve memory for the fdir programming packet */\n", "prefixes": [] }{ "id": 66660, "url": "