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 AFB83A04C2 for ; Mon, 25 Nov 2019 16:25:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6B3BD28EE; Mon, 25 Nov 2019 16:25:35 +0100 (CET) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by dpdk.org (Postfix) with ESMTP id 87628A3 for ; Mon, 25 Nov 2019 16:25:34 +0100 (CET) Received: by mail-wr1-f47.google.com with SMTP id z3so18555183wru.3 for ; Mon, 25 Nov 2019 07:25:34 -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=8bMHMIfQW1zNPgt4RCTR0rH+iuJZ9E3sV/p+MrByrJM=; b=WRlsy51SUFwjr3kDFsYbl3L2HDxnC76Oc2O4XFnf/ipwUlxykLwhpPWlNGPb8xwq7E gBBEibgY2ZEvrn8MXgyDjuapb8d8tfRAqrk72GdGOErz8z52HTwYn5B6CGcjGonziM8I /L6QDnsfT4PcSIEkvIImDlJ3FaDugNY336NrAElmV8p9QJlY/s7Lwc8lUdj7G5pJk5x1 jbTJvlgk9Chn7RGlXsBC8s3T4BwfRdB3XHiqZcvPS3oJenc4spd37/bGH/CmXbeT2qnI S4Q1cxlCYvFFzb+vxIUrF32PiLo8mqBXVx5SYyf4noc9NRSwZr9uITnF9xXr0r+c8PbD MNsA== 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=8bMHMIfQW1zNPgt4RCTR0rH+iuJZ9E3sV/p+MrByrJM=; b=VCEFg4cWBzaQOVouZsRn2EqgSljRSDhT3D94lmy71bDPEvShVjIsJiHZ8kJNrBU8io 4w9ytO7Y05HnvmxLc6X0MlXOIB0yuMJFz8MtiWr2SBoZbrNz8H39VniYOqj4QNVva8A/ UZkTEv5xrk1uNEN+OtZhvYstrXHGkfc8qSAYzlPUGND+uzAELnotMPkwhO3o2+dT8EWH TP/7nWmhQfL7n/SrxBNBoLpOsGygAAis/qlzg7bsFEcEkh6CeYMx/yWqyrE6ngW+bBW/ kRPdjteSMqv1pVnPb1ALAiBjmVrI0H+Y9tfg5N84lKar/oQ+5h+YhjFagoTrGtqbfi6c An7g== X-Gm-Message-State: APjAAAV9xRI+vyfD/c6bJPUJ7KODfYBWXttqIXFCH8u7CEv2+Q5PpUK3 CNAFWZN4gzke/2clRl9F2dmbQGw7Dig= X-Google-Smtp-Source: APXvYqwZtlOYmf17aUNTfvfTe2YSS4NUTwnLO218pZhQbMsfYTBhYP06bBz4/4M3iQQc92fR8ouyRg== X-Received: by 2002:adf:f88c:: with SMTP id u12mr13149434wrp.323.1574695533388; Mon, 25 Nov 2019 07:25:33 -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 e16sm10858766wrj.80.2019.11.25.07.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 07:25:32 -0800 (PST) Date: Mon, 25 Nov 2019 16:25:31 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Gadre Nayan Cc: users@dpdk.org Message-ID: <20191125152531.GK28445@bidouze.6wind.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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" 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