From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 17BF72C12 for ; Tue, 13 Mar 2018 18:42:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 10:42:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,465,1515484800"; d="scan'208";a="38494225" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 13 Mar 2018 10:42:42 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w2DHgfoQ003076; Tue, 13 Mar 2018 17:42:41 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w2DHgfkA025203; Tue, 13 Mar 2018 17:42:41 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w2DHgekS025093; Tue, 13 Mar 2018 17:42:40 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: jianfeng.tan@intel.com, keith.wiles@intel.com, konstantin.ananyev@intel.com Date: Tue, 13 Mar 2018 17:42:34 +0000 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v6 0/6] Improvements for DPDK IPC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 17:42:47 -0000 This is an assortment of loosely related improvements to IPC, mostly related to handling corner cases and avoiding race conditions. Main addition is an attempt to avoid undefined behavior when receiving messages while secondary process is initializing. It is assumed that once callback is registered, it is safe to receive messages. If the callback wasn't registered, then there are two choices - either we haven't reached the stage where we register this callback (init is not finished), or user has forgotten to register callback for this message. The latter can only be known once initialization is complete, so until init is complete, treat this process as not-existing if there is no registered callback for the message. This will handle both scenarios. v6: - clang compile fix - clarify commit message for patch 6 - simplify patch 6 v5: - added cover-letter :) - drop the "don't send messages to processes which haven't finished initializing" model added in previous version. instead, allow everyone to receive all messages, but check if initialization is completed, and check if there is a callback registered for this message. if there is no callback, assume we just didn't get around to it yet, so just send a special message to the requestor that it should treat this process as if it wasn't there. v4: - make init_complete volatile - changed from "don't process messages until init complete" to "don't send messages to processes which haven't finished initializing", as the former would have resulted in timeouts if init took too long to complete - fixed resource leaks - added patch to simplify IPC timeouts handling v3: - move init_complete until after receiving message v2: - added patch to prevent IPC from sending messages while primary is initializing - added patch to generate filter from eal_mp_socket_path() instead of hardcoding the value Anatoly Burakov (6): eal: add internal flag indicating init has completed eal: abstract away IPC socket path generation eal: don't hardcode socket filter value in IPC eal: lock IPC directory on init and send eal: simplify IPC sync request timeout code eal: ignore messages until init is complete lib/librte_eal/common/eal_common_options.c | 1 + lib/librte_eal/common/eal_common_proc.c | 178 ++++++++++++++++++++--------- lib/librte_eal/common/eal_internal_cfg.h | 2 + lib/librte_eal/linuxapp/eal/eal.c | 2 + 4 files changed, 129 insertions(+), 54 deletions(-) -- 2.7.4