From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by dpdk.org (Postfix) with ESMTP id E85082716 for ; Mon, 14 Dec 2015 14:00:42 +0100 (CET) Received: by pacwq6 with SMTP id wq6so103426267pac.1 for ; Mon, 14 Dec 2015 05:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=DJGWEM3EtvFiNeCohGtwBAooqfLXyOm2hUu1nkbrN+Y=; b=saNbwGHkhnAm78wFC+bp5hPLjDHVlusukBvGQiZVehKRT/TesAaO8DpX1u7O85wgqp N4eup2FU7My7lhflOV1GApZcznasa1ZtuRLdA/mnCo7BeUtvMe0TRTFWamo6NDSdEeeu NlbsbOmbO54AR6DGp4wZAynikFSeHuCJFwSZAPKuJDjtOo9qrqJdvvXpJyiV5Mr1LvG6 HK+ICOl1xgudX3P95SJv0RbV7P+ZHKvXJkmMvTMoUNOFwEY8V8c6gnvYfladRgT3+szO yxScsW0/xKr0x8rAGZXxaP2EExtFbx+U0AHAPYFzoonFkDyXVkZmLa5OH/hDKKFvNF6m NpbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DJGWEM3EtvFiNeCohGtwBAooqfLXyOm2hUu1nkbrN+Y=; b=h8w8fCwlQCjGBFaRvdDv7XaIZH62IXe3oOhmJfVFJxRLlKqeJZ0U4O4HqOeP0L3mzB K0g/xCDV8ITb8F39ODNni7dYz88rgmopy/qtKR3AFoBMkveJK4HTmFnTN+5NFODun3ji a8vsrUYuX5epLyZn6Qw0GxRh5bFYAxgrZVGgC8N6BXzShlg5Z67dFcmsYnbE/3wbPaFk 06OjH6HGjTqun1NV4T4EKioepaSepXC39HDY5ucgjdf4SJ2bkhQeJgEFHoPdq6stR0xF jwCn8nzbEB9JZNgi2u7XgdL/9e3rEmIt/Mw7NS0gTysNBL99vzCnrKTeFOL04l+GFrDq /Itw== X-Gm-Message-State: ALoCoQmXYQtthlI1UdVXHAiIKnrsEibtvWm6WlexqtIJmb2ybRuTuTA/L9bElk3ew9w29L120sIe3VFNcUioJ4+fAfaEq77Ciw== X-Received: by 10.67.23.226 with SMTP id id2mr23626505pad.149.1450098042365; Mon, 14 Dec 2015 05:00:42 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([110.172.16.5]) by smtp.gmail.com with ESMTPSA id 9sm42506405pfn.51.2015.12.14.05.00.39 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Dec 2015 05:00:41 -0800 (PST) From: Santosh Shukla To: dev@dpdk.org Date: Mon, 14 Dec 2015 18:30:19 +0530 Message-Id: <1450098032-21198-1-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 Subject: [dpdk-dev] [ [PATCH v2] 00/13] Add virtio support in arm/arm64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 13:00:43 -0000 This patch set add basic infrastrucure to run virtio-net-pci pmd driver for arm64/arm. Tested on ThunderX platfrom. Verified for existing dpdk(s) test applications like: - ovs-dpdk-vhost-user: across the VM's, for the use-cases like guest2guest and Host2Guest - testpmd application: Tested for max virtio-net-pci interface currently supported in kernel i.e. 31 interface. Builds successfully for armv7/v8/thunderX and x86_64/i686 platforms. Made sure that patch changes donot break for x86_64 case. Done similar tests for x86_64 too. Patch History: v2: - Removed ifdef arm.. clutter from igb_uio / virtio_ethedev files - Introduced rte_io.h header file in generic/ and arch specifics i.e.. for armv7 --> rte_io_32.h, for armv8 --> rte_io_64.h. - Removed RTE_ARCH_X86 ifdef clutter too and added rte_io.h header which nothing but wraps sys/io.h for x86_64 and i686 - Moved all the RTE_ARCH_ARM/64 dependancy for igb_uio case to separate header file named igbuio_ioport_misc.h. Now igb_uio.c will call only three function - igbuio_iomap - igbuio_ioport_register - igbuio_ioport_unregister - Moved ARM/64 specific definition to include/exec-env/rte_virt_ioport.h header - Included virtio_ioport.c/h; has all private and public api required to map iopci bar for non-x86 arch. Tested on thunderX and x86_64 both. Private api includes: - virtio_map_ioport - virtio_set_ioport_addr Public api includes: - virtio_ioport_init - virtio_ioport_unmap - Last patch is the miscllanious format specifier fix identifid for 64bit case during regression. v1: - First patch adds RTE_VIRTIO_INC_VECTOR config, much needed for archs like arm/arm64 as they don't support vectored implementation, also wont able to build. - Second patch is in-general fix for i686. - Third patch is to emulate x86-style of {in,out}[b,w,l] api support for armv7/v8. As virtio-net-pci pmd driver uses those apis for port rd/wr {b,w,l} - Fourth patch to enable VIRTIO_PMD feature in armv7/v8/thunderX config. - Fifth patch to disable iopl syscall, As arm/arm64 linux kernel doesn't support them. - Sixth patch introduces ioport memdevice called /dev/igb_ioport by which virtio pmd driver could able to rd/wr PCI_IOBAR. {applicable for arm/arm64 only, tested for arm64 as of now} Santosh Shukla (13): virtio: Introduce config RTE_VIRTIO_INC_VECTOR config: i686: set RTE_VIRTIO_INC_VECTOR=n rte_io: armv7/v8: Introduce api to emulate x86-style of PCI/ISA ioport access virtio_pci: use rte_io.h for non-x86 arch virtio: change io_base datatype from uint32_t to uint64_type config: armv7/v8: Enable RTE_LIBRTE_VIRTIO_PMD linuxapp: eal: arm: Always return 0 for rte_eal_iopl_init() rte_io: x86: Remove sys/io.h ifdef x86 clutter igb_uio: ioport: map iopci region for armv7/v8 include/exec-env: ioport: add rte_virt_ioport header file virtio_ioport: armv7/v8: mmap virtio iopci bar region virtio_ethdev: use virtio_ioport api at device init/close virtio_ethdev : fix format specifier error for 64bit addr case config/common_linuxapp | 1 + config/defconfig_arm-armv7a-linuxapp-gcc | 6 +- config/defconfig_arm64-armv8a-linuxapp-gcc | 6 +- config/defconfig_i686-native-linuxapp-gcc | 1 + config/defconfig_i686-native-linuxapp-icc | 1 + drivers/net/virtio/Makefile | 3 +- drivers/net/virtio/virtio_ethdev.c | 10 +- drivers/net/virtio/virtio_ioport.c | 163 ++++++++++++++++++++ drivers/net/virtio/virtio_ioport.h | 42 +++++ drivers/net/virtio/virtio_pci.h | 6 +- drivers/net/virtio/virtio_rxtx.c | 7 + lib/librte_eal/common/Makefile | 1 + lib/librte_eal/common/include/arch/arm/rte_io.h | 60 +++++++ lib/librte_eal/common/include/arch/arm/rte_io_32.h | 155 +++++++++++++++++++ lib/librte_eal/common/include/arch/arm/rte_io_64.h | 155 +++++++++++++++++++ lib/librte_eal/common/include/arch/x86/rte_io.h | 42 +++++ lib/librte_eal/common/include/generic/rte_io.h | 81 ++++++++++ lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal.c | 7 +- .../eal/include/exec-env/rte_virt_ioport.h | 81 ++++++++++ lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 8 +- .../linuxapp/igb_uio/igbuio_ioport_misc.h | 133 ++++++++++++++++ 22 files changed, 957 insertions(+), 14 deletions(-) create mode 100644 drivers/net/virtio/virtio_ioport.c create mode 100644 drivers/net/virtio/virtio_ioport.h create mode 100644 lib/librte_eal/common/include/arch/arm/rte_io.h create mode 100644 lib/librte_eal/common/include/arch/arm/rte_io_32.h create mode 100644 lib/librte_eal/common/include/arch/arm/rte_io_64.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_io.h create mode 100644 lib/librte_eal/common/include/generic/rte_io.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_virt_ioport.h create mode 100644 lib/librte_eal/linuxapp/igb_uio/igbuio_ioport_misc.h -- 1.7.9.5