From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=nEvxEHmgJfg2svO9wg1suKBz8Jj14C/ndQPcDhh1kNc=; b=NCAZw4bagYyyynxEYz20SUweQla+ifv477FSLrjV5YOvAWxbNOlEfNYaqFNV5M9FZ3 62hx4RABSe745xC7k9g/bmkeSk0uEvkKUnKcGJzhpwqt61l/hcn3Xvy/9pWhfGyxBCYA /JqDTmImldH0+AMEDtTBnafGUNZf+CuuLW/9O0KDRULV6Axd2ulHU0/5UpMQRwVqhUst pyuSohNBMaXqHzvtZh6A8cGD5VYNu5P/GtstdBVC80kCaphzGUyq25YFUKpA5lkpcEe5 xaouSeJMWATJfZuLkiWhXpVLTmPrfr6Q5i9evJWcStY8I/mx9wAvCv0JndVmf0jFhnYP lXCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nEvxEHmgJfg2svO9wg1suKBz8Jj14C/ndQPcDhh1kNc=; b=Ed6md5FsGR6B/y/DnPLo3Qzm5nYAsTio9cdEJ1UUc7bQxmYjVC32Y7GYYbtj9IsPh9 lX2GFoB2ZwN8cMHlqpT0F3LFgMaXAe26MHMOlSikByYgnhLOXdlDUUcKzkRaP96Du9LI Sh63rURZ8uc8mrG2hoWF44FcaNw2ZknhrvpvFvREnJJx1QGtXVoapr82omiedE3NGm+5 jMMtKZudLbmVfVzex+i8BwDS5a/MnjbbppSH4PllH3KkPS3/v/NnpziFnY97LcsBUrAY RWSlc+X3VEEqZsfbrmXdys3xI4O76Kyc9hwUpy2CzuQ+kDdDwWUpDUbTT/XQbWQQ1tAA Eirg== X-Gm-Message-State: ABuFfohpxLbKqbi85l9ZwvW2HSOSaKzwyvHeX/ZOM0j+QdzXokyNT4aL Z4mmpK8eN0mbIOPTEXgli49MdQdeNo1wZBbePu7Jn1S4 X-Google-Smtp-Source: ACcGV61wy3sik7kC9TLsTbad7sPWjcDEIlCtsfFrfDJu+IXfrzvUQIbFWtNZ1y86t63Ygw+yoe+PFFeZdnOEvBhSPXk= X-Received: by 2002:a50:8f66:: with SMTP id 93-v6mr1535101edy.248.1537884664263; Tue, 25 Sep 2018 07:11:04 -0700 (PDT) MIME-Version: 1.0 From: Alejandro Lucero Date: Tue, 25 Sep 2018 15:10:53 +0100 Message-ID: To: dev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , "Burakov, Anatoly" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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: Tue, 25 Sep 2018 14:11:04 -0000 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