From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) by dpdk.org (Postfix) with ESMTP id 3BE2DC166 for ; Wed, 17 Feb 2016 12:17:08 +0100 (CET) Received: by mail-io0-f170.google.com with SMTP id g203so33173444iof.2 for ; Wed, 17 Feb 2016 03:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nofutznetworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=7R4Vu5XoY4Ax0Ykd8FtQTY3S1CBX1Exf3K5CZ/PB8/4=; b=hgJLuOCc4a0tLn0hCTybHTG0xOZ1+CrqLcWQk8hBHyZM1k7LqlkTphwIDe885TBPxn GV81gxPDn9gCgFPv794WQmwEOxHhvQdJcVmX1F+LlZxfKptFaB8bzoUAN2ehJ70EyngL 2zh8gLyCDWPyRLEfAWLsbArgu2LP1hbH1ejfHfHHk3T6aLBJ1atw1pPsaTxWJm9CJjYj 9Ys3RW/5uq3K4DCdc/Cc4ynEDdeJdOWSyssgF0gsodoHHL1uyyPCV5xcPPh7f4n0vRgB OUMDnHwrBiJyfMCqvZqHZrL55Tyv/XpOhcv3v4F+8OY3eFtBgFrAQHFuk13o4xfB7RSl 283w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=7R4Vu5XoY4Ax0Ykd8FtQTY3S1CBX1Exf3K5CZ/PB8/4=; b=U0lNz/NnmD5FdZcXduUdHFcAdiC7IyoufQjZxNSwPxbi3OEbmSckvBmgNmZQyt0RME M7gVL/dPSyND3tzIXUl7CLserFKML8zyydvo41QWFIe97qtVjvTjNFCBNB1Rv3c+1eOs np/6qOO1AdFeHVP4EFKn7ZEqIggL+xqdUdbo79fZRaPRHq1O/J1T1Oadm8UVcvO/A4e7 oQJbmyq7its+LVzr7+eIJ+SIbnrNHSGyiDnb22Z71r3q1lElZt7Y/RvQmGbEoUg2DkkK F9mFtDI94mkGRxHDTXjZuzXxz2Br8ZwePRdY5HG/kzY9WJBE1Sb4QGBzcGxM0hzCcgQn 5Ekg== X-Gm-Message-State: AG10YORMPYFz+3EYRSTm3+cXGc6s1ZZZnUJNQZnfVsHjEucj2JcSTS0yM4I5cALTg4KFjwrPQi0H8BDdpAcR5w== MIME-Version: 1.0 X-Received: by 10.107.130.167 with SMTP id m39mr3266915ioi.77.1455707827707; Wed, 17 Feb 2016 03:17:07 -0800 (PST) Received: by 10.107.3.75 with HTTP; Wed, 17 Feb 2016 03:17:07 -0800 (PST) Date: Wed, 17 Feb 2016 13:17:07 +0200 Message-ID: From: Lazaros Koromilas To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Attaching to an ethernet port from a secondary process X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2016 11:17:09 -0000 Hi all, I'm trying to take advantage of the multi-process support together with the port hotplugging framework. The idea is that my primary process will configure all ports I'm going to need and then secondary processes will come up, selectively attach to ports and perform rx/tx. I succeed up to the point that I attach to the pre-configured ports but the rx/tx queue descriptors are uninitialized, so I get a segfault there. This can be reproduced with the attached, slightly modified examples/skeleton/basicfwd.c sdk app. I run this as follows: sudo ./build/basicfwd -l0 -n2 --proc-type=primary --vdev eth_pcap0,rx_pcap=pcap0-in.pcap,tx_pcap=pcap0-out.pcap --vdev eth_pcap1,rx_pcap=pcap1-in.pcap,tx_pcap=pcap1-out.pcap sudo ./build/basicfwd -l2 -n2 --proc-type=secondary eth_pcap0,rx_pcap=pcap0-in.pcap,tx_pcap=pcap0-out.pcap eth_pcap1,rx_pcap=pcap1-in.pcap,tx_pcap=pcap1-out.pcap Where pcap{0,1}-in.pcap files are pcap dumps. The primary will initialize the ports and pause(2). The secondary will attach to the same ports and do work. The latter then segfaults in rte_eth_rx_burst() with dev->data->{rx,tx}_queues being NULL pointers. All privileged operations are done from the primary. As far as I can tell, these are all functions in librte_ether that need to run in a primary process: grep -B12 PROC_PRIMARY_ rte_ethdev.c | grep '^rte_eth' | sed 's/(.*//' rte_eth_dev_rx_queue_start rte_eth_dev_rx_queue_stop rte_eth_dev_tx_queue_start rte_eth_dev_tx_queue_stop rte_eth_dev_configure rte_eth_dev_start rte_eth_dev_stop rte_eth_dev_set_link_up rte_eth_dev_set_link_down rte_eth_dev_close rte_eth_rx_queue_setup rte_eth_tx_queue_setup Any hints are much appreciated. Thanks! Lazaros.