From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ami Sabo Subject: [PATCH v2 0/3] Fix virtio-user multi-process crash. Date: Thu, 2 Mar 2017 09:51:21 +0200 Message-ID: <1488441084-6039-1-git-send-email-amis@radware.com> References: <1488102926-24158-2-git-send-email-amis@radware.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , Ami Sabo To: , Return-path: In-Reply-To: <1488102926-24158-2-git-send-email-amis@radware.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" 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