Show a patch.

GET /api/patches/74597/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 74597,
    "url": "https://patches.dpdk.org/api/patches/74597/",
    "web_url": "https://patches.dpdk.org/patch/74597/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200722175738.32490-1-maox.jiang@intel.com>",
    "date": "2020-07-22T17:57:37",
    "name": "[v3,1/2] net/i40e: fix binding interrupt without msix vectors",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "891416e76d84d739d7dc6eac7b57d8910b0db7b9",
    "submitter": {
        "id": 1630,
        "url": "https://patches.dpdk.org/api/people/1630/",
        "name": "Jiang Mao",
        "email": "maox.jiang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74597/mbox/",
    "series": [
        {
            "id": 11225,
            "url": "https://patches.dpdk.org/api/series/11225/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11225",
            "date": "2020-07-22T17:57:37",
            "name": "[v3,1/2] net/i40e: fix binding interrupt without msix vectors",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/11225/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74597/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/74597/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9689\"; a=\"214918287\"",
            "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"214918287\"",
            "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"301850381\""
        ],
        "IronPort-SDR": [
            "\n 8tyLmM3X/WMEceFpALRCU5lkLYkNieCa0yKvpz8J1xIP8TEV0u6Dvp1kkP9zs4Hv+6BEUmKnkL\n NPl03Gw+hU9g==",
            "\n E1E70w5MyjNm7YXOEh/YQK0B2NLTBwACtw3Da5heqS+EIaXRoANOkrsffdCBYH9vEyQr2pxPlu\n GzOyMj/icvtQ=="
        ],
        "X-Amp-File-Uploaded": "False",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<20200708195034.4495-1-maox.jiang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/2] net/i40e: fix binding interrupt without\n\tmsix vectors",
        "Sender": "\"dev\" <dev-bounces@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 C1020A0526;\n\tWed, 22 Jul 2020 08:08:01 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5D16E1BFD1;\n\tWed, 22 Jul 2020 08:08:00 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id F1C731BFBB;\n Wed, 22 Jul 2020 08:07:57 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2020 23:07:56 -0700",
            "from dut85.sh.intel.com ([10.240.183.157])\n by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 23:07:55 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailer": "git-send-email 2.17.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-ExtLoop1": "1",
        "Date": "Thu, 23 Jul 2020 01:57:37 +0800",
        "To": "qi.z.zhang@intel.com",
        "From": "Jiang Mao <maox.jiang@intel.com>",
        "In-Reply-To": "<20200708195034.4495-1-maox.jiang@intel.com>",
        "Cc": "dev@dpdk.org,\n\tstable@dpdk.org,\n\tJiang Mao <maox.jiang@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<20200722175738.32490-1-maox.jiang@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "The value of vsi->nb_msix shouldn`t be zero, otherwise, all of\ninterrupts will be bind to vector 0.\n\nFixes: 4861cde461 (i40e: new poll mode driver)\nCc: stable@dpdk.org\n\nSigned-off-by: Jiang Mao <maox.jiang@intel.com>\n---\nV3: fix format issue.\n---\n drivers/net/i40e/i40e_ethdev.c | 31 +++++++++++++++++++++++--------\n drivers/net/i40e/i40e_ethdev.h |  2 +-\n 2 files changed, 24 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 777e14926f..16fcb8d24e 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -2001,7 +2001,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,\n \tI40E_WRITE_FLUSH(hw);\n }\n \n-void\n+int\n i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)\n {\n \tstruct rte_eth_dev *dev = vsi->adapter->eth_dev;\n@@ -2021,10 +2021,14 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)\n \n \t/* VF bind interrupt */\n \tif (vsi->type == I40E_VSI_SRIOV) {\n+\t\tif (vsi->nb_msix == 0) {\n+\t\t\tPMD_DRV_LOG(ERR, \"No msix resource\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\t__vsi_queues_bind_intr(vsi, msix_vect,\n \t\t\t\t       vsi->base_queue, vsi->nb_qps,\n \t\t\t\t       itr_idx);\n-\t\treturn;\n+\t\treturn 0;\n \t}\n \n \t/* PF & VMDq bind interrupt */\n@@ -2041,7 +2045,10 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)\n \t}\n \n \tfor (i = 0; i < vsi->nb_used_qps; i++) {\n-\t\tif (nb_msix <= 1) {\n+\t\tif (vsi->nb_msix == 0) {\n+\t\t\tPMD_DRV_LOG(ERR, \"No msix resource\");\n+\t\t\treturn -EINVAL;\n+\t\t} else if (nb_msix <= 1) {\n \t\t\tif (!rte_intr_allow_others(intr_handle))\n \t\t\t\t/* allow to share MISC_VEC_ID */\n \t\t\t\tmsix_vect = I40E_MISC_VEC_ID;\n@@ -2066,6 +2073,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)\n \t\tmsix_vect++;\n \t\tnb_msix--;\n \t}\n+\n+\treturn 0;\n }\n \n static void\n@@ -2306,21 +2315,27 @@ i40e_dev_start(struct rte_eth_dev *dev)\n \t/* Map queues with MSIX interrupt */\n \tmain_vsi->nb_used_qps = dev->data->nb_rx_queues -\n \t\tpf->nb_cfg_vmdq_vsi * RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;\n-\ti40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);\n+\tret = i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);\n+\tif (ret < 0)\n+\t\treturn ret;\n \ti40e_vsi_enable_queues_intr(main_vsi);\n \n \t/* Map VMDQ VSI queues with MSIX interrupt */\n \tfor (i = 0; i < pf->nb_cfg_vmdq_vsi; i++) {\n \t\tpf->vmdq[i].vsi->nb_used_qps = RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;\n-\t\ti40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,\n-\t\t\t\t\t  I40E_ITR_INDEX_DEFAULT);\n+\t\tret = i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,\n+\t\t\t\t\t\tI40E_ITR_INDEX_DEFAULT);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n \t\ti40e_vsi_enable_queues_intr(pf->vmdq[i].vsi);\n \t}\n \n \t/* enable FDIR MSIX interrupt */\n \tif (pf->fdir.fdir_vsi) {\n-\t\ti40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi,\n-\t\t\t\t\t  I40E_ITR_INDEX_NONE);\n+\t\tret = i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi,\n+\t\t\t\t\t\tI40E_ITR_INDEX_NONE);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n \t\ti40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi);\n \t}\n \ndiff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h\nindex e5d0ce53f5..33fbe776bb 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -1248,7 +1248,7 @@ void i40e_update_vsi_stats(struct i40e_vsi *vsi);\n void i40e_pf_disable_irq0(struct i40e_hw *hw);\n void i40e_pf_enable_irq0(struct i40e_hw *hw);\n int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);\n-void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);\n+int i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);\n void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);\n int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,\n \t\t\t   struct i40e_vsi_vlan_pvid_info *info);\n",
    "prefixes": [
        "v3",
        "1/2"
    ]
}