From patchwork Wed Mar 4 21:50:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 3851 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8F1CD5AA0; Wed, 4 Mar 2015 22:50:20 +0100 (CET) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by dpdk.org (Postfix) with ESMTP id 234B35A9B for ; Wed, 4 Mar 2015 22:50:19 +0100 (CET) Received: by wesu56 with SMTP id u56so49166682wes.10 for ; Wed, 04 Mar 2015 13:50:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=NhQzBzJ/RMhZCnt74whrR0xzxnetgJT8sjthFDen6fY=; b=cbT+AXORVl8qsRKtGmQD/oxinUKrVlHXiG+QMH4RWlRjXghJv/P4YOECgyeZpLcyp7 oK84tKk9KB9iZFJckqKIwunujUGnei1npLyg4e6RBPbu+RjcdwGSZxIaE/kRjOjF+QEZ j3rxuN5QT5Olk6s0uRHhziW0dsXo2UZXNkj9+UduM+bZ/qKjeqQbv5cHpZviGv1apSGr KinHbdqA10pz5SzrKo1hNDmMSRHuNBTj6/TxapVnKpwUwhsYSQ7fCn1YzVbryB81sZWM m0R7LWK6dZnEi/6q7MlsOd88jrN+K+3re/gnDFsIXJZvTbt6IsXWlbnnCDmsAWgm/hDY /S5g== X-Gm-Message-State: ALoCoQl99YZPTirm9kHl2gpnalMtzD3RlgTaeLlF9BJoQ3g6svpqMrjN2lPqgYgvuGOELL4jajzd X-Received: by 10.194.9.98 with SMTP id y2mr12403617wja.85.1425505819022; Wed, 04 Mar 2015 13:50:19 -0800 (PST) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id bf8sm6037947wjb.37.2015.03.04.13.50.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 13:50:18 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Wed, 4 Mar 2015 22:50:02 +0100 Message-Id: <1425505810-9269-3-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1425505810-9269-1-git-send-email-david.marchand@6wind.com> References: <1425505810-9269-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 02/10] pci: use lookup tailq api 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is no reason why we should use the "reserve" tailq api, since the pci entry is already statically reserved. Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index e692b35..4d2fbbb 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -493,7 +493,7 @@ rte_eal_pci_init(void) { TAILQ_INIT(&pci_driver_list); TAILQ_INIT(&pci_device_list); - uio_res_list = RTE_TAILQ_RESERVE_BY_IDX(RTE_TAILQ_PCI, uio_res_list); + uio_res_list = RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_PCI, uio_res_list); /* for debug purposes, PCI can be disabled */ if (internal_config.no_pci) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 6d4932d..8f44f09 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -766,8 +766,8 @@ rte_eal_pci_init(void) { TAILQ_INIT(&pci_driver_list); TAILQ_INIT(&pci_device_list); - pci_res_list = RTE_TAILQ_RESERVE_BY_IDX(RTE_TAILQ_PCI, - mapped_pci_res_list); + pci_res_list = RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_PCI, + mapped_pci_res_list); /* for debug purposes, PCI can be disabled */ if (internal_config.no_pci)