get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17812,
    "url": "https://patches.dpdk.org/api/patches/17812/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1481294364-83505-29-git-send-email-jingjing.wu@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": "<1481294364-83505-29-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1481294364-83505-29-git-send-email-jingjing.wu@intel.com",
    "date": "2016-12-09T14:39:21",
    "name": "[dpdk-dev,v2,28/31] net/i40e/base: avoid division by zero",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2e727061438a6639d1c126d515ea8d092fa7b155",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1481294364-83505-29-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17812/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/17812/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 21C34FA92;\n\tFri,  9 Dec 2016 15:41:54 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id CAD31559A\n\tfor <dev@dpdk.org>; Fri,  9 Dec 2016 15:40:49 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga103.fm.intel.com with ESMTP; 09 Dec 2016 06:40:49 -0800",
            "from dpdk2.sh.intel.com ([10.239.128.246])\n\tby fmsmga005.fm.intel.com with ESMTP; 09 Dec 2016 06:40:48 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.33,324,1477983600\"; d=\"scan'208\";a=\"40776203\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "jingjing.wu@intel.com,\n\thelin.zhang@intel.com",
        "Date": "Fri,  9 Dec 2016 22:39:21 +0800",
        "Message-Id": "<1481294364-83505-29-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 2.4.11",
        "In-Reply-To": "<1481294364-83505-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1480727953-92137-1-git-send-email-jingjing.wu@intel.com>\n\t<1481294364-83505-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 28/31] net/i40e/base: avoid division by zero",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "For some cases when reading from device are incorrect or image is\nincorrect, this part of code causes crash due to division by zero.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n drivers/net/i40e/base/i40e_common.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex 14aaac6..fdf9d9b 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -3967,8 +3967,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,\n \t/* partition id is 1-based, and functions are evenly spread\n \t * across the ports as partitions\n \t */\n-\thw->partition_id = (hw->pf_id / hw->num_ports) + 1;\n-\thw->num_partitions = num_functions / hw->num_ports;\n+\tif (hw->num_ports != 0) {\n+\t\thw->partition_id = (hw->pf_id / hw->num_ports) + 1;\n+\t\thw->num_partitions = num_functions / hw->num_ports;\n+\t}\n \n \t/* additional HW specific goodies that might\n \t * someday be HW version specific\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "28/31"
    ]
}