From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 157C4A04C3 for ; Tue, 26 Nov 2019 10:40:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 17B062A5D; Tue, 26 Nov 2019 10:40:43 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id D4231CF3 for ; Tue, 26 Nov 2019 10:40:41 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id z3so21563584wru.3 for ; Tue, 26 Nov 2019 01:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=HI59+hx0YkiJ6OVRJClKOJ0CyljC7xjytWzMEWl02hU=; b=gWzbC7e+Hg0vrm3jUoPaXw0OqfwepYPkKp0t2SHhiDKohitnnJ/c44+1tKtB+spNVE iPKRjkB423UttHgOsj7rDT2s3GlHOt81gCxR5H0bLzgzBwSV6R0bwGPExh/Rxgf6Rjn2 HcGq4+Q/uyKhi9mTMorZVVC6TDPjuSeqHTDbSKpEcK+sCmqLNh9MZU866X7XIaYYOf3Y OBWBpHAp0TRtZbTc34SH/Ugz7Y5jxlXhjMlAwful5rgNhnhi3QoSpNO9gLwr25PaVw/O an2b+ahHi8DZJ/wXw1scXfUfSyCqGJmjr6NVOHi6zo8aJOKLQKzD0hEHsULFSVFTU5jb n/CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=HI59+hx0YkiJ6OVRJClKOJ0CyljC7xjytWzMEWl02hU=; b=rgcJYmn3zbMh7DB99oJkwRRHSbSTei8sJiSILc5yTW5CtTzQ8I8lU5XvByXyGuycOB iAn2wiDEp4FCifJCzadCNCnVDfhhSVxFTIw4Mbo+u+hmYSF9RjmixU0U/B6M6iqTv3sJ 0FRR3ef5nGsaXx8wIqZCtOWgHTOobRS61IP/errbUjBUnRbmn9zXGR6nxhgdHJa/P8Cx /JCwGdhtXoVaRO2c6RVZKPgdZ7J4wp1J7s9vA9r/0AfegtA+F2zbDQpQX58M59BeUpwH US4N0wktbZlzXY1+CYqQWQ47jQCR3NHoE+Dt4P7aKiA9LLDHIAieGbUXaLbn9s5zVvzL 0GcQ== X-Gm-Message-State: APjAAAXzRex1UC8bWjVrR/IpZ9k9l/I2g57T/Qeg0N/Lr3KiNlgTF4VT 3HYeaYpoQ/+u1ZArjzfKDcZOqA== X-Google-Smtp-Source: APXvYqy7KKaqvTDUUMiOXgXI3O+O+CmzKFWA/bOxdUMA3tD57t4twGr23gNFpym84l+GRdrvJ41DUQ== X-Received: by 2002:adf:fd4a:: with SMTP id h10mr34253955wrs.90.1574761241482; Tue, 26 Nov 2019 01:40:41 -0800 (PST) Received: from bidouze.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id m25sm2274643wmi.46.2019.11.26.01.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 01:40:40 -0800 (PST) Date: Tue, 26 Nov 2019 10:40:39 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Gadre Nayan Cc: users@dpdk.org Message-ID: <20191126094039.GL28445@bidouze.6wind.com> References: <20191125152531.GK28445@bidouze.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-users] RTE_REGISTER_BUS X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" testpmd works with all DPDK devices, PCI included. Use GDB and break on businitfn_pci, main. Check that the PCI register function is called, and then the state of the bus list. You can also break on rte_bus_scan(). If you don't see the PCI bus anywhere, a possible explanation is that the bus is disabled in your build/.config file. Gaëtan On Tue, Nov 26, 2019 at 09:15:42AM +0530, Gadre Nayan wrote: > Hi, > > Thanks Rivet. > I was checking the testpmd application to test if my PMD is registered > on the PCI device list. > With the softnic pmd, rte_eal_init calls vdev_scan() > > But when I run testpmd with options: ./testpmd -l 0-3 -n 4 -- i > it again calls vdev_scan(). > Also only virtual device drivers are getting registered through > rte_vdev_register. > > I was expecting it to register rte_pci_register then call > rte_pci_scan() and then subsequently rte_pci_probe() > > Does testpmd work with PCI devices or only Vdevs. > I am trying to write my own PMD for a NIC on my laptop from Realtek. > > Thanks > Nayan > > On Mon, Nov 25, 2019 at 8:55 PM Gaëtan Rivet wrote: > > > > On Mon, Nov 25, 2019 at 08:13:00PM +0530, Gadre Nayan wrote: > > > Hi, > > > > > > I am trying to understand RTE_REGISTER_BUS for PCI Bus. > > > > > > 1. Load uio, igb_uio, bind the NIC with igb_uio. > > > 2. load the application. > > > > > > Step 1, is mostly about registering Drivers with the PCI bus. > > > I am looking at when does RTE_REGISTER_BUS get called in this process. > > > > > > Thanks > > > Nayan > > > > Hello, > > > > RTE_REGISTER_ functions all uses RTE_INIT_PRIO(n) macro. > > This macro will only add the GCC attribute __attribute__((constructor(n), used)) > > to the symbole defined with RTE_INIT_PRIO() (attribute supported by all > > major compiler). > > > > This attribute adds the related function to the .init section of the > > generated ELF. This section is executed before the main() of the > > program. > > > > This allows libraries to define init and cleanup code that is executed > > automatically when linking against the lib. > > > > -- > > Gaėtan Rivet > > 6WIND -- Gaëtan Rivet 6WIND