From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id B65A9532D for ; Sun, 7 Feb 2016 08:48:43 +0100 (CET) Received: by mail-wm0-f41.google.com with SMTP id 128so119102810wmz.1 for ; Sat, 06 Feb 2016 23:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nNCYlrQu/ih4NWMF+KtQZ5cLRGnp/ql1d6E8QW7Yyvo=; b=04bbFYRnkmRk59WNvkLyoJn/rxdpEnlBabnidWtRreouh8yH/vAdIdV6YLZfdvnmfW JdFRlc8T2/EwsiqwIiJpJZWrpup9wR6lgJrZAGQZ9JXDXKKOn9rvE91mCMACB5KlUHMt m/K7NK+bLcY2gjJXrWeFZuggLu5YwiP0cAKOVsBiFKtjPyoe7xTrRjDEH9x5XjhvorZP IPe6KGqh57YHwyoGzWZyIx39HXe/Cet3ndN5C3ErCDdk8jjWkOxNHUFN0BaTG7nCAQYT AQ7wWzPw9LEbuMc8ORf++4RdZWSjPyqo2mrDwmrkNjn9/AiFbG43rghkRp2gNQObkPWR i7Xg== 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:in-reply-to :references; bh=nNCYlrQu/ih4NWMF+KtQZ5cLRGnp/ql1d6E8QW7Yyvo=; b=TKP9OS65YYwTC/nGA+UYzPcMm2TZ1NBIKeDNw6htAj5C0HbcihlNp2pmPR5wj+efo0 qFFZn6Z2iin6K5YKX3OwVMQUHIAH0+plH099MhdOCvOfU/YBFFqOvZ3X3kbvki1huTiu Awdf2Tml7xFa+f8k2SgKBlvGqpKjB8BOORKw7N4skgAWocIxylkx6aievtW8+4zqXGPU 5sP9LDjDq+9F1lxqNQJCTc6nbWgeEknfkOUmkC6VSl5PIV6fNR70ppihkme/sH040l8H ju4wT2a1CnZQaxZ50CWZ3pwcitXVZ22/OXTBDcf8i7k8hR+CQAkwpNIg6dhkPWohgSqP r1Gw== X-Gm-Message-State: AG10YOQ1pQ8+Y62Pdy/r5oaYt+VLKRs/OdNFwT82pKG8p+svQfvChl3QVlRo2/lg7DMwkTnI X-Received: by 10.28.131.134 with SMTP id f128mr25413190wmd.41.1454831323579; Sat, 06 Feb 2016 23:48:43 -0800 (PST) Received: from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net. [78.126.77.144]) by smtp.gmail.com with ESMTPSA id lw7sm23737165wjb.19.2016.02.06.23.48.41 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 06 Feb 2016 23:48:42 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Sun, 7 Feb 2016 08:48:33 +0100 Message-Id: <1454831317-4542-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454694945-18040-1-git-send-email-david.marchand@6wind.com> References: <1454694945-18040-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2 0/4] rework ioport access for virtio 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: Sun, 07 Feb 2016 07:48:43 -0000 Introduce a new pci ioport api in eal to mask all arch / kernel driver specifics. - rte_eal_pci_ioport_map is responsible for initialising an rte_pci_ioport object that is used in subsequent calls, this function must be tweaked per architecture and per kernel driver, - rte_eal_pci_ioport_read / rte_eal_pci_ioport_write uses a rte_pci_ioport object to read / write those resources, - rte_eal_pci_ioport_unmap releases resources used by a rte_pci_ioport object if necessary. There is still some more work to ensure intr handle are properly initialized and released when used in conjonction with rte_eal_map_device() api calls. BSD code has been neither run nor compiled, please can someone confirm I did not break too much stuff ? virtio legacy code has been updated accordingly. With this, virtio code should be ready for other archs now. So in the end, all that is missing on linux is some vfio update for support of all architectures that have vfio. Changes since v1: - dropped rte_ioport and removed the arch headers, if performance is an issue, we will see how to enhance this in later patches Regards, -- David Marchand David Marchand (4): virtio/bsd: fix typo virtio: fix incorrect check when mapping pci resources eal: introduce pci ioport api virtio: use pci ioport api drivers/net/virtio/virtio_pci.c | 343 ++++-------------------- drivers/net/virtio/virtio_pci.h | 38 +-- lib/librte_eal/bsdapp/eal/eal_pci.c | 135 ++++++++++ lib/librte_eal/bsdapp/eal/rte_eal_version.map | 4 + lib/librte_eal/common/include/rte_pci.h | 67 +++++ lib/librte_eal/linuxapp/eal/eal_pci.c | 170 ++++++++++++ lib/librte_eal/linuxapp/eal/eal_pci_init.h | 16 ++ lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 132 ++++++++- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 37 +++ lib/librte_eal/linuxapp/eal/rte_eal_version.map | 4 + 10 files changed, 619 insertions(+), 327 deletions(-) -- 1.9.1