Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/50203/?format=api
https://patches.dpdk.org/api/patches/50203/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1549556983-10896-2-git-send-email-arybchenko@solarflare.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": "<1549556983-10896-2-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1549556983-10896-2-git-send-email-arybchenko@solarflare.com", "date": "2019-02-07T16:29:06", "name": "[01/38] net/sfc/base: correct annotations where NULL input is OK", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "42025a8e4588a10f0b335e2a2e0a08da0c4dccfb", "submitter": { "id": 607, "url": "https://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.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/1549556983-10896-2-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 3411, "url": "https://patches.dpdk.org/api/series/3411/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3411", "date": "2019-02-07T16:29:05", "name": "net/sfc: update base driver", "version": 1, "mbox": "https://patches.dpdk.org/series/3411/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/50203/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/50203/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 B95781B5A7;\n\tThu, 7 Feb 2019 17:30:46 +0100 (CET)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 6AE6E1B579\n\tfor <dev@dpdk.org>; Thu, 7 Feb 2019 17:30:35 +0100 (CET)", "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id\n\tC92D9B40106 for <dev@dpdk.org>; Thu, 7 Feb 2019 16:30:33 +0000 (UTC)", "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1395.4; Thu, 7 Feb 2019 08:30:30 -0800", "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1395.4 via Frontend Transport; Thu, 7 Feb 2019 08:30:30 -0800", "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tx17GUTkM015248; Thu, 7 Feb 2019 16:30:29 GMT", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\t12A3D1613EB; Thu, 7 Feb 2019 16:30:29 +0000 (GMT)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "<dev@dpdk.org>", "CC": "Richard Houldsworth <rhouldsworth@solarflare.com>", "Date": "Thu, 7 Feb 2019 16:29:06 +0000", "Message-ID": "<1549556983-10896-2-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1549556983-10896-1-git-send-email-arybchenko@solarflare.com>", "References": "<1549556983-10896-1-git-send-email-arybchenko@solarflare.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.5.1010-24412.006", "X-TM-AS-Result": "No-1.048400-4.000000-10", "X-TMASE-MatchedRID": "v2ubiKmeOIFL7Dhhh55txl/DNB84fTU8SoCG4sefl8Qs/uUAk6xP7F/2\n\tzKXxjR59le3jwcyJB+G6/wFvLeWXhhBrGOx9XYh1HcQQBuf4ZFu2McZY43zJ4/HFoBcOsKezl82\n\t/3labdgyGjCZ0IoIpstGfoRgYgQp629aHfVG01jx/OBWacv+iVbc4VynOItyrDpCUEeEFm7BaVg\n\tlxI4mKTvEfjIKYeuEwgDLqnrRlXrZ8nn9tnqel2K6NVEWSRWybJTxKSk+McA7+/SBR+66VEr9RD\n\tmSP+XbAvb0KU1z8Rn8FphdqaCxwNW1dT4/JtvOSszUj4XnguTt3/veOGpUgVlpnuThuRloU8Oyc\n\tcFNBL2TKhETi2//sjuP9Cb59K8ACZrS+A8PszW9A/zCH/Tq5HQ==", "X-TM-AS-User-Approved-Sender": "No", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10-1.048400-4.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.5.1010-24412.006", "X-MDID": "1549557034-yPRNSmJSd6nJ", "Subject": "[dpdk-dev] [PATCH 01/38] net/sfc/base: correct annotations where\n\tNULL input is OK", "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: Richard Houldsworth <rhouldsworth@solarflare.com>\n\nCorrect annotations where NULL input can be permitted\n\nSigned-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/base/ef10_impl.h | 2 +-\n drivers/net/sfc/base/ef10_rx.c | 42 +++++++++++++++++++++-----------\n drivers/net/sfc/base/efx.h | 2 +-\n drivers/net/sfc/base/efx_intr.c | 2 +-\n drivers/net/sfc/base/efx_rx.c | 6 ++---\n 5 files changed, 34 insertions(+), 20 deletions(-)", "diff": "diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h\nindex f971063a1..83a8a2936 100644\n--- a/drivers/net/sfc/base/ef10_impl.h\n+++ b/drivers/net/sfc/base/ef10_impl.h\n@@ -1012,7 +1012,7 @@ ef10_rx_qcreate(\n \t__in\t\tunsigned int index,\n \t__in\t\tunsigned int label,\n \t__in\t\tefx_rxq_type_t type,\n-\t__in\t\tconst union efx_rxq_type_data_u *type_data,\n+\t__in_opt\tconst union efx_rxq_type_data_u *type_data,\n \t__in\t\tefsys_mem_t *esmp,\n \t__in\t\tsize_t ndescs,\n \t__in\t\tuint32_t id,\ndiff --git a/drivers/net/sfc/base/ef10_rx.c b/drivers/net/sfc/base/ef10_rx.c\nindex 3c8f4f3b9..d18010d0f 100644\n--- a/drivers/net/sfc/base/ef10_rx.c\n+++ b/drivers/net/sfc/base/ef10_rx.c\n@@ -988,7 +988,7 @@ ef10_rx_qcreate(\n \t__in\t\tunsigned int index,\n \t__in\t\tunsigned int label,\n \t__in\t\tefx_rxq_type_t type,\n-\t__in\t\tconst efx_rxq_type_data_t *type_data,\n+\t__in_opt\tconst efx_rxq_type_data_t *type_data,\n \t__in\t\tefsys_mem_t *esmp,\n \t__in\t\tsize_t ndescs,\n \t__in\t\tuint32_t id,\n@@ -1031,6 +1031,10 @@ ef10_rx_qcreate(\n \t\tbreak;\n #if EFSYS_OPT_RX_PACKED_STREAM\n \tcase EFX_RXQ_TYPE_PACKED_STREAM:\n+\t\tif (type_data == NULL) {\n+\t\t\trc = EINVAL;\n+\t\t\tgoto fail3;\n+\t\t}\n \t\tswitch (type_data->ertd_packed_stream.eps_buf_size) {\n \t\tcase EFX_RXQ_PACKED_STREAM_BUF_SIZE_1M:\n \t\t\tps_buf_size = MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_1M;\n@@ -1049,12 +1053,16 @@ ef10_rx_qcreate(\n \t\t\tbreak;\n \t\tdefault:\n \t\t\trc = ENOTSUP;\n-\t\t\tgoto fail3;\n+\t\t\tgoto fail4;\n \t\t}\n \t\tbreak;\n #endif /* EFSYS_OPT_RX_PACKED_STREAM */\n #if EFSYS_OPT_RX_ES_SUPER_BUFFER\n \tcase EFX_RXQ_TYPE_ES_SUPER_BUFFER:\n+\t\tif (type_data == NULL) {\n+\t\t\trc = EINVAL;\n+\t\t\tgoto fail5;\n+\t\t}\n \t\tps_buf_size = 0;\n \t\tes_bufs_per_desc =\n \t\t type_data->ertd_es_super_buffer.eessb_bufs_per_desc;\n@@ -1068,7 +1076,7 @@ ef10_rx_qcreate(\n #endif /* EFSYS_OPT_RX_ES_SUPER_BUFFER */\n \tdefault:\n \t\trc = ENOTSUP;\n-\t\tgoto fail4;\n+\t\tgoto fail6;\n \t}\n \n #if EFSYS_OPT_RX_PACKED_STREAM\n@@ -1076,13 +1084,13 @@ ef10_rx_qcreate(\n \t\t/* Check if datapath firmware supports packed stream mode */\n \t\tif (encp->enc_rx_packed_stream_supported == B_FALSE) {\n \t\t\trc = ENOTSUP;\n-\t\t\tgoto fail5;\n+\t\t\tgoto fail7;\n \t\t}\n \t\t/* Check if packed stream allows configurable buffer sizes */\n \t\tif ((ps_buf_size != MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_1M) &&\n \t\t (encp->enc_rx_var_packed_stream_supported == B_FALSE)) {\n \t\t\trc = ENOTSUP;\n-\t\t\tgoto fail6;\n+\t\t\tgoto fail8;\n \t\t}\n \t}\n #else /* EFSYS_OPT_RX_PACKED_STREAM */\n@@ -1093,17 +1101,17 @@ ef10_rx_qcreate(\n \tif (es_bufs_per_desc > 0) {\n \t\tif (encp->enc_rx_es_super_buffer_supported == B_FALSE) {\n \t\t\trc = ENOTSUP;\n-\t\t\tgoto fail7;\n+\t\t\tgoto fail9;\n \t\t}\n \t\tif (!IS_P2ALIGNED(es_max_dma_len,\n \t\t\t EFX_RX_ES_SUPER_BUFFER_BUF_ALIGNMENT)) {\n \t\t\trc = EINVAL;\n-\t\t\tgoto fail8;\n+\t\t\tgoto fail10;\n \t\t}\n \t\tif (!IS_P2ALIGNED(es_buf_stride,\n \t\t\t EFX_RX_ES_SUPER_BUFFER_BUF_ALIGNMENT)) {\n \t\t\trc = EINVAL;\n-\t\t\tgoto fail9;\n+\t\t\tgoto fail11;\n \t\t}\n \t}\n #else /* EFSYS_OPT_RX_ES_SUPER_BUFFER */\n@@ -1125,7 +1133,7 @@ ef10_rx_qcreate(\n \t\t esmp, disable_scatter, want_inner_classes,\n \t\t ps_buf_size, es_bufs_per_desc, es_max_dma_len,\n \t\t es_buf_stride, hol_block_timeout)) != 0)\n-\t\tgoto fail10;\n+\t\tgoto fail12;\n \n \terp->er_eep = eep;\n \terp->er_label = label;\n@@ -1136,25 +1144,31 @@ ef10_rx_qcreate(\n \n \treturn (0);\n \n+fail12:\n+\tEFSYS_PROBE(fail12);\n+#if EFSYS_OPT_RX_ES_SUPER_BUFFER\n+fail11:\n+\tEFSYS_PROBE(fail11);\n fail10:\n \tEFSYS_PROBE(fail10);\n-#if EFSYS_OPT_RX_ES_SUPER_BUFFER\n fail9:\n \tEFSYS_PROBE(fail9);\n+#endif /* EFSYS_OPT_RX_ES_SUPER_BUFFER */\n+#if EFSYS_OPT_RX_PACKED_STREAM\n fail8:\n \tEFSYS_PROBE(fail8);\n fail7:\n \tEFSYS_PROBE(fail7);\n-#endif /* EFSYS_OPT_RX_ES_SUPER_BUFFER */\n-#if EFSYS_OPT_RX_PACKED_STREAM\n+#endif /* EFSYS_OPT_RX_PACKED_STREAM */\n fail6:\n \tEFSYS_PROBE(fail6);\n+#if EFSYS_OPT_RX_ES_SUPER_BUFFER\n fail5:\n \tEFSYS_PROBE(fail5);\n-#endif /* EFSYS_OPT_RX_PACKED_STREAM */\n+#endif /* EFSYS_OPT_RX_ES_SUPER_BUFFER */\n+#if EFSYS_OPT_RX_PACKED_STREAM\n fail4:\n \tEFSYS_PROBE(fail4);\n-#if EFSYS_OPT_RX_PACKED_STREAM\n fail3:\n \tEFSYS_PROBE(fail3);\n #endif /* EFSYS_OPT_RX_PACKED_STREAM */\ndiff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h\nindex 2e847b6ce..97c4846d2 100644\n--- a/drivers/net/sfc/base/efx.h\n+++ b/drivers/net/sfc/base/efx.h\n@@ -300,7 +300,7 @@ extern\t__checkReturn\tefx_rc_t\n efx_intr_init(\n \t__in\t\tefx_nic_t *enp,\n \t__in\t\tefx_intr_type_t type,\n-\t__in\t\tefsys_mem_t *esmp);\n+\t__in_opt\tefsys_mem_t *esmp);\n \n extern\t\t\tvoid\n efx_intr_enable(\ndiff --git a/drivers/net/sfc/base/efx_intr.c b/drivers/net/sfc/base/efx_intr.c\nindex b518916dc..4c68b1091 100644\n--- a/drivers/net/sfc/base/efx_intr.c\n+++ b/drivers/net/sfc/base/efx_intr.c\n@@ -93,7 +93,7 @@ static const efx_intr_ops_t\t__efx_intr_ef10_ops = {\n efx_intr_init(\n \t__in\t\tefx_nic_t *enp,\n \t__in\t\tefx_intr_type_t type,\n-\t__in\t\tefsys_mem_t *esmp)\n+\t__in_opt\tefsys_mem_t *esmp)\n {\n \tefx_intr_t *eip = &(enp->en_intr);\n \tconst efx_intr_ops_t *eiop;\ndiff --git a/drivers/net/sfc/base/efx_rx.c b/drivers/net/sfc/base/efx_rx.c\nindex 04bc7aed8..afa3ac588 100644\n--- a/drivers/net/sfc/base/efx_rx.c\n+++ b/drivers/net/sfc/base/efx_rx.c\n@@ -107,7 +107,7 @@ siena_rx_qcreate(\n \t__in\t\tunsigned int index,\n \t__in\t\tunsigned int label,\n \t__in\t\tefx_rxq_type_t type,\n-\t__in\t\tconst efx_rxq_type_data_t *type_data,\n+\t__in_opt\tconst efx_rxq_type_data_t *type_data,\n \t__in\t\tefsys_mem_t *esmp,\n \t__in\t\tsize_t ndescs,\n \t__in\t\tuint32_t id,\n@@ -784,7 +784,7 @@ efx_rx_qcreate_internal(\n \t__in\t\tunsigned int index,\n \t__in\t\tunsigned int label,\n \t__in\t\tefx_rxq_type_t type,\n-\t__in\t\tconst efx_rxq_type_data_t *type_data,\n+\t__in_opt\tconst efx_rxq_type_data_t *type_data,\n \t__in\t\tefsys_mem_t *esmp,\n \t__in\t\tsize_t ndescs,\n \t__in\t\tuint32_t id,\n@@ -1568,7 +1568,7 @@ siena_rx_qcreate(\n \t__in\t\tunsigned int index,\n \t__in\t\tunsigned int label,\n \t__in\t\tefx_rxq_type_t type,\n-\t__in\t\tconst efx_rxq_type_data_t *type_data,\n+\t__in_opt\tconst efx_rxq_type_data_t *type_data,\n \t__in\t\tefsys_mem_t *esmp,\n \t__in\t\tsize_t ndescs,\n \t__in\t\tuint32_t id,\n", "prefixes": [ "01/38" ] }{ "id": 50203, "url": "