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 438895323 for ; Wed, 26 Sep 2018 15:21:57 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B123621F95; Wed, 26 Sep 2018 09:21:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 26 Sep 2018 09:21:55 -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=5QzU7AXUjf5SNFyy+1FbvEHxJK wH1wi7qsEX+oddF1Y=; b=i9iD+b1k0hxrzZwTopH5cjbKVehpfHAtoIF4jRc6j/ PM3l7bhyOICyWVyK2CTNI9MjZswGXLOuIYW2flmqA+tcBQJOoXhJqcsKI59yTt36 g5AB1NiAFDWOwXA4P7Qm7yHeoP/SVXsKJUa8YPHfI6GntE1WSC/B4RfQUCqIM8EH w= 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=5QzU7A XUjf5SNFyy+1FbvEHxJKwH1wi7qsEX+oddF1Y=; b=nHQoLpLhwP6AvVS4+4fPc5 YbPQ/SaYTdmW/0yJGtB42YzGKTTlRwytYpbWJWpDr1OtLaUD1R2kQhiBst9pyrAZ uwWuJe5g/rRGK2JWmebYTXAryDYjcPepAJnYI23YTLpyPkWYfsmdMtcVtkXaEo6o VxyeJTO8xeR38wi0dCqf6QQzBOB63paVJi5/HpATOja/IYRUOTHso5bzoKwBfnG6 s20eqqw8bzKRacEDh9MbqaRWpJ4PPKX1NNYzBdqfUyOwsOFa7o9f1yh0i9WUe7eH jNxpxolXUvthYgXTKlaRV+TxXpf4ntqWxkMZlIDMhuAp8nHN/96SdIw2H35+QL3Q == 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 18DCCE4061; Wed, 26 Sep 2018 09:21:54 -0400 (EDT) From: Thomas Monjalon To: Alejandro Lucero Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , "Burakov, Anatoly" , rasland@mellanox.com Date: Wed, 26 Sep 2018 15:21:52 +0200 Message-ID: <2325089.6vXeJmFoYy@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] secondary processes and private data 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, 26 Sep 2018 13:21:57 -0000 Hi Alejandro, 25/09/2018 16:10, Alejandro Lucero: > I've a problem when part of device private data needs to be private per > process. It appears we are facing the same issue to support multi-process in tap. > Current multiprocess support shares device private data between primary and > secondaries but it is all dependent on a pointer initialized to the same > memory address by the multiprocess support code. If there is a per-process > data, If a secondary process changes it the primary gets affected, and the > same for additional secondaries which will affect not just the primary but > other previous secondaries. Yes, the field rte_eth_dev.data.dev_private is private to the device, but shared between processes. > The solution is to add support for this inside struct rte_eth_dev, > something like > > void *secondary_priv_data; > > so it is up to the secondaries to use this field if necessary. I would say it is not only for secondary process. What about this name: rte_eth_dev.process_private > NFP PMD creates the required rte_eth_devs specifically, similar to what is > done inside rte_ethdev.c but adding initialization for an interface needed > when calling device ethdev_init function. There are other PMDs doing this > but none has this requirement for per-process private data. Actually tap has a per-process requirement for its file descriptors. > Please, let me know what you think about this change to struct rte_ethdev > or if you have a better idea for solving this problem. I support the idea, but we need to agree on name bikeshedding :-)