From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 25E1BC1C6 for ; Tue, 16 Feb 2016 21:37:12 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id a4so118020189wme.1 for ; Tue, 16 Feb 2016 12:37:12 -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=f3RHoYKuCNysEcK+5oKqBD7ijp/bjd7VkAxjtc2+r+U=; b=SHkhlpqdaL8f7WyTYPshNSIpXJ18RiTqt4Rn3IuXuFlWa2GK7AR2sBFt6Um6hl08qk y2UY0dz7r3hedej18H/HM7b0hvfagB+nWJIVXOpLZ1n7tQu32jc2AXY1FiaU82LWCiyh H69E5ZaLToCtCICwBE25wFmoPFtOHTg7r3arTVA3DFSJ3G30zmO7jIKY6hqSHCkCTUaW Xm6PlfQsZlIUO3+Jb7YLdyDlF2BAXkHlgmyT8s9kJY5+eJUHicSx+SQkW4MnBmXeVHHw DOPeCRgyvhUtYWiouGkKJa7wJQiHc/hEgulwZcjXZw92hU/beGkueLTRNe6d/kuJD16k /IYA== 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=f3RHoYKuCNysEcK+5oKqBD7ijp/bjd7VkAxjtc2+r+U=; b=Hy8OtXbu+xpv5FU/kLLuVhwZixo+rGxSUz+jymuU6vzptrCZtdDeY+aQZpBJtwYQUu gzKJZBTJYpvGSu0Nj+8Ruo73DY47ztucPsGPmNyMl++Lm5zGonOkg59YMrbFC24mFtVY rQ+SrNoCJ45XzcD+9vLC/H3+3z7b55tx4Hqj5SknJjLXPswqMwVkPGOur+tTfCTPWba/ ugaOAgtzjW8/1sa//0R5w4i7/2DYJKPNHQAA7wlq5uq1Z3iNNC/sILjK9lKAWAjKd8+d LGIg9hGl1TkGovI9KtwXrxiL52mvdxRlJCzQi58MQPX9h5QXzmyldkM6LObTHKqhac07 65sA== X-Gm-Message-State: AG10YOShogHsQyzeYvy31dZ/ef+d5Ivqmas+xqxwSR9cti4xtQSiP7OR7DwvyPhS1rEA2Vuj X-Received: by 10.194.24.39 with SMTP id r7mr23417118wjf.86.1455655031921; Tue, 16 Feb 2016 12:37:11 -0800 (PST) Received: from gloops.dev.6wind.com (guy78-1-82-235-116-147.fbx.proxad.net. [82.235.116.147]) by smtp.gmail.com with ESMTPSA id lc3sm31813646wjb.7.2016.02.16.12.37.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 16 Feb 2016 12:37:11 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Tue, 16 Feb 2016 21:37:00 +0100 Message-Id: <1455655024-5164-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455542666-28895-1-git-send-email-david.marchand@6wind.com> References: <1455542666-28895-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v4 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: Tue, 16 Feb 2016 20:37:12 -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 v3: - rebased on HEAD - renamed "offset" field in rte_pci_ioport structure as "base" Changes since v2: - rebased on HEAD - fixed a remaining reference to rte_ioport_t in comment - fixed virtio driver for bsd 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 | 358 ++++-------------------- 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 | 65 +++++ 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, 620 insertions(+), 339 deletions(-) -- 1.9.1