get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56420,
    "url": "http://patches.dpdk.org/api/patches/56420/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1563192937-5825-1-git-send-email-xiao.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1563192937-5825-1-git-send-email-xiao.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1563192937-5825-1-git-send-email-xiao.zhang@intel.com",
    "date": "2019-07-15T12:15:37",
    "name": "[v2] drivers/net: fix dereference after null check coverity",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "2202af7c44623879bdf7249ce6664e7b12ed6d97",
    "submitter": {
        "id": 1352,
        "url": "http://patches.dpdk.org/api/people/1352/?format=api",
        "name": "Xiao Zhang",
        "email": "xiao.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1563192937-5825-1-git-send-email-xiao.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 5485,
            "url": "http://patches.dpdk.org/api/series/5485/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5485",
            "date": "2019-07-15T12:15:37",
            "name": "[v2] drivers/net: fix dereference after null check coverity",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/5485/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/56420/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/56420/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 577231B965;\n\tMon, 15 Jul 2019 05:19:50 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id CC7502BBE;\n\tMon, 15 Jul 2019 05:19:44 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Jul 2019 20:19:43 -0700",
            "from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.190])\n\tby fmsmga007.fm.intel.com with ESMTP; 14 Jul 2019 20:19:41 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,492,1557212400\"; d=\"scan'208\";a=\"168836274\"",
        "From": "Xiao Zhang <xiao.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, xiao.w.wang@intel.com, beilei.xing@intel.com,\n\twenzhuo.lu@intel.com, qiming.yang@intel.com,\n\tXiao Zhang <xiao.zhang@intel.com>, stable@dpdk.org",
        "Date": "Mon, 15 Jul 2019 20:15:37 +0800",
        "Message-Id": "<1563192937-5825-1-git-send-email-xiao.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [v2] drivers/net: fix dereference after null check\n\tcoverity",
        "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": "This patch tries to fix the coverity issues of dereference after null\ncheck.\nThe addresses of receive queue start segment for ice, avf, i40e, \nfm10k and ixgb were not checked before use. Add check to avoid\ncoverity issues.\n\nCoverity issue: 343452\nCoverity issue: 343407\nFixes: c68a52b8 (\"net/ice: support vector SSE in Rx\")\nCoverity issue: 343447\nFixes: 319c421f (\"net/avf: enable SSE Rx Tx\")\nCoverity issue: 343422\nCoverity issue: 343403\nFixes: ca74903b (\"net/i40e: extract non-x86 specific code from vector driver\")\nCoverity issue: 343416\nFixes: fe65e1e1 (\"fm10k: add vector scatter Rx\")\nCoverity issue: 13245\nFixes: 8a44c15a (\"net/ixgbe: extract non-x86 specific code from vector driver\")\nCc: stable@dpdk.org\n\nSigned-off-by: Xiao Zhang <xiao.zhang@intel.com>\n---\nv2 changes:\n* update commit log with fixes information.\n\n drivers/net/fm10k/fm10k_rxtx_vec.c        | 3 +++\n drivers/net/i40e/i40e_rxtx_vec_common.h   | 3 +++\n drivers/net/iavf/iavf_rxtx_vec_common.h   | 3 +++\n drivers/net/ice/ice_rxtx_vec_common.h     | 3 +++\n drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 3 +++\n 5 files changed, 15 insertions(+)",
    "diff": "diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c\nindex 788e248..cb840de 100644\n--- a/drivers/net/fm10k/fm10k_rxtx_vec.c\n+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c\n@@ -602,6 +602,9 @@ fm10k_reassemble_packets(struct fm10k_rx_queue *rxq,\n \tstruct rte_mbuf *end =  rxq->pkt_last_seg;\n \tunsigned pkt_idx, buf_idx;\n \n+\tif (!start)\n+\t\treturn 0;\n+\n \tfor (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {\n \t\tif (end != NULL) {\n \t\t\t/* processing a split packet */\ndiff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h\nindex 0e6ffa0..1351e41 100644\n--- a/drivers/net/i40e/i40e_rxtx_vec_common.h\n+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h\n@@ -20,6 +20,9 @@ reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs,\n \tstruct rte_mbuf *end =  rxq->pkt_last_seg;\n \tunsigned pkt_idx, buf_idx;\n \n+\tif (!start)\n+\t\treturn 0;\n+\n \tfor (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {\n \t\tif (end != NULL) {\n \t\t\t/* processing a split packet */\ndiff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h\nindex db509d7..ac3d62a 100644\n--- a/drivers/net/iavf/iavf_rxtx_vec_common.h\n+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h\n@@ -20,6 +20,9 @@ reassemble_packets(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_bufs,\n \tstruct rte_mbuf *end =  rxq->pkt_last_seg;\n \tunsigned int pkt_idx, buf_idx;\n \n+\tif (!start)\n+\t\treturn 0;\n+\n \tfor (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {\n \t\tif (end) {\n \t\t\t/* processing a split packet */\ndiff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h\nindex c5f0d56..11da521 100644\n--- a/drivers/net/ice/ice_rxtx_vec_common.h\n+++ b/drivers/net/ice/ice_rxtx_vec_common.h\n@@ -16,6 +16,9 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,\n \tstruct rte_mbuf *end =  rxq->pkt_last_seg;\n \tunsigned int pkt_idx, buf_idx;\n \n+\tif (!start)\n+\t\treturn 0;\n+\n \tfor (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {\n \t\tif (end) {\n \t\t\t/* processing a split packet */\ndiff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h\nindex a97c271..a95cc0a 100644\n--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h\n+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h\n@@ -19,6 +19,9 @@ reassemble_packets(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_bufs,\n \tstruct rte_mbuf *end =  rxq->pkt_last_seg;\n \tunsigned int pkt_idx, buf_idx;\n \n+\tif (!start)\n+\t\treturn 0;\n+\n \tfor (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {\n \t\tif (end != NULL) {\n \t\t\t/* processing a split packet */\n",
    "prefixes": [
        "v2"
    ]
}