From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D93AE4C8C for ; Wed, 7 Mar 2018 17:56:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2018 08:56:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,436,1515484800"; d="scan'208";a="35367937" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 07 Mar 2018 08:56:54 -0800 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 w27Gusjm032285; Wed, 7 Mar 2018 16:56:54 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w27Gusdo006103; Wed, 7 Mar 2018 16:56:54 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w27GurYv006099; Wed, 7 Mar 2018 16:56:53 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: jianfeng.tan@intel.com, keith.wiles@intel.com, konstantin.ananyev@intel.com Date: Wed, 7 Mar 2018 16:56:47 +0000 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 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: Wed, 07 Mar 2018 16:56:58 -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. 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 | 382 +++++++++++++++++------------ lib/librte_eal/common/eal_internal_cfg.h | 2 + lib/librte_eal/linuxapp/eal/eal.c | 2 + 4 files changed, 228 insertions(+), 159 deletions(-) -- 2.7.4