get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73512,
    "url": "https://patches.dpdk.org/api/patches/73512/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200708195034.4495-1-maox.jiang@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": "<20200708195034.4495-1-maox.jiang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200708195034.4495-1-maox.jiang@intel.com",
    "date": "2020-07-08T19:50:34",
    "name": "[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/?format=api",
        "name": "Jiang Mao",
        "email": "maox.jiang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200708195034.4495-1-maox.jiang@intel.com/mbox/",
    "series": [
        {
            "id": 10881,
            "url": "https://patches.dpdk.org/api/series/10881/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10881",
            "date": "2020-07-08T19:50:34",
            "name": "[1/2] net/i40e: fix binding interrupt without msix vectors",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10881/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73512/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73512/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 5921EA00BE;\n\tWed,  8 Jul 2020 09:54:51 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7699D1DB13;\n\tWed,  8 Jul 2020 09:54:50 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 55CE11DA26;\n Wed,  8 Jul 2020 09:54:47 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2020 00:54:47 -0700",
            "from dut85.sh.intel.com ([10.240.183.157])\n by fmsmga001.fm.intel.com with ESMTP; 08 Jul 2020 00:54:45 -0700"
        ],
        "IronPort-SDR": [
            "\n v5D33zNWYW8L4pdigEPEI+bTBgaxofY3fQESSc7z5vKNeC30MPZCRVogDW04b3SJZLnR3wBlsw\n zzGLs1E9r/wA==",
            "\n twveN78IJQ9IQuRDVyWA2PQizyX8gnee/wm65r+QoSjfwkb5lNa407ZpDxYxJV9i2OMHpDBUyv\n 4zE2L6puzH2g=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9675\"; a=\"145857951\"",
            "E=Sophos;i=\"5.75,327,1589266800\"; d=\"scan'208\";a=\"145857951\"",
            "E=Sophos;i=\"5.75,327,1589266800\"; d=\"scan'208\";a=\"388750073\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Jiang Mao <maox.jiang@intel.com>",
        "To": "xiaolong.ye@intel.com",
        "Cc": "dev@dpdk.org,\n\tstable@dpdk.org,\n\tmaox.jiang@intel.com",
        "Date": "Thu,  9 Jul 2020 03:50:34 +0800",
        "Message-Id": "<20200708195034.4495-1-maox.jiang@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200609022538.27665-1-maox.jiang@intel.com>",
        "References": "<20200609022538.27665-1-maox.jiang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 1/2] net/i40e: fix binding interrupt without msix\n\tvectors",
        "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": "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\nSigned-off-by: Jiang Mao <maox.jiang@intel.com>\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 777e149..16fcb8d 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -2001,7 +2001,7 @@ void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\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 @@ void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\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 @@ void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\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 @@ void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\n \t\tmsix_vect++;\n \t\tnb_msix--;\n \t}\n+\n+\treturn 0;\n }\n \n static void\n@@ -2306,21 +2315,27 @@ void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\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 e5d0ce5..33fbe77 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -1248,7 +1248,7 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf,\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": [
        "1/2"
    ]
}