Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55456/?format=api
http://patches.dpdk.org/api/patches/55456/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190627093343.5171-3-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": "<20190627093343.5171-3-hemant.agrawal@nxp.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190627093343.5171-3-hemant.agrawal@nxp.com", "date": "2019-06-27T09:33:40", "name": "[v2,2/5] bus/fslmc: enhance error handling for dev parsing", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "92e6da863763ada8c112aed16999a76cf17aeeec", "submitter": { "id": 477, "url": "http://patches.dpdk.org/api/people/477/?format=api", "name": "Hemant Agrawal", "email": "hemant.agrawal@nxp.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190627093343.5171-3-hemant.agrawal@nxp.com/mbox/", "series": [ { "id": 5192, "url": "http://patches.dpdk.org/api/series/5192/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5192", "date": "2019-06-27T09:33:38", "name": "FSLMC bus enchancements", "version": 2, "mbox": "http://patches.dpdk.org/series/5192/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/55456/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/55456/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 57FF52BF2;\n\tThu, 27 Jun 2019 11:35:40 +0200 (CEST)", "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n\tby dpdk.org (Postfix) with ESMTP id CBAC625D9\n\tfor <dev@dpdk.org>; Thu, 27 Jun 2019 11:35:33 +0200 (CEST)", "from inva021.nxp.com (localhost [127.0.0.1])\n\tby inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 669CA200B9F;\n\tThu, 27 Jun 2019 11:35:33 +0200 (CEST)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n\t[165.114.16.14])\n\tby inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B391D200748;\n\tThu, 27 Jun 2019 11:35:31 +0200 (CEST)", "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n\t[10.232.133.63])\n\tby invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D62D64031E;\n\tThu, 27 Jun 2019 17:35:26 +0800 (SGT)" ], "From": "Hemant Agrawal <hemant.agrawal@nxp.com>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com", "Date": "Thu, 27 Jun 2019 15:03:40 +0530", "Message-Id": "<20190627093343.5171-3-hemant.agrawal@nxp.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190627093343.5171-1-hemant.agrawal@nxp.com>", "References": "<20190625104411.19565-1-hemant.agrawal@nxp.com>\n\t<20190627093343.5171-1-hemant.agrawal@nxp.com>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Subject": "[dpdk-dev] [PATCH v2 2/5] bus/fslmc: enhance error handling for dev\n\tparsing", "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: Shreyansh Jain <shreyansh.jain@nxp.com>\n\nIn case an incorrect device is found, it was quiting further search\nrather than skipping it.\n\nSigned-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>\n---\n drivers/bus/fslmc/fslmc_bus.c | 24 ++++++++++++++----------\n 1 file changed, 14 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c\nindex 35103d224..a2ed3bcc9 100644\n--- a/drivers/bus/fslmc/fslmc_bus.c\n+++ b/drivers/bus/fslmc/fslmc_bus.c\n@@ -33,7 +33,7 @@ uint8_t dpaa2_virt_mode;\n uint32_t\n rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type)\n {\n-\tif (device_type > DPAA2_DEVTYPE_MAX)\n+\tif (device_type >= DPAA2_DEVTYPE_MAX)\n \t\treturn 0;\n \treturn rte_fslmc_bus.device_count[device_type];\n }\n@@ -135,10 +135,11 @@ static int\n scan_one_fslmc_device(char *dev_name)\n {\n \tchar *dup_dev_name, *t_ptr;\n-\tstruct rte_dpaa2_device *dev;\n+\tstruct rte_dpaa2_device *dev = NULL;\n+\tint ret = -1;\n \n \tif (!dev_name)\n-\t\treturn -1;\n+\t\treturn ret;\n \n \t/* Ignore the Container name itself */\n \tif (!strncmp(\"dprc\", dev_name, 4))\n@@ -168,7 +169,8 @@ scan_one_fslmc_device(char *dev_name)\n \t/* Parse the device name and ID */\n \tt_ptr = strtok(dup_dev_name, \".\");\n \tif (!t_ptr) {\n-\t\tDPAA2_BUS_ERR(\"Incorrect device name observed\");\n+\t\tDPAA2_BUS_ERR(\"Invalid device found: (%s)\", dup_dev_name);\n+\t\tret = -EINVAL;\n \t\tgoto cleanup;\n \t}\n \tif (!strncmp(\"dpni\", t_ptr, 4))\n@@ -192,12 +194,10 @@ scan_one_fslmc_device(char *dev_name)\n \telse\n \t\tdev->dev_type = DPAA2_UNKNOWN;\n \n-\t/* Update the device found into the device_count table */\n-\trte_fslmc_bus.device_count[dev->dev_type]++;\n-\n \tt_ptr = strtok(NULL, \".\");\n \tif (!t_ptr) {\n-\t\tDPAA2_BUS_ERR(\"Incorrect device string observed (null)\");\n+\t\tDPAA2_BUS_ERR(\"Skipping invalid device (%s)\", dup_dev_name);\n+\t\tret = 0;\n \t\tgoto cleanup;\n \t}\n \n@@ -205,10 +205,14 @@ scan_one_fslmc_device(char *dev_name)\n \tdev->device.name = strdup(dev_name);\n \tif (!dev->device.name) {\n \t\tDPAA2_BUS_ERR(\"Unable to clone device name. Out of memory\");\n+\t\tret = -ENOMEM;\n \t\tgoto cleanup;\n \t}\n \tdev->device.devargs = fslmc_devargs_lookup(dev);\n \n+\t/* Update the device found into the device_count table */\n+\trte_fslmc_bus.device_count[dev->dev_type]++;\n+\n \t/* Add device in the fslmc device list */\n \tinsert_in_device_list(dev);\n \n@@ -222,7 +226,7 @@ scan_one_fslmc_device(char *dev_name)\n \t\tfree(dup_dev_name);\n \tif (dev)\n \t\tfree(dev);\n-\treturn -1;\n+\treturn ret;\n }\n \n static int\n@@ -353,7 +357,7 @@ rte_fslmc_scan(void)\n \t/* Remove all devices in the list */\n \tcleanup_fslmc_device_list();\n scan_fail:\n-\tDPAA2_BUS_DEBUG(\"FSLMC Bus Not Available. Skipping\");\n+\tDPAA2_BUS_DEBUG(\"FSLMC Bus Not Available. Skipping (%d)\", ret);\n \t/* Irrespective of failure, scan only return success */\n \treturn 0;\n }\n", "prefixes": [ "v2", "2/5" ] }{ "id": 55456, "url": "