From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by dpdk.org (Postfix) with ESMTP id BF22B1B295 for ; Wed, 26 Sep 2018 15:49:11 +0200 (CEST) Received: by mail-ed1-f65.google.com with SMTP id k14-v6so1922474edr.13 for ; Wed, 26 Sep 2018 06:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ne+SN08t5frNvcSOxJUeNf78RrodLRdTpda7Cyn9JEU=; b=GjGLQrUvFF4PguUED4FDRq1EF2nD2WZL6HRYT/0rDOA92zq8XYqvL5nQfPcLSHzcEu /EoAi+lSnJpoC+brRzNbwRFuCEwZ19SVt+LhUcGmIdOPYnG5fG+IFZCpFJ2Jgz/h+huF +ty7MYZxHulLEmY0QyAY0PnFYV5cj2j35VXGSGyi4OKCwDRPuMrVgKkEOq5R0m3GdnKU bYnziLcuqPGlOJfqiNW2ZBD8D5scNIhfcYmPFYzNeZggbFl33zRsVp/tDpco6eiAOKyq gFuCu1LUG/Bp44h49wtM4e2gZYXtyQDdfDGhSr8RtL521fLMtWDHd4CYnSPmPyxQSQ+N OveQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ne+SN08t5frNvcSOxJUeNf78RrodLRdTpda7Cyn9JEU=; b=FNyS9YKyOx3B4ANXYX1SbWclJgFOFEnHITmXxe3ttbzfvdqmuGzsGBr5ZIIMAkJ9uz KmfhwJDhbhep9H92IvzWIgP67Q1hfvWjAOrobEVbLuLSPYcziv8TTqchPU5jPpgIfU+M 1XKwwgatsAg96DxNmWkFFnOYF21lY2+9NTm47GlGLTudX1FhD6YdM0/qQ34tiThwo9GN N6srTMu3wCTKBAs4gVn924mylsWmJV9P0TqBbm4QkxiN4zuC3AXQ8y3ZbeW5bx8esieL rzlnsKAxtausRP5P9OIpVF2zsyBZeAOXtXFJWqhEL+Qg0q/dxIMtCXbcFBPrXCI/rEWV wL4Q== X-Gm-Message-State: ABuFfohL64yMS0Z9clFi50lXuSjaDsUKR43+7mgcQ8sozrD1qZMZ1H6r eAVYisXLUg5q1iiMaFSHOlzHQdVaA6zriIOR/A6cKg== X-Google-Smtp-Source: ACcGV62MozfLQ0p0gCb2wF5mQC3kPEGbc0i/Re8gfEGRHPWF1sUlaLVQdmXGnRG/hUQMLfYYI2jDbiEHVaqlrKLr8us= X-Received: by 2002:a50:ef04:: with SMTP id m4-v6mr321433eds.136.1537969751514; Wed, 26 Sep 2018 06:49:11 -0700 (PDT) MIME-Version: 1.0 References: <2325089.6vXeJmFoYy@xps> In-Reply-To: <2325089.6vXeJmFoYy@xps> From: Alejandro Lucero Date: Wed, 26 Sep 2018 14:49:00 +0100 Message-ID: To: Thomas Monjalon Cc: dev , Ferruh Yigit , Andrew Rybchenko , "Burakov, Anatoly" , rasland@mellanox.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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:49:11 -0000 Yes, I agree. On Wed, Sep 26, 2018 at 2:21 PM Thomas Monjalon wrote: > 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 :-) > > >