Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53077/?format=api
http://patches.dpdk.org/api/patches/53077/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/434b9157813b280d73c213b4d934a6c12dbebe0e.1556195691.git.anatoly.burakov@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": "<434b9157813b280d73c213b4d934a6c12dbebe0e.1556195691.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/434b9157813b280d73c213b4d934a6c12dbebe0e.1556195691.git.anatoly.burakov@intel.com", "date": "2019-04-25T12:45:18", "name": "[19.08,5/6] ipc: handle unsupported ipc in sync request", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1d594166242f10085484872cd9814a9cd7e5b559", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.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/434b9157813b280d73c213b4d934a6c12dbebe0e.1556195691.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 4465, "url": "http://patches.dpdk.org/api/series/4465/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4465", "date": "2019-04-25T12:45:14", "name": "[19.08,1/6] ipc: handle unsupported ipc in init", "version": 1, "mbox": "http://patches.dpdk.org/series/4465/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/53077/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/53077/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 99A5C1B5B0;\n\tThu, 25 Apr 2019 14:45:34 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 3CFD81B59C\n\tfor <dev@dpdk.org>; Thu, 25 Apr 2019 14:45:27 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Apr 2019 05:45:26 -0700", "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby orsmga002.jf.intel.com with ESMTP; 25 Apr 2019 05:45:25 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.60,393,1549958400\"; d=\"scan'208\";a=\"153666987\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Matan Azrad <matan@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>, \n\tYongseok Koh <yskoh@mellanox.com>, herakliusz.lipiec@intel.com", "Date": "Thu, 25 Apr 2019 13:45:18 +0100", "Message-Id": "<434b9157813b280d73c213b4d934a6c12dbebe0e.1556195691.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "<b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com>", "<b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com>" ], "References": [ "<b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com>", "<b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH 19.08 5/6] ipc: handle unsupported ipc in sync\n\trequest", "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": "Currently, IPC API will silently ignore unsupported IPC.\nFix the API call and its callers to explicitly handle\nunsupported IPC cases.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n drivers/net/mlx4/mlx4_mp.c | 5 +++--\n drivers/net/mlx5/mlx5_mp.c | 5 +++--\n lib/librte_eal/common/eal_common_proc.c | 3 ++-\n lib/librte_eal/common/hotplug_mp.c | 6 +++++-\n lib/librte_eal/common/include/rte_eal.h | 3 +++\n lib/librte_eal/common/malloc_mp.c | 13 ++++++-------\n 6 files changed, 22 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c\nindex ebc57a99e..cdb648517 100644\n--- a/drivers/net/mlx4/mlx4_mp.c\n+++ b/drivers/net/mlx4/mlx4_mp.c\n@@ -178,8 +178,9 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)\n \tmp_init_msg(dev, &mp_req, type);\n \tret = rte_mp_request_sync(&mp_req, &mp_rep, &ts);\n \tif (ret) {\n-\t\tERROR(\"port %u failed to request stop/start Rx/Tx (%d)\",\n-\t\t dev->data->port_id, type);\n+\t\tif (rte_errno != ENOTSUP)\n+\t\t\tERROR(\"port %u failed to request stop/start Rx/Tx (%d)\",\n+\t\t\t\t\tdev->data->port_id, type);\n \t\tgoto exit;\n \t}\n \tif (mp_rep.nb_sent != mp_rep.nb_received) {\ndiff --git a/drivers/net/mlx5/mlx5_mp.c b/drivers/net/mlx5/mlx5_mp.c\nindex dc99231fe..37f26cc71 100644\n--- a/drivers/net/mlx5/mlx5_mp.c\n+++ b/drivers/net/mlx5/mlx5_mp.c\n@@ -180,8 +180,9 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)\n \tmp_init_msg(dev, &mp_req, type);\n \tret = rte_mp_request_sync(&mp_req, &mp_rep, &ts);\n \tif (ret) {\n-\t\tDRV_LOG(ERR, \"port %u failed to request stop/start Rx/Tx (%d)\",\n-\t\t\tdev->data->port_id, type);\n+\t\tif (rte_errno != ENOTSUP)\n+\t\t\tDRV_LOG(ERR, \"port %u failed to request stop/start Rx/Tx (%d)\",\n+\t\t\t\tdev->data->port_id, type);\n \t\tgoto exit;\n \t}\n \tif (mp_rep.nb_sent != mp_rep.nb_received) {\ndiff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c\nindex 0db842f84..c6aa80bfc 100644\n--- a/lib/librte_eal/common/eal_common_proc.c\n+++ b/lib/librte_eal/common/eal_common_proc.c\n@@ -954,7 +954,8 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n \n \tif (internal_config.no_shconf) {\n \t\tRTE_LOG(DEBUG, EAL, \"No shared files mode enabled, IPC is disabled\\n\");\n-\t\treturn 0;\n+\t\trte_errno = ENOTSUP;\n+\t\treturn -1;\n \t}\n \n \tif (gettimeofday(&now, NULL) < 0) {\ndiff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c\nindex 60cd1402d..5731834d1 100644\n--- a/lib/librte_eal/common/hotplug_mp.c\n+++ b/lib/librte_eal/common/hotplug_mp.c\n@@ -405,7 +405,11 @@ int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)\n \n \tret = rte_mp_request_sync(&mp_req, &mp_reply, &ts);\n \tif (ret != 0) {\n-\t\tRTE_LOG(ERR, EAL, \"rte_mp_request_sync failed\\n\");\n+\t\t/* if IPC is not supported, behave as if the call succeeded */\n+\t\tif (rte_errno != ENOTSUP)\n+\t\t\tRTE_LOG(ERR, EAL, \"rte_mp_request_sync failed\\n\");\n+\t\telse\n+\t\t\tret = 0;\n \t\treturn ret;\n \t}\n \ndiff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h\nindex d47cb2440..4460ea14a 100644\n--- a/lib/librte_eal/common/include/rte_eal.h\n+++ b/lib/librte_eal/common/include/rte_eal.h\n@@ -314,6 +314,9 @@ rte_mp_sendmsg(struct rte_mp_msg *msg);\n *\n * @note The caller is responsible to free reply->replies.\n *\n+ * @note IPC may be unsupported in certain circumstances, so caller should check\n+ * for ENOTSUP error.\n+ *\n * @param req\n * The req argument contains the customized request message.\n *\ndiff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c\nindex 1374eabc2..7c6112c4e 100644\n--- a/lib/librte_eal/common/malloc_mp.c\n+++ b/lib/librte_eal/common/malloc_mp.c\n@@ -573,7 +573,7 @@ request_sync(void)\n \tstruct rte_mp_reply reply;\n \tstruct malloc_mp_req *req = (struct malloc_mp_req *)msg.param;\n \tstruct timespec ts;\n-\tint i, ret;\n+\tint i, ret = -1;\n \n \tmemset(&msg, 0, sizeof(msg));\n \tmemset(&reply, 0, sizeof(reply));\n@@ -596,14 +596,16 @@ request_sync(void)\n \t\tret = rte_mp_request_sync(&msg, &reply, &ts);\n \t} while (ret != 0 && rte_errno == EEXIST);\n \tif (ret != 0) {\n-\t\tRTE_LOG(ERR, EAL, \"Could not send sync request to secondary process\\n\");\n-\t\tret = -1;\n+\t\t/* if IPC is unsupported, behave as if the call succeeded */\n+\t\tif (rte_errno != ENOTSUP)\n+\t\t\tRTE_LOG(ERR, EAL, \"Could not send sync request to secondary process\\n\");\n+\t\telse\n+\t\t\tret = 0;\n \t\tgoto out;\n \t}\n \n \tif (reply.nb_received != reply.nb_sent) {\n \t\tRTE_LOG(ERR, EAL, \"Not all secondaries have responded\\n\");\n-\t\tret = -1;\n \t\tgoto out;\n \t}\n \n@@ -612,17 +614,14 @@ request_sync(void)\n \t\t\t\t(struct malloc_mp_req *)reply.msgs[i].param;\n \t\tif (resp->t != REQ_TYPE_SYNC) {\n \t\t\tRTE_LOG(ERR, EAL, \"Unexpected response from secondary\\n\");\n-\t\t\tret = -1;\n \t\t\tgoto out;\n \t\t}\n \t\tif (resp->id != req->id) {\n \t\t\tRTE_LOG(ERR, EAL, \"Wrong request ID\\n\");\n-\t\t\tret = -1;\n \t\t\tgoto out;\n \t\t}\n \t\tif (resp->result != REQ_RESULT_SUCCESS) {\n \t\t\tRTE_LOG(ERR, EAL, \"Secondary process failed to synchronize\\n\");\n-\t\t\tret = -1;\n \t\t\tgoto out;\n \t\t}\n \t}\n", "prefixes": [ "19.08", "5/6" ] }{ "id": 53077, "url": "