From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 2/2] net/tap: add queues when attaching from secondary process Date: Tue, 02 Oct 2018 12:43:42 +0200 Message-ID: <1910504.ryvcqbe86A@xps> References: <1538047196-13789-2-git-send-email-rasland@mellanox.com> <1538476438-20891-1-git-send-email-rasland@mellanox.com> <1538476438-20891-2-git-send-email-rasland@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "keith.wiles@intel.com" , Shahaf Shuler , Ori Kam To: Raslan Darawsheh Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 33E2F2BE3 for ; Tue, 2 Oct 2018 12:43:45 +0200 (CEST) In-Reply-To: <1538476438-20891-2-git-send-email-rasland@mellanox.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" 02/10/2018 12:34, Raslan Darawsheh: > --- a/doc/guides/rel_notes/release_18_11.rst > +++ b/doc/guides/rel_notes/release_18_11.rst > @@ -67,6 +67,10 @@ New Features > SR-IOV option in Hyper-V and Azure. This is an alternative to the previous > vdev_netvsc, tap, and failsafe drivers combination. > > +* **Added TAP Rx/Tx queues sharing with a secondary process.** > + > + A secondary process can attach a TAP device created in the primary process, > + probe the queues, and process Rx/Tx in a secondary process. A blank line is missing here. > @@ -2006,9 +2115,23 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev) > TAP_LOG(ERR, "Failed to probe %s", name); > return -1; > } > - /* TODO: request info from primary to set up Rx and Tx */ > eth_dev->dev_ops = &ops; > eth_dev->device = &dev->device; > + eth_dev->rx_pkt_burst = pmd_rx_burst; > + eth_dev->tx_pkt_burst = pmd_tx_burst; > + if (!rte_eal_primary_proc_alive(NULL)) { > + TAP_LOG(ERR, "Primary process is missing"); > + return -1; > + } > + process_private = (struct pmd_process_private *) > + rte_zmalloc_socket(name, > + sizeof(struct pmd_process_private), > + RTE_CACHE_LINE_SIZE, > + eth_dev->device->numa_node); > + > + ret = tap_mp_attach_queues(name, eth_dev); > + if (ret != 0) > + return -1; > rte_eth_dev_probing_finish(eth_dev); > return 0; > } Should we manage rte_pmd_tun_probe too?