From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by dpdk.org (Postfix) with ESMTP id C053E9A9A for ; Thu, 12 Mar 2015 11:18:27 +0100 (CET) Received: by padet14 with SMTP id et14so19486877pad.0 for ; Thu, 12 Mar 2015 03:18:27 -0700 (PDT) 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=gNtsLnIsnJrMwwe5n3OLlxbOMsHZzLQWGOO0oz6zrhY=; b=OcARbmepuBkxXP34N6NnCjFmxapjtwBMMAGewpzG3G7sv8frsWqIoMq1HA2X+lXZcK n/roUpFK51HDqjGsEALTa/yc+0UuMAqS3et5ntmYSIiheyFPE7rEIPy4l2TmLPQbor2v k7/52fuAoe92FDI7mqeazAlyN1VJ+6saGGxQoVkQ23VrWpBGTI8SPgu9m/P2Upo7wg6Z DJ8ZdtFQWofj+MXyWQ/HunwUH2eWRvHUmHAJLMMSewfqnDEDyFhnBFfKTBzqXCakdTGw hDXAzrEwFQ5qatZkRn0sPuywRrSPBgvz1VeQihuMIyCRUShcqgu0tecoWFWW+6HUo5Sp KZiA== X-Gm-Message-State: ALoCoQmj4mgZiQmjVS7pUTUfOWcMgXq47Hn5yFuoophKdvtZ2lNqGTA1tYcv0nnHsph8kIVCpUG7 X-Received: by 10.66.164.98 with SMTP id yp2mr13943309pab.114.1426155507188; Thu, 12 Mar 2015 03:18:27 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id z4sm10080331pdi.90.2015.03.12.03.18.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Mar 2015 03:18:26 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Thu, 12 Mar 2015 19:17:44 +0900 Message-Id: <1426155474-1596-6-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426155474-1596-1-git-send-email-mukawa@igel.co.jp> References: <1425438703-18895-1-git-send-email-mukawa@igel.co.jp> <1426155474-1596-1-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v2 05/15] eal/bsdapp: Change names of pci related data structure 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: Thu, 12 Mar 2015 10:18:28 -0000 To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Also, add 'path' variable to pci_map of bsdapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index cbd0a4e..7fcb15d 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -83,8 +83,9 @@ * enabling bus master. */ -struct uio_map { +struct pci_map { void *addr; + char *path; uint64_t offset; uint64_t size; uint64_t phaddr; @@ -94,16 +95,16 @@ struct uio_map { * For multi-process we need to reproduce all PCI mappings in secondary * processes, so save them in a tailq. */ -struct uio_resource { - TAILQ_ENTRY(uio_resource) next; +struct mapped_pci_resource { + TAILQ_ENTRY(mapped_pci_resource) next; struct rte_pci_addr pci_addr; char path[PATH_MAX]; size_t nb_maps; - struct uio_map maps[PCI_MAX_RESOURCE]; + struct pci_map maps[PCI_MAX_RESOURCE]; }; -TAILQ_HEAD(uio_res_list, uio_resource); +TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource); static struct rte_tailq_elem rte_uio_tailq = { .name = "UIO_RESOURCE_LIST", @@ -163,9 +164,9 @@ static int pci_uio_map_secondary(struct rte_pci_device *dev) { size_t i; - struct uio_resource *uio_res; - struct uio_res_list *uio_res_list = - RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list); + struct mapped_pci_resource *uio_res; + struct mapped_pci_res_list *uio_res_list = + RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list); TAILQ_FOREACH(uio_res, uio_res_list, next) { @@ -202,10 +203,10 @@ pci_uio_map_resource(struct rte_pci_device *dev) uint64_t offset; uint64_t pagesz; struct rte_pci_addr *loc = &dev->addr; - struct uio_resource *uio_res; - struct uio_res_list *uio_res_list = - RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list); - struct uio_map *maps; + struct mapped_pci_resource *uio_res; + struct mapped_pci_res_list *uio_res_list = + RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list); + struct pci_map *maps; dev->intr_handle.fd = -1; dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; -- 1.9.1