Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54961/?format=api
http://patches.dpdk.org/api/patches/54961/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1560957293-17294-8-git-send-email-ndragazis@arrikto.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": "<1560957293-17294-8-git-send-email-ndragazis@arrikto.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1560957293-17294-8-git-send-email-ndragazis@arrikto.com", "date": "2019-06-19T15:14:32", "name": "[07/28] vhost: move vhost-user reconnection", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": true, "hash": "33325de8371e1a2de1360184854cd7d7430dfd2f", "submitter": { "id": 1339, "url": "http://patches.dpdk.org/api/people/1339/?format=api", "name": "Nikos Dragazis", "email": "ndragazis@arrikto.com" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1560957293-17294-8-git-send-email-ndragazis@arrikto.com/mbox/", "series": [ { "id": 5082, "url": "http://patches.dpdk.org/api/series/5082/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5082", "date": "2019-06-19T15:14:25", "name": "vhost: add virtio-vhost-user transport", "version": 1, "mbox": "http://patches.dpdk.org/series/5082/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54961/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/54961/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 6832B1C3B9;\n\tWed, 19 Jun 2019 17:15:55 +0200 (CEST)", "from mx0.arrikto.com (mx0.arrikto.com [212.71.252.59])\n\tby dpdk.org (Postfix) with ESMTP id E5DF81C389\n\tfor <dev@dpdk.org>; Wed, 19 Jun 2019 17:15:38 +0200 (CEST)", "from troi.prod.arr (mail.arr [10.99.0.5])\n\tby mx0.arrikto.com (Postfix) with ESMTP id C6E1D18200B;\n\tWed, 19 Jun 2019 18:15:38 +0300 (EEST)", "from localhost.localdomain (unknown [10.89.50.133])\n\tby troi.prod.arr (Postfix) with ESMTPSA id 51CE12B2;\n\tWed, 19 Jun 2019 18:15:38 +0300 (EEST)" ], "From": "Nikos Dragazis <ndragazis@arrikto.com>", "To": "dev@dpdk.org", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n\tTiwei Bie <tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>, Wei Wang <wei.w.wang@intel.com>,\n\tStojaczyk Dariusz <dariusz.stojaczyk@intel.com>,\n\tVangelis Koukis <vkoukis@arrikto.com>", "Date": "Wed, 19 Jun 2019 18:14:32 +0300", "Message-Id": "<1560957293-17294-8-git-send-email-ndragazis@arrikto.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1560957293-17294-1-git-send-email-ndragazis@arrikto.com>", "References": "<1560957293-17294-1-git-send-email-ndragazis@arrikto.com>", "Subject": "[dpdk-dev] [PATCH 07/28] vhost: move vhost-user reconnection", "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": "The socket reconnection code is highly specific to AF_UNIX, so move the\nremaining pieces of it into trans_af_unix.c.\n\nSigned-off-by: Nikos Dragazis <ndragazis@arrikto.com>\nSigned-off-by: Stefan Hajnoczi <stefanha@redhat.com>\n---\n lib/librte_vhost/socket.c | 4 ----\n lib/librte_vhost/trans_af_unix.c | 9 +++++++--\n lib/librte_vhost/vhost.h | 10 +++-------\n 3 files changed, 10 insertions(+), 13 deletions(-)", "diff": "diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c\nindex 976343c..373c01d 100644\n--- a/lib/librte_vhost/socket.c\n+++ b/lib/librte_vhost/socket.c\n@@ -394,10 +394,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \n \tif ((flags & RTE_VHOST_USER_CLIENT) != 0) {\n \t\tvsocket->reconnect = !(flags & RTE_VHOST_USER_NO_RECONNECT);\n-\t\tif (vsocket->reconnect && reconn_tid == 0) {\n-\t\t\tif (vhost_user_reconnect_init() != 0)\n-\t\t\t\tgoto out_free;\n-\t\t}\n \t} else {\n \t\tvsocket->is_server = true;\n \t}\ndiff --git a/lib/librte_vhost/trans_af_unix.c b/lib/librte_vhost/trans_af_unix.c\nindex 58fc9e2..00d5366 100644\n--- a/lib/librte_vhost/trans_af_unix.c\n+++ b/lib/librte_vhost/trans_af_unix.c\n@@ -361,7 +361,7 @@ struct vhost_user_reconnect_list {\n };\n \n static struct vhost_user_reconnect_list reconn_list;\n-pthread_t reconn_tid;\n+static pthread_t reconn_tid;\n \n static int\n vhost_user_connect_nonblock(int fd, struct sockaddr *un, size_t sz)\n@@ -431,7 +431,7 @@ vhost_user_client_reconnect(void *arg __rte_unused)\n \treturn NULL;\n }\n \n-int\n+static int\n vhost_user_reconnect_init(void)\n {\n \tint ret;\n@@ -532,6 +532,11 @@ af_unix_socket_init(struct vhost_user_socket *vsocket,\n \t\tcontainer_of(vsocket, struct af_unix_socket, socket);\n \tint ret;\n \n+\tif (vsocket->reconnect && reconn_tid == 0) {\n+\t\tif (vhost_user_reconnect_init() != 0)\n+\t\t\treturn -1;\n+\t}\n+\n \tTAILQ_INIT(&af_vsocket->conn_list);\n \tret = pthread_mutex_init(&af_vsocket->conn_mutex, NULL);\n \tif (ret) {\ndiff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex 5c3987d..d8b5ec2 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -404,9 +404,9 @@ struct virtio_net {\n \tstruct rte_vhost_user_extern_ops extern_ops;\n } __rte_cache_aligned;\n \n-/* The vhost_user, vhost_user_socket, and reconnect declarations are temporary\n- * measures for moving AF_UNIX code into trans_af_unix.c. They will be cleaned\n- * up as socket.c is untangled from trans_af_unix.c.\n+/* The vhost_user and vhost_user_socket declarations are temporary measures for\n+ * moving AF_UNIX code into trans_af_unix.c. They will be cleaned up as\n+ * socket.c is untangled from trans_af_unix.c.\n */\n /*\n * Every time rte_vhost_driver_register() is invoked, an associated\n@@ -458,10 +458,6 @@ struct vhost_user {\n \n extern struct vhost_user vhost_user;\n \n-extern pthread_t reconn_tid;\n-\n-int vhost_user_reconnect_init(void);\n-\n static __rte_always_inline bool\n vq_is_packed(struct virtio_net *dev)\n {\n", "prefixes": [ "07/28" ] }{ "id": 54961, "url": "