From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] ethdev: add field for device data per process Date: Wed, 03 Oct 2018 22:44:13 +0200 Message-ID: <256449070.EJcjglVyyx@xps> References: <1538047596-23954-1-git-send-email-alejandro.lucero@netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, rasland@mellanox.com To: Alejandro Lucero , ferruh.yigit@intel.com, arybchenko@solarflare.com Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 035061B441 for ; Wed, 3 Oct 2018 22:44:15 +0200 (CEST) In-Reply-To: <1538047596-23954-1-git-send-email-alejandro.lucero@netronome.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" + Cc more people 27/09/2018 13:26, Alejandro Lucero: > Primary and secondary processes share a per-device private data. With > current design it is not possible to have data per-device per-process. > This is required for handling properly the CPP interface inside the NFP > PMD with multiprocess support. > > There is also at least another PMD driver, tap, with similar > requirements for per-process device data. Yes, it is required to fix tap PMD for multi-process usage. I am in favor of accepting this change in 18.11. [...] > @@ -539,7 +539,13 @@ struct rte_eth_dev { > eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */ > eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */ > eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */ > - struct rte_eth_dev_data *data; /**< Pointer to device data */ > + /** > + * Next two fields are per-device data but *data is shared between All fields in rte_eth_dev are per-device. > + * primary and secondary processes and *process_private is per-process > + * private. > + */ > + struct rte_eth_dev_data *data; /**< Pointer to device data. */ > + void *process_private; /**< Pointer to per-process device data. */ We could explain here that this memory is allocated by the PMD.