Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75369/?format=api
http://patches.dpdk.org/api/patches/75369/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200811062917.7007-6-stevex.yang@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": "<20200811062917.7007-6-stevex.yang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200811062917.7007-6-stevex.yang@intel.com", "date": "2020-08-11T06:29:15", "name": "[5/7] net/iavf: fix multiple interrupts for VF", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3fd57c578f7423c4db7df10fe4b3f00b8f28113e", "submitter": { "id": 1883, "url": "http://patches.dpdk.org/api/people/1883/?format=api", "name": "Steve Yang", "email": "stevex.yang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200811062917.7007-6-stevex.yang@intel.com/mbox/", "series": [ { "id": 11583, "url": "http://patches.dpdk.org/api/series/11583/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11583", "date": "2020-08-11T06:29:10", "name": "Bugs Porting from I40evf For IAVF Feature", "version": 1, "mbox": "http://patches.dpdk.org/series/11583/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75369/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/75369/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 42BCFA04D8;\n\tTue, 11 Aug 2020 08:50:08 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CFABA1C0BD;\n\tTue, 11 Aug 2020 08:49:37 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 2A6731C0B8\n for <dev@dpdk.org>; Tue, 11 Aug 2020 08:49:36 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Aug 2020 23:49:35 -0700", "from intel-npg-odc-srv01.cd.intel.com ([10.240.178.134])\n by fmsmga001.fm.intel.com with ESMTP; 10 Aug 2020 23:49:34 -0700" ], "IronPort-SDR": [ "\n x1CdAa8La+/yB1zB0rXdfTg2QShgqxmxcb2NmVevbY+86+8SIS4U3CARCNF77QN9Jsj3B0+R0j\n JVTz/XYbuKOg==", "\n Y5WjR9cRJsyKybMa9Nm2sclJjFQ7j1ufoekpMkf3fhlc3cSjXE5WIvCfOQmrGsOB76I0sMPY9s\n Mt4kbj9D+ZWw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9709\"; a=\"171722172\"", "E=Sophos;i=\"5.75,460,1589266800\"; d=\"scan'208\";a=\"171722172\"", "E=Sophos;i=\"5.75,460,1589266800\"; d=\"scan'208\";a=\"398445756\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "SteveX Yang <stevex.yang@intel.com>", "To": "jingjing.wu@intel.com,\n\tbeilei.xing@intel.com,\n\tdev@dpdk.org", "Cc": "SteveX Yang <stevex.yang@intel.com>", "Date": "Tue, 11 Aug 2020 06:29:15 +0000", "Message-Id": "<20200811062917.7007-6-stevex.yang@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200811062917.7007-1-stevex.yang@intel.com>", "References": "<20200811062917.7007-1-stevex.yang@intel.com>", "Subject": "[dpdk-dev] [PATCH 5/7] net/iavf: fix multiple interrupts for VF", "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": "Interrupt mapping should be 1:n queue(s).This patch fixes the\nlogic of interrupt bind by code reconstruction.\n\nFixes: 69dd4c3d0898 (\"net/avf: enable queue and device\")\n\nSigned-off-by: SteveX Yang <stevex.yang@intel.com>\n---\n drivers/net/iavf/iavf_vchnl.c | 56 ++++++++++++++++++++++++++++-------\n 1 file changed, 45 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex 33acea54a..614ea7e79 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -18,6 +18,7 @@\n #include <rte_ether.h>\n #include <rte_ethdev_driver.h>\n #include <rte_dev.h>\n+#include <rte_bus_pci.h>\n \n #include \"iavf.h\"\n #include \"iavf_rxtx.h\"\n@@ -686,20 +687,53 @@ int\n iavf_config_irq_map(struct iavf_adapter *adapter)\n {\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tstruct iavf_cmd_info args;\n+\tuint8_t *cmd_buffer = NULL;\n \tstruct virtchnl_irq_map_info *map_info;\n \tstruct virtchnl_vector_map *vecmap;\n-\tstruct iavf_cmd_info args;\n-\tint len, i, err;\n+\tstruct rte_eth_dev *dev = adapter->eth_dev;\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n+\tstruct rte_intr_handle *intr_handle = &pci_dev->intr_handle;\n+\tuint32_t vec, cmd_buffer_size, max_vectors, nb_msix, msix_base, i;\n+\tuint16_t rxq_map[vf->vf_res->max_vectors];\n+\tint err;\n \n-\tlen = sizeof(struct virtchnl_irq_map_info) +\n-\t sizeof(struct virtchnl_vector_map) * vf->nb_msix;\n+\tmemset(rxq_map, 0, sizeof(rxq_map));\n+\tif (dev->data->dev_conf.intr_conf.rxq &&\n+\t\trte_intr_allow_others(intr_handle)) {\n+\t\tmsix_base = IAVF_RX_VEC_START;\n+\t\tmax_vectors = vf->vf_res->max_vectors - 1;\n+\t\tnb_msix = RTE_MIN(max_vectors, intr_handle->nb_efd);\n+\n+\t\tvec = msix_base;\n+\t\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\t\trxq_map[vec] |= 1 << i;\n+\t\t\tintr_handle->intr_vec[i] = vec++;\n+\t\t\tif (vec >= vf->vf_res->max_vectors)\n+\t\t\t\tvec = msix_base;\n+\t\t}\n+\t} else {\n+\t\tmsix_base = IAVF_MISC_VEC_ID;\n+\t\tnb_msix = 1;\n \n-\tmap_info = rte_zmalloc(\"map_info\", len, 0);\n-\tif (!map_info)\n-\t\treturn -ENOMEM;\n+\t\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\t\trxq_map[msix_base] |= 1 << i;\n+\t\t\tif (rte_intr_dp_is_en(intr_handle))\n+\t\t\t\tintr_handle->intr_vec[i] = msix_base;\n+\t\t}\n+\t}\n \n-\tmap_info->num_vectors = vf->nb_msix;\n-\tfor (i = 0; i < vf->nb_msix; i++) {\n+\tcmd_buffer_size = sizeof(struct virtchnl_irq_map_info) +\n+\t sizeof(struct virtchnl_vector_map) * nb_msix;\n+\tcmd_buffer = rte_zmalloc(\"iavf\", cmd_buffer_size, 0);\n+\tif (!cmd_buffer) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to allocate memory\");\n+\t\treturn IAVF_ERR_NO_MEMORY;\n+\t}\n+\n+\tmap_info = (struct virtchnl_irq_map_info *)cmd_buffer;\n+\tmap_info->num_vectors = nb_msix;\n+\tfor (i = 0; i < nb_msix; i++) {\n \t\tvecmap = &map_info->vecmap[i];\n \t\tvecmap->vsi_id = vf->vsi_res->vsi_id;\n \t\tvecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;\n@@ -709,8 +743,8 @@ iavf_config_irq_map(struct iavf_adapter *adapter)\n \t}\n \n \targs.ops = VIRTCHNL_OP_CONFIG_IRQ_MAP;\n-\targs.in_args = (u8 *)map_info;\n-\targs.in_args_size = len;\n+\targs.in_args = (u8 *)cmd_buffer;\n+\targs.in_args_size = cmd_buffer_size;\n \targs.out_buffer = vf->aq_resp;\n \targs.out_size = IAVF_AQ_BUF_SZ;\n \terr = iavf_execute_vf_cmd(adapter, &args);\n", "prefixes": [ "5/7" ] }{ "id": 75369, "url": "