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 91A45A04C7 for ; Tue, 26 Nov 2019 04:45:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E125E2A5D; Tue, 26 Nov 2019 04:45:09 +0100 (CET) Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by dpdk.org (Postfix) with ESMTP id 865B2A3 for ; Tue, 26 Nov 2019 04:45:08 +0100 (CET) Received: by mail-vk1-f193.google.com with SMTP id k19so4058879vke.10 for ; Mon, 25 Nov 2019 19:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=FA0lQu+F+F6MpMBfZgOFWVFSz6zQw0EhE28jWTBz6iw=; b=UcYoJkIE6CD0nW64/Gf3Xfn4QccfsDkgLkoRJyqCPxTZzKukoKxQKFQlazdPkT7gou by7WWuOFAS5MEYT+PBejspulzbPi4tjtq6Ia5irrMmvaDGcwyYz+gOCF4S5JDwXZe9Uj aa1gj1wI6naE/nlhpTB1hmBtPFT826gWuAnG0zakAOD0N8LPvwvkBbStbgw5xA0uJAI7 6s6hsogwZlpqHkx5bGPpSsmtWpi5uX86qcULz+Oc60Ien5f9Awkd0HO3uDVj9zLvrjqX kDxvrvqyt+VkF760FlFyL6XuN8/VNdG+4iWwcDn7RA0DJnofRRGQVuoq0U/t1rgcIPH5 NRUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FA0lQu+F+F6MpMBfZgOFWVFSz6zQw0EhE28jWTBz6iw=; b=NbMP9LqASVS3uzHFrOEUucnnkDC+nCs1HXeYSrm+TTGR1nkJy4qzKcfMAps3+z28eP 01r1d+cmJaxfMv67caHmkLrHbS02ysDNyI/6+wAfwz8fAtJDfAQTqKe1pI5mE5EmMPZi 42FW098GxYaYGtz/SLZKvOpfuGfORp3yx/071aqsXFrZR3KfY6QbPvZz35NCPDtOYG6D lzr5YbTl8mL+PmWjwS7tNUylMNrqu4dIj4anGCTjiEI/4r+cJF60Xgi7g+f3BoFkUDUp S5ZqA09hxUE7bsLOhl77XWRoB+oge97AHirGTo+cZrxUvV9Hd3O+bJ6KQpxeSC2ePeF7 SQCg== X-Gm-Message-State: APjAAAVFzjh/6iqJyNq+8jGPy3m6b8/ukXLk6YPXAwn0JmG6KAz9yjTj ostCpH5QkqTlYw7sm4VFvuyLU8A9Ju3olbmqTIEBegXJ X-Google-Smtp-Source: APXvYqy1dmIb1ogleUjDL7VJE617sNcBhgBPxTgSdsT5Ud1qTLIqNq0zOx4W5oJYFUkRaOhr2Fw9mlnb7p5f2vIbmRU= X-Received: by 2002:a1f:e243:: with SMTP id z64mr19765863vkg.56.1574739907793; Mon, 25 Nov 2019 19:45:07 -0800 (PST) MIME-Version: 1.0 References: <20191125152531.GK28445@bidouze.6wind.com> In-Reply-To: <20191125152531.GK28445@bidouze.6wind.com> From: Gadre Nayan Date: Tue, 26 Nov 2019 09:15:42 +0530 Message-ID: To: =?UTF-8?Q?Ga=C3=ABtan_Rivet?= Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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" 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=C3=ABtan 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=C4=97tan Rivet > 6WIND