From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.radware.com (mailout1.radwarecloud.com [192.115.180.130]) by dpdk.org (Postfix) with ESMTP id 9E0782B94; Thu, 2 Mar 2017 08:51:28 +0100 (CET) Received: from localhost.localdomain (176.200.121.200) by ILCAS1.corp.radware.com (176.200.120.121) with Microsoft SMTP Server id 14.3.319.2; Thu, 2 Mar 2017 09:51:26 +0200 From: Ami Sabo To: , CC: , , Ami Sabo Date: Thu, 2 Mar 2017 09:51:21 +0200 Message-ID: <1488441084-6039-1-git-send-email-amis@radware.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488102926-24158-2-git-send-email-amis@radware.com> References: <1488102926-24158-2-git-send-email-amis@radware.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.100.1062-22916.005 X-TM-AS-Result: No-0.443500-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Subject: [dpdk-stable] [PATCH v2 0/3] Fix virtio-user multi-process crash. X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 07:51:29 -0000 The patchset fixes secondary process crash issue when it tries to access virtio-user pmd (e.g. via rte_eth_rx_burst). The crash happens because the secondary process calls, at virtio_user_pmd_probe() to virtio_user_eth_dev_alloc()-> rte_eth_dev_allocate() instead of eth_dev_attach_secondary(), as it's done from rte_eth_dev_pci_probe. Therefore, the device is not properly initialized + the device data maybe overridden by the secondary process. The patchset contains 3 patches: 1. Export rte_eth_dev_attach_secondary, so non-pci drivers will be allowed to call it. 2. Fix the actual bug by calling the function during virtio_user probe. 3. Code style fixes following Yuanhan Lio's comments. Ami Sabo (3): lib/librte_ether: export secondary attach function net/virtio-user: fix multi-process issue lib/librte_ether: fix code style issues drivers/net/virtio/virtio_user_ethdev.c | 26 ++++++++++++++++---------- lib/librte_ether/rte_ethdev.c | 6 +++--- lib/librte_ether/rte_ethdev.h | 13 +++++++++++++ lib/librte_ether/rte_ether_version.map | 7 +++++++ 4 files changed, 39 insertions(+), 13 deletions(-) -- v2: * Fix code style issues following Yuanhan Liu's review. -- 2.7.4