From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 0BC311B261 for ; Fri, 6 Oct 2017 10:11:54 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9484D2088E; Fri, 6 Oct 2017 04:11:54 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 06 Oct 2017 04:11:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=qRegazfFZ6D7TTe 2TJ+lwNQsvDlY3QJYwlRZlSHp7cg=; b=rrfjLffuiSq8M0kknzCI0i6vB55srBz +dn75ky9mvE6zcjsZnrFgYNVKpX9TujkTsLmrHdTpny5HnlCAvUDr02Xt9oMvyOp RsN7GvGYKuTP609sP8+5riaoyWjG2ffsAptmhb+caHxMPi/t8JXSC/se2DP+/BMT 1C02X8gM/XtM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=qRegazfFZ6D7TTe2TJ+lwNQsvDlY3QJYwlRZlSHp7cg=; b=gsjZ0QS8 nU9B5heC8V/ON+j1LH79mrKHFv2cf66K4KhcLzXUFv+R7dzUbuPO7uxnJm/WBGGf Y6VoBBdfy0ba39fQlr9sGbWAIqvDa3jXOiAnT1XkX6mBpUClWXTPqKajbGNisD88 8EcnwtAvtZ2+Psr8XuHurASXr+8Be9bTUmVhD7RQ8+tXNKHXFtHlVr1b4wm9tXIg MbRr8I37ROR69peNEO9xzCZYz2PnB7gLhRvvpLaZaYDHxHyaBAQYmNXaWmfWjNlO kdRGt4qK/8w9kYXNI7h1oNRMPg7+B0ljuukppL/22H4MmCegYwrwQyeoM33NH+GV 3GeID0z33G0APw== X-ME-Sender: X-Sasl-enc: Kdx7dpOgOQ8cQu9LWOpag+TMy2+b29/f2n5Res/6h/pu 1507277514 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3F4D324372; Fri, 6 Oct 2017 04:11:54 -0400 (EDT) From: Thomas Monjalon To: santosh Cc: dev@dpdk.org, olivier.matz@6wind.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, aconole@redhat.com, stephen@networkplumber.org, anatoly.burakov@intel.com, gaetan.rivet@6wind.com, shreyansh.jain@nxp.com, bruce.richardson@intel.com, sergio.gonzalez.monroy@intel.com, maxime.coquelin@redhat.com Date: Fri, 06 Oct 2017 10:11:53 +0200 Message-ID: <9924204.vKznq0EaHZ@xps> In-Reply-To: <7d5ca085-9b6d-83ca-6802-f855208f07ec@caviumnetworks.com> References: <20170918104234.9149-1-santosh.shukla@caviumnetworks.com> <1709089.zPNXRAn3Mx@xps> <7d5ca085-9b6d-83ca-6802-f855208f07ec@caviumnetworks.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v9 6/9] eal: auto detect iova mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2017 08:11:55 -0000 06/10/2017 05:25, santosh: > > On Friday 06 October 2017 05:49 AM, Thomas Monjalon wrote: > > 20/09/2017 13:23, Santosh Shukla: > >> For auto detection purpose: > >> * Below calls moved up in the eal initialization order: > >> - eal_option_device_parse > >> - rte_bus_scan > >> > >> Based on the result of rte_bus_scan_iommu_class - select iova > >> mapping mode. > > It does not explain why you need to move things up. > > For that one should understand eal_init sequence first. > Should know about _option_device_parse and rte_bus_scan() dependency. > > After that bus_scan is a need for _get_iommu_class() of api to know that > - kdrv is igb/uio/vfio etc.. That's why. Refer work history. > Again V9 series happened not for fun. I diagress on your comment. This is the basics of writing a commit log. You have to explain why things are done. You move things because of dependencies without explaining them. And I'm pretty sure this move will cause big troubles. For instance, have you tried shared library mode? One more comment, you are considering only devices scanned at initialization. What happens when a new device is plugged in? I can push it as is, given there are some Reviewed-by and Tested-by. I am trying to avoid you a revert of this patch when one will discover some major bugs. But I wonder whether it's worth given how you welcome it.