get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 60670,
    "url": "https://patches.dpdk.org/api/patches/60670/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191008105231.8296-1-alvinx.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": "<20191008105231.8296-1-alvinx.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191008105231.8296-1-alvinx.zhang@intel.com",
    "date": "2019-10-08T10:52:31",
    "name": "[v3] net/i40e: fix exception with multi-driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "929e080998e6f036e7f3e685640989934b47d54c",
    "submitter": {
        "id": 1398,
        "url": "https://patches.dpdk.org/api/people/1398/?format=api",
        "name": "Alvin Zhang",
        "email": "alvinx.zhang@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "https://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20191008105231.8296-1-alvinx.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 6734,
            "url": "https://patches.dpdk.org/api/series/6734/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6734",
            "date": "2019-10-08T10:52:31",
            "name": "[v3] net/i40e: fix exception with multi-driver",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/6734/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/60670/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/60670/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2F0B01BFF0;\n\tTue,  8 Oct 2019 04:04:42 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id BEFC02986;\n\tTue,  8 Oct 2019 04:04:40 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Oct 2019 19:04:39 -0700",
            "from unknown (HELO localhost.localdomain) ([10.240.176.181])\n\tby orsmga001.jf.intel.com with ESMTP; 07 Oct 2019 19:04:38 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.67,269,1566889200\"; d=\"scan'208\";a=\"276969028\"",
        "From": "alvinx.zhang@intel.com",
        "To": "qi.z.zhang@intel.com,\n\tbeilei.xing@intel.com",
        "Cc": "dev@dpdk.org,\n\tAlvin Zhang <alvinx.zhang@intel.com>,\n\tstable@dpdk.org",
        "Date": "Tue,  8 Oct 2019 18:52:31 +0800",
        "Message-Id": "<20191008105231.8296-1-alvinx.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191008104145.6330-1-alvinx.zhang@intel.com>",
        "References": "<20191008104145.6330-1-alvinx.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3] net/i40e: fix exception with multi-driver",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Alvin Zhang <alvinx.zhang@intel.com>\n\nIf support-multi-driver is enabled, the global registers should not\nbe configured. But with the current code base, if creating a flow\nwith rte_flow API, the global register GLQF_FD_MSK may be changed.\n\nFixes: cfdfca493cae (\"net/i40e: fix multiple driver support\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n--\n\nv3: modify codes according to the comments.\nv2: modify codes according to the comments.\n---\n drivers/net/i40e/i40e_flow.c | 38 +++++++++++++++++++++++++++++++-------\n 1 file changed, 31 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c\nindex e902a35..f9c3183 100644\n--- a/drivers/net/i40e/i40e_flow.c\n+++ b/drivers/net/i40e/i40e_flow.c\n@@ -2349,6 +2349,37 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,\n \tif (num < 0)\n \t\treturn -EINVAL;\n \n+\tif (pf->support_multi_driver) {\n+\t\tfor (i = 0; i < num; i++)\n+\t\t\tif (i40e_read_rx_ctl(hw,\n+\t\t\t\t\tI40E_GLQF_FD_MSK(i, pctype)) !=\n+\t\t\t\t\tmask_reg[i]) {\n+\t\t\t\tPMD_DRV_LOG(ERR, \"Input set setting is not\"\n+\t\t\t\t\t\t\" supported with\"\n+\t\t\t\t\t\t\" `support-multi-driver`\"\n+\t\t\t\t\t\t\" enabled!\");\n+\t\t\t\treturn -EPERM;\n+\t\t\t}\n+\t\tfor (i = num; i < I40E_INSET_MASK_NUM_REG; i++)\n+\t\t\tif (i40e_read_rx_ctl(hw,\n+\t\t\t\t\tI40E_GLQF_FD_MSK(i, pctype)) != 0) {\n+\t\t\t\tPMD_DRV_LOG(ERR, \"Input set setting is not\"\n+\t\t\t\t\t\t\" supported with\"\n+\t\t\t\t\t\t\" `support-multi-driver`\"\n+\t\t\t\t\t\t\" enabled!\");\n+\t\t\t\treturn -EPERM;\n+\t\t\t}\n+\n+\t} else {\n+\t\tfor (i = 0; i < num; i++)\n+\t\t\ti40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),\n+\t\t\t\tmask_reg[i]);\n+\t\t/*clear unused mask registers of the pctype */\n+\t\tfor (i = num; i < I40E_INSET_MASK_NUM_REG; i++)\n+\t\t\ti40e_check_write_reg(hw,\n+\t\t\t\t\tI40E_GLQF_FD_MSK(i, pctype), 0);\n+\t}\n+\n \tinset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set);\n \n \ti40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0),\n@@ -2357,13 +2388,6 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,\n \t\t\t     (uint32_t)((inset_reg >>\n \t\t\t\t\t I40E_32_BIT_WIDTH) & UINT32_MAX));\n \n-\tfor (i = 0; i < num; i++)\n-\t\ti40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),\n-\t\t\t\t     mask_reg[i]);\n-\n-\t/*clear unused mask registers of the pctype */\n-\tfor (i = num; i < I40E_INSET_MASK_NUM_REG; i++)\n-\t\ti40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0);\n \tI40E_WRITE_FLUSH(hw);\n \n \tpf->fdir.input_set[pctype] = input_set;\n",
    "prefixes": [
        "v3"
    ]
}