From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alejandro Lucero Subject: secondary processes and private data Date: Tue, 25 Sep 2018 15:10:53 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To: dev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , "Burakov, Anatoly" Return-path: Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by dpdk.org (Postfix) with ESMTP id C74EA1B108 for ; Tue, 25 Sep 2018 16:11:04 +0200 (CEST) Received: by mail-ed1-f45.google.com with SMTP id g26-v6so6326653edp.0 for ; Tue, 25 Sep 2018 07:11:04 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I've a problem when part of device private data needs to be private per process. 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. 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. 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. 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. Thanks