get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69981,
    "url": "https://patches.dpdk.org/api/patches/69981/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200508085437.12488-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": "<20200508085437.12488-1-alvinx.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200508085437.12488-1-alvinx.zhang@intel.com",
    "date": "2020-05-08T08:54:37",
    "name": "[v3] net/igc: fix memory illegal accesses",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "27fa54f24f504fabf27e0cd31d6bec51eaccbd62",
    "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/20200508085437.12488-1-alvinx.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 9940,
            "url": "https://patches.dpdk.org/api/series/9940/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9940",
            "date": "2020-05-08T08:54:37",
            "name": "[v3] net/igc: fix memory illegal accesses",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/9940/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/69981/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/69981/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 1E57FA00C5;\n\tFri,  8 May 2020 10:57:09 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 02D2B1DB76;\n\tFri,  8 May 2020 10:57:09 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 8157D1DA00\n for <dev@dpdk.org>; Fri,  8 May 2020 10:57:07 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 May 2020 01:57:06 -0700",
            "from shwdenpg235.ccr.corp.intel.com ([10.240.182.60])\n by fmsmga002.fm.intel.com with ESMTP; 08 May 2020 01:57:04 -0700"
        ],
        "IronPort-SDR": [
            "\n +renb0QW8H6T4Xu44h34oGJmoEivHNrXTH9z1HAEquUP9cwrQvHRrty9+PzlsiGMEU0UFlWQAz\n aWTxnIPr/0tQ==",
            "\n dJP8tmPz/+SPPujePQiieBdFqW6fim86ZMafVhwTIrsVHFrmEl4NmjtMj7d31jy4iWcfq4AV2p\n /AD/Rs6UPn/w=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,367,1583222400\"; d=\"scan'208\";a=\"296012464\"",
        "From": "alvinx.zhang@intel.com",
        "To": "dev@dpdk.org",
        "Cc": "wei.zhao1@intel.com,\n\tjia.guo@intel.com,\n\txiaolong.ye@intel.com",
        "Date": "Fri,  8 May 2020 16:54:37 +0800",
        "Message-Id": "<20200508085437.12488-1-alvinx.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "In-Reply-To": "<20200507093156.18616-1-alvinx.zhang@intel.com>",
        "References": "<20200507093156.18616-1-alvinx.zhang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3] net/igc: fix memory illegal accesses",
        "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": "From: Alvin Zhang <alvinx.zhang@intel.com>\n\nFix some out-of-bounds memory issues, they may lead to wrong results\nor affect application stability.\n\nCoverity issue: 357759, 357713\nFixes: bd3fcf0d0fa1 (net/igc: support RSS)\nCc: stable@dpdk.org\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n\nV2: update git log\nV3: update git log\n\n drivers/net/igc/igc_ethdev.c | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c\nindex 16d98c6..6ab3ee9 100644\n--- a/drivers/net/igc/igc_ethdev.c\n+++ b/drivers/net/igc/igc_ethdev.c\n@@ -2266,6 +2266,8 @@ static int eth_igc_vlan_tpid_set(struct rte_eth_dev *dev,\n \t\treturn -EINVAL;\n \t}\n \n+\tRTE_BUILD_BUG_ON(ETH_RSS_RETA_SIZE_128 % IGC_RSS_RDT_REG_SIZE);\n+\n \t/* set redirection table */\n \tfor (i = 0; i < ETH_RSS_RETA_SIZE_128; i += IGC_RSS_RDT_REG_SIZE) {\n \t\tunion igc_rss_reta_reg reta, reg;\n@@ -2278,7 +2280,8 @@ static int eth_igc_vlan_tpid_set(struct rte_eth_dev *dev,\n \t\t\t\tIGC_RSS_RDT_REG_SIZE_MASK);\n \n \t\t/* if no need to update the register */\n-\t\tif (!mask)\n+\t\tif (!mask ||\n+\t\t    shift > (RTE_RETA_GROUP_SIZE - IGC_RSS_RDT_REG_SIZE))\n \t\t\tcontinue;\n \n \t\t/* check mask whether need to read the register value first */\n@@ -2289,6 +2292,7 @@ static int eth_igc_vlan_tpid_set(struct rte_eth_dev *dev,\n \t\t\t\t\tIGC_RETA(i / IGC_RSS_RDT_REG_SIZE));\n \n \t\t/* update the register */\n+\t\tRTE_BUILD_BUG_ON(sizeof(reta.bytes) != IGC_RSS_RDT_REG_SIZE);\n \t\tfor (j = 0; j < IGC_RSS_RDT_REG_SIZE; j++) {\n \t\t\tif (mask & (1u << j))\n \t\t\t\treta.bytes[j] =\n@@ -2318,6 +2322,8 @@ static int eth_igc_vlan_tpid_set(struct rte_eth_dev *dev,\n \t\treturn -EINVAL;\n \t}\n \n+\tRTE_BUILD_BUG_ON(ETH_RSS_RETA_SIZE_128 % IGC_RSS_RDT_REG_SIZE);\n+\n \t/* read redirection table */\n \tfor (i = 0; i < ETH_RSS_RETA_SIZE_128; i += IGC_RSS_RDT_REG_SIZE) {\n \t\tunion igc_rss_reta_reg reta;\n@@ -2330,10 +2336,12 @@ static int eth_igc_vlan_tpid_set(struct rte_eth_dev *dev,\n \t\t\t\tIGC_RSS_RDT_REG_SIZE_MASK);\n \n \t\t/* if no need to read register */\n-\t\tif (!mask)\n+\t\tif (!mask ||\n+\t\t    shift > (RTE_RETA_GROUP_SIZE - IGC_RSS_RDT_REG_SIZE))\n \t\t\tcontinue;\n \n \t\t/* read register and get the queue index */\n+\t\tRTE_BUILD_BUG_ON(sizeof(reta.bytes) != IGC_RSS_RDT_REG_SIZE);\n \t\treta.dword = IGC_READ_REG_LE_VALUE(hw,\n \t\t\t\tIGC_RETA(i / IGC_RSS_RDT_REG_SIZE));\n \t\tfor (j = 0; j < IGC_RSS_RDT_REG_SIZE; j++) {\n",
    "prefixes": [
        "v3"
    ]
}