From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 58AB9374C for ; Wed, 12 Jul 2017 00:05:18 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D9C1420A91; Tue, 11 Jul 2017 18:05:17 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 11 Jul 2017 18:05:17 -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=d9ujCVbdl/tq9cY S1OM9XhjgFYFWOfOTQwuphgCcLKY=; b=k2t8OQSMsTgU7ATBQaoPjRlELSEMCuB SJbFmI456AeuisHLjZH6Qp0oQaeTj+CdHYj6pwppneKkL+H2LZ++SwYahwoVYx/b DNyquZODyBtl8eq8SgwXOfCd7zjToXZqDNm73JqCjyTd3BItkEduRQSaUCde/Cxb i53yVxYXQ4zo= 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=d9ujCVbdl/tq9cYS1OM9XhjgFYFWOfOTQwuphgCcLKY=; b=lVsniNhZ 2Wf1R/emkdUV2gmr9tVLHnRw4FYRM98CW2s2iZX1nEKtvcvTxt53NGtcHEBFuNjZ qtRVyx66XDfELZEqzLRNCcKNJFPoT8FqrHF7oOpEcyN9b5Asj5Tx+bWyg1MPqhfD HMmfeqNtdRkyy+D8NBpjzL/ogQXd1lNTKw655+FPXGLbZKayNQazcoVIdJyrr6gs sjbb8B6oigY1e5uCrr/4somKnusz80dn0GsYNoQPtzy/3shOIhNeuLomD8b0YLp5 HTfj+TjqFH59BnU1R54uztCNao920y4RrVZDABddJNNm26L15rVX+Dge2RhT0CGg o+kdCpo6MSRPYw== X-ME-Sender: X-Sasl-enc: IqbCWmRrJO+LkAfuDDAed9izCP/vfwM3NjVs9nfczkd3 1499810717 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 901E42486C; Tue, 11 Jul 2017 18:05:17 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org Date: Wed, 12 Jul 2017 00:05:16 +0200 Message-ID: <3649906.Oe0negFerb@xps> In-Reply-To: <846173ac225560e48d665fb1d6d847919694d3e8.1499728330.git.gaetan.rivet@6wind.com> References: <846173ac225560e48d665fb1d6d847919694d3e8.1499728330.git.gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2 5/8] pci: use given name as generic name 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: Tue, 11 Jul 2017 22:05:18 -0000 11/07/2017 01:19, Gaetan Rivet: > The PCI device is referenced by other DPDK systems by the name of its > parameter, not by the system name. I don't understand this sentence. Please give an example. > Moreover, this name should be set once and for all, as early as > possible. This means linking the rte_devargs associated with the PCI > device during its scan, making available other metadatas used afterward > upon probing and device search for plugging. Which other metadatas? Please give an example. [...] > +void > +pci_name_set(struct rte_pci_device *dev) > +{ > + struct rte_devargs *devargs; > + > + rte_pci_device_name(&dev->addr, > + dev->name, sizeof(dev->name)); > + devargs = pci_devargs_lookup(dev); > + dev->device.devargs = devargs; > + if (devargs != NULL) > + dev->device.name = dev->device.devargs->name; > + else > + dev->device.name = dev->name; > +} I think this function deserves some comments. The relation between rte_pci_device_name and pci_devargs_lookup is not obvious. Moreover, this function is not just setting the name: it is also setting the devargs in the rte_device. How dev->device.devargs->name is different from dev->name?