Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/70612/?format=api
http://patches.dpdk.org/api/patches/70612/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200527132326.1382-7-hemant.agrawal@nxp.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": "<20200527132326.1382-7-hemant.agrawal@nxp.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200527132326.1382-7-hemant.agrawal@nxp.com", "date": "2020-05-27T13:22:55", "name": "[06/37] bus/fslmc: support handle portal alloc failure", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "214903d78b4b2b22d7577ea28b9d51282ac2e353", "submitter": { "id": 477, "url": "http://patches.dpdk.org/api/people/477/?format=api", "name": "Hemant Agrawal", "email": "hemant.agrawal@nxp.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200527132326.1382-7-hemant.agrawal@nxp.com/mbox/", "series": [ { "id": 10248, "url": "http://patches.dpdk.org/api/series/10248/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10248", "date": "2020-05-27T13:22:49", "name": "NXP DPAAx enhancements", "version": 1, "mbox": "http://patches.dpdk.org/series/10248/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/70612/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/70612/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 30D58A034E;\n\tWed, 27 May 2020 15:27:21 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F02F61DA39;\n\tWed, 27 May 2020 15:26:37 +0200 (CEST)", "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id B5C911D968\n for <dev@dpdk.org>; Wed, 27 May 2020 15:26:23 +0200 (CEST)", "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 371071A07E6;\n Wed, 27 May 2020 15:26:23 +0200 (CEST)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2F8671A07D7;\n Wed, 27 May 2020 15:26:21 +0200 (CEST)", "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3EFC140305;\n Wed, 27 May 2020 21:26:18 +0800 (SGT)" ], "From": "Hemant Agrawal <hemant.agrawal@nxp.com>", "To": "dev@dpdk.org,\n\tferruh.yigit@intel.com", "Cc": "Nipun Gupta <nipun.gupta@nxp.com>, Hemant Agrawal <hemant.agrawal@nxp.com>", "Date": "Wed, 27 May 2020 18:52:55 +0530", "Message-Id": "<20200527132326.1382-7-hemant.agrawal@nxp.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200527132326.1382-1-hemant.agrawal@nxp.com>", "References": "<20200527132326.1382-1-hemant.agrawal@nxp.com>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Subject": "[dpdk-dev] [PATCH 06/37] bus/fslmc: support handle portal alloc\n\tfailure", "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": "Add the error handling on failure.\n\nSigned-off-by: Nipun Gupta <nipun.gupta@nxp.com>\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 28 ++++++++++++++----------\n 1 file changed, 16 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c\nindex b7a49e8f6..5a12ff35d 100644\n--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c\n+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c\n@@ -264,6 +264,16 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev)\n \treturn 0;\n }\n \n+static void dpaa2_put_qbman_swp(struct dpaa2_dpio_dev *dpio_dev)\n+{\n+\tif (dpio_dev) {\n+#ifdef RTE_LIBRTE_PMD_DPAA2_EVENTDEV\n+\t\tdpaa2_dpio_intr_deinit(dpio_dev);\n+#endif\n+\t\trte_atomic16_clear(&dpio_dev->ref_count);\n+\t}\n+}\n+\n static struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)\n {\n \tstruct dpaa2_dpio_dev *dpio_dev = NULL;\n@@ -274,8 +284,10 @@ static struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)\n \t\tif (dpio_dev && rte_atomic16_test_and_set(&dpio_dev->ref_count))\n \t\t\tbreak;\n \t}\n-\tif (!dpio_dev)\n+\tif (!dpio_dev) {\n+\t\tDPAA2_BUS_ERR(\"No software portal resource left\");\n \t\treturn NULL;\n+\t}\n \n \tDPAA2_BUS_DEBUG(\"New Portal %p (%d) affined thread - %lu\",\n \t\t\tdpio_dev, dpio_dev->index, syscall(SYS_gettid));\n@@ -283,6 +295,7 @@ static struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)\n \tret = dpaa2_configure_stashing(dpio_dev);\n \tif (ret) {\n \t\tDPAA2_BUS_ERR(\"dpaa2_configure_stashing failed\");\n+\t\trte_atomic16_clear(&dpio_dev->ref_count);\n \t\treturn NULL;\n \t}\n \n@@ -296,15 +309,6 @@ static struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)\n \treturn dpio_dev;\n }\n \n-static void dpaa2_put_qbman_swp(struct dpaa2_dpio_dev *dpio_dev)\n-{\n-#ifdef RTE_LIBRTE_PMD_DPAA2_EVENTDEV\n-\tdpaa2_dpio_intr_deinit(dpio_dev);\n-#endif\n-\tif (dpio_dev)\n-\t\trte_atomic16_clear(&dpio_dev->ref_count);\n-}\n-\n int\n dpaa2_affine_qbman_swp(void)\n {\n@@ -315,7 +319,7 @@ dpaa2_affine_qbman_swp(void)\n \tif (!RTE_PER_LCORE(_dpaa2_io).dpio_dev) {\n \t\tdpio_dev = dpaa2_get_qbman_swp();\n \t\tif (!dpio_dev) {\n-\t\t\tDPAA2_BUS_ERR(\"No software portal resource left\");\n+\t\t\tDPAA2_BUS_ERR(\"Error in software portal allocation\");\n \t\t\treturn -1;\n \t\t}\n \t\tRTE_PER_LCORE(_dpaa2_io).dpio_dev = dpio_dev;\n@@ -337,7 +341,7 @@ dpaa2_affine_qbman_ethrx_swp(void)\n \tif (!RTE_PER_LCORE(_dpaa2_io).ethrx_dpio_dev) {\n \t\tdpio_dev = dpaa2_get_qbman_swp();\n \t\tif (!dpio_dev) {\n-\t\t\tDPAA2_BUS_ERR(\"No software portal resource left\");\n+\t\t\tDPAA2_BUS_ERR(\"Error in software portal allocation\");\n \t\t\treturn -1;\n \t\t}\n \t\tRTE_PER_LCORE(_dpaa2_io).ethrx_dpio_dev = dpio_dev;\n", "prefixes": [ "06/37" ] }{ "id": 70612, "url": "