From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 4FD6F1BE1E for ; Tue, 3 Jul 2018 23:51:11 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 276A921C93; Tue, 3 Jul 2018 17:51:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 03 Jul 2018 17:51:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=Y/WnMzPp5dJJv2OCh/2Et5k5a1 B7vEChsiZGDZq0MlQ=; b=SJc+XPZ68zqqWKShwqwddOKzVtZ5ekGN+MRmV2rhwx QIBRMvhu3qraJZxGTnWVraJnxD5vq2jvJVb6EDxYdhB+lLwlpqyxFRlJjNmMXrSw HDyWbbXyLW3tAGvWjBq1EDeVfWUQYaBwgaCyN8808qWJRd9OADSfTjN7AS+pvmjh 4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Y/WnMz Pp5dJJv2OCh/2Et5k5a1B7vEChsiZGDZq0MlQ=; b=SX3KKKObjglnhSSUaJI1mN tY2beBxkSCsHcex6PrwcgbOvk4CL6YuFz8V7YVvOkcIMUMOjHj3+1YfVLOVpyEs2 vl/qJ/3SFF1YtOaXjKeL/0HaIs1lBi+WYPM1EAzqcXSOFAXZVq6KbhI3rKemuZ3+ 3CU0IeCx9s8Y3c39fTT3y7Loo4sGfvd7uSOw/gJtLLEUoBnfN8zbLx9z+9USFK9Y 7oRiTyf/qcIwHsKnFKhV1YuxnVe/MRz0/WpapuLpNRF02s5nI9ejADgeoCiEYr+2 RIl5zL+STHaX1nJgNNZ7+z4xtNfoGdf0Sw1MADASS8d7ppm9Xm4VjxNaYz1957Uw == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C46BD10262; Tue, 3 Jul 2018 17:51:06 -0400 (EDT) From: Thomas Monjalon To: "Zhang, Qi Z" Cc: dev@dpdk.org, "Burakov, Anatoly" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Yigit, Ferruh" , "Shelton, Benjamin H" , "Vangati, Narender" Date: Tue, 03 Jul 2018 23:51:05 +0200 Message-ID: <2121919.otauVgk3WW@xps> In-Reply-To: <039ED4275CED7440929022BC67E7061153243598@SHSMSX103.ccr.corp.intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <3358274.MJj7BZBBQ7@xps> <039ED4275CED7440929022BC67E7061153243598@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 02/19] eal: enable multi process init callback 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, 03 Jul 2018 21:51:11 -0000 03/07/2018 17:16, Zhang, Qi Z: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > Hi Qi, > > > > Sorry I do not understand neither the commit log, nor the doxygen. > > If it can help, consider your reader is in a bad mood and needs a pleasant > > description. > > OK, I think is not a grammar issue since it almost passed a grammar check :) > > So more explanation: > Basically we need to register mp action callback in ethdev layer, What is "mp action callback"? Why do you need it in ethdev? > but this should happens during rte_eal_init Why it should be done in rte_eal_init? > ethdev don't have a general init function that can be invoked by eal > during rte_eal_init, actually I guess, all no-eal module don't have What is "no-eal module"? > in vdev bus, it register the mp action at the first bus scan happen. > but in ethdev, we can't do that way, because, we don' t know > when device will be attached or detached. > so we need that function to help register a callback function which will be invoked during rte_eal_init. > > > > > > 02/07/2018 07:44, Qi Zhang: > > > Introduce new API rte_eal_register_mp_init that help to register a > > > callback function which will be invoked right after multi-process > > > channel be established (rte_mp_channel_init). Typically the API will > > > be used by other module that want it's mp channel action callbacks can > > > be registered during rte_eal_init automatically. > > [...] > > > +/** > > > + * @warning > > > + * @b EXPERIMENTAL: this API may change without prior notice > > > + * > > > + * Register a callback function that will be invoked right after > > > + * multi-process channel be established (rte_mp_channel_init). > > > +Typically > > > + * the function is used by other module that want it's mp channel > > > + * action callbacks can be registered during rte_eal_init automatically. > > > + * > > > + * @note > > > + * This function only take effect when be called before rte_eal_init, > > > + * and all registered callback will be clear during rte_eal_cleanup.