From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id 9598F5A26 for ; Fri, 1 Jan 2016 22:06:52 +0100 (CET) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so2.wedos.net (Postfix) with ESMTPSA id 3pXJnS08fhzTD; Fri, 1 Jan 2016 22:06:51 +0100 (CET) From: Jan Viktorin To: dev@dpdk.org Date: Fri, 1 Jan 2016 22:05:19 +0100 Message-Id: <1451682326-5834-1-git-send-email-viktorin@rehivetech.com> X-Mailer: git-send-email 2.6.3 Cc: Jan Viktorin Subject: [dpdk-dev] [RFC 0/7] Support non-PCI devices 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: Fri, 01 Jan 2016 21:06:52 -0000 Hello DPDK community, I am proposing an RFC patch series that tries to add support for non-PCI devices into DPDK. At the moment, the only way how to support such devices is to utilize the virtual devices. As there are SoCs with integrated Ethernet MACs (and other devices) that can be controled by DPDK, such infrastructure can be helpful to write PMD for them. This is mostly the case of ARM SoCs. The ARMv7 SoCs have always an integrated EMAC (if any), the ARM+FPGA provides ways how to put a custom EMACs into the SoC, and for ARM 64 there is the X-Gene board with integrated 10G EMACs. The patch set contains a simple self-test showing that this approach works. It is possible to test it on any platform as it provides a fake sysfs and device tree hierarchy. I am introducing the pair rte_soc_device + rte_soc_driver and the probing code for Linux. It is based on searching the /sys/bus/platform/devices and the device-tree (for PMDs). No testing PMD is provided, just a simple test case in app/test/test_soc.c. I am unsure about the naming - rte_soc_*, however, it's the best one I've devised so far. I am aware of several code-issues and missing comments and moreover, there is some infrastructure copied from the PCI code base. I will fix those in future versions of the patch set if it is approved to the upstream. I'd be happy to get some suggestions how to refactor the common code out from the PCI infra. I am unaware of any other attempt to extend DPDK in this way so if there is some work similar to this, I'd like to have a look at it. Please, consider one important thing. There is no Linux Kernel driver that is suitable for this kind of devices. Such driver must be PCI-independent, must (should?) support no-IOMMU access to the device, must provide access to the device memory specified in the device-tree's reg property, must give a way how to perform DMA transfers, should be able to deliver interrupts, etc. See the commits for more details... Happy New Year! Regards Jan Viktorin Jan Viktorin (7): eal/common: define rte_soc_* related common interface eal: introduce --no-soc option eal: add common part of the SoC infra eal/linuxapp: support SoC infra in linuxapp eal: init SoC infra on rte_eal_init eal/soc: make SoC infra testable on any platform app/test: add SoC infra probe/detach test app/test/Makefile | 3 + app/test/soc_test_init.sh | 61 +++++ app/test/test_soc.c | 249 +++++++++++++++++ lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/eal_common_devargs.c | 6 + lib/librte_eal/common/eal_common_options.c | 5 + lib/librte_eal/common/eal_common_soc.c | 367 +++++++++++++++++++++++++ lib/librte_eal/common/eal_internal_cfg.h | 1 + lib/librte_eal/common/eal_options.h | 2 + lib/librte_eal/common/eal_private.h | 12 + lib/librte_eal/common/include/rte_devargs.h | 7 + lib/librte_eal/common/include/rte_soc.h | 212 ++++++++++++++ lib/librte_eal/linuxapp/eal/Makefile | 3 + lib/librte_eal/linuxapp/eal/eal.c | 4 + lib/librte_eal/linuxapp/eal/eal_soc.c | 409 ++++++++++++++++++++++++++++ 15 files changed, 1342 insertions(+), 1 deletion(-) create mode 100755 app/test/soc_test_init.sh create mode 100644 app/test/test_soc.c create mode 100644 lib/librte_eal/common/eal_common_soc.c create mode 100644 lib/librte_eal/common/include/rte_soc.h create mode 100644 lib/librte_eal/linuxapp/eal/eal_soc.c -- 2.6.3