Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/94164/?format=api
https://patches.dpdk.org/api/patches/94164/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210614091213.3953-1-david.marchand@redhat.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": "<20210614091213.3953-1-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210614091213.3953-1-david.marchand@redhat.com", "date": "2021-06-14T09:12:13", "name": "ipc: stop mp control thread on cleanup", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f31f90738cbe580a0bd38ad47449d71ce3b4a0cc", "submitter": { "id": 1173, "url": "https://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 24651, "url": "https://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210614091213.3953-1-david.marchand@redhat.com/mbox/", "series": [ { "id": 17315, "url": "https://patches.dpdk.org/api/series/17315/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17315", "date": "2021-06-14T09:12:13", "name": "ipc: stop mp control thread on cleanup", "version": 1, "mbox": "https://patches.dpdk.org/series/17315/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/94164/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/94164/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1180FA0548;\n\tMon, 14 Jun 2021 11:12:53 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F0F8D40E0F;\n\tMon, 14 Jun 2021 11:12:52 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id E9E994067A\n for <dev@dpdk.org>; Mon, 14 Jun 2021 11:12:50 +0200 (CEST)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-549-p4F217TSMpyhbvLq3R_u5Q-1; Mon, 14 Jun 2021 05:12:48 -0400", "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com\n [10.5.11.13])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F1EA19057A6;\n Mon, 14 Jun 2021 09:12:47 +0000 (UTC)", "from dmarchan.remote.csb (unknown [10.40.193.154])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 65B946060F;\n Mon, 14 Jun 2021 09:12:45 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1623661969;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=XOhHH3v0Vk5wiMDXfqkImHi7T3tC7Ld89bQjHrkDFRQ=;\n b=TdiQZN8lftjzRXYco3759IUOJAPKoATaOzTC7EaqPsDxlxYB8tU0/GBrsPSvlg25XaRFcU\n dWhRYgfOVTSVsmJAdw+uClZf6wUWAmG067tlX6ir5vi2uZDh5g4Ukj2dtkyWnAAfEvS1w3\n F3fDEMwiqXEu0Ot1JFr0+UV7DF9Or4Y=", "X-MC-Unique": "p4F217TSMpyhbvLq3R_u5Q-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "ohilyard@iol.unh.edu, stable@dpdk.org,\n Anatoly Burakov <anatoly.burakov@intel.com>,\n Qi Zhang <qi.z.zhang@intel.com>", "Date": "Mon, 14 Jun 2021 11:12:13 +0200", "Message-Id": "<20210614091213.3953-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "Subject": "[dpdk-dev] [PATCH] ipc: stop mp control thread on cleanup", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "When calling rte_eal_cleanup, the mp channel cleanup routine only sets\nmp_fd to -1 leaving the rte_mp_handle control thread running.\nThis control thread can spew warnings on reading on an invalid fd.\n\nTo handle this situation, sets mp_fd to -1 to signal the control thread\nit should exit, but since this thread might be sleeping on the socket,\ncancel the thread too.\n\nFixes: 85d6815fa6d0 (\"eal: close multi-process socket during cleanup\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n lib/eal/common/eal_common_proc.c | 31 +++++++++++++++----------------\n 1 file changed, 15 insertions(+), 16 deletions(-)", "diff": "diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c\nindex dc4a2efa82..2c46c21421 100644\n--- a/lib/eal/common/eal_common_proc.c\n+++ b/lib/eal/common/eal_common_proc.c\n@@ -35,6 +35,7 @@\n #include \"eal_internal_cfg.h\"\n \n static int mp_fd = -1;\n+static pthread_t mp_handle_tid;\n static char mp_filter[PATH_MAX]; /* Filter for secondary process sockets */\n static char mp_dir_path[PATH_MAX]; /* The directory path for all mp sockets */\n static pthread_mutex_t mp_mutex_action = PTHREAD_MUTEX_INITIALIZER;\n@@ -383,7 +384,7 @@ mp_handle(void *arg __rte_unused)\n \tstruct mp_msg_internal msg;\n \tstruct sockaddr_un sa;\n \n-\twhile (1) {\n+\twhile (mp_fd >= 0) {\n \t\tif (read_msg(&msg, &sa) == 0)\n \t\t\tprocess_msg(&msg, &sa);\n \t}\n@@ -566,25 +567,11 @@ open_socket_fd(void)\n \treturn mp_fd;\n }\n \n-static void\n-close_socket_fd(void)\n-{\n-\tchar path[PATH_MAX];\n-\n-\tif (mp_fd < 0)\n-\t\treturn;\n-\n-\tclose(mp_fd);\n-\tcreate_socket_path(peer_name, path, sizeof(path));\n-\tunlink(path);\n-}\n-\n int\n rte_mp_channel_init(void)\n {\n \tchar path[PATH_MAX];\n \tint dir_fd;\n-\tpthread_t mp_handle_tid;\n \tconst struct internal_config *internal_conf =\n \t\teal_get_internal_configuration();\n \n@@ -645,7 +632,19 @@ rte_mp_channel_init(void)\n void\n rte_mp_channel_cleanup(void)\n {\n-\tclose_socket_fd();\n+\tchar path[PATH_MAX];\n+\tint fd;\n+\n+\tif (mp_fd < 0)\n+\t\treturn;\n+\n+\tfd = mp_fd;\n+\tmp_fd = -1;\n+\tpthread_cancel(mp_handle_tid);\n+\tpthread_join(mp_handle_tid, NULL);\n+\tclose(fd);\n+\tcreate_socket_path(peer_name, path, sizeof(path));\n+\tunlink(path);\n }\n \n /**\n", "prefixes": [] }{ "id": 94164, "url": "