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 2816C2B92 for ; Fri, 9 Jun 2017 15:52:36 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B7B0520BBB; Fri, 9 Jun 2017 09:52:35 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 09 Jun 2017 09:52:35 -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=JTSBmub8RVO4YN0 8AVV+DbKbBF5m4Xgsreyi/evjWX8=; b=IgvB92J5+8TsF08NvNWo+cRtcHycTh7 a2ehfEOF9ekoQ6BG3113WASU9NMaL2fJ8DLSz1x5MpwQRyLV+m+krkCsWqvdEAir Rk3ZThXZiodk95zWaoayIn8TqS30AESBYcnKY+zBpHi6ULO1/HuyNoPQFqXGHPjR 17JN/jCGXNis= 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=JTSBmub8RVO4YN08AVV+DbKbBF5m4Xgsreyi/evjWX8=; b=UEYj76wl tYgACW6eSMpkBEQYdbUbugsoLdPBAm6bqM79Nq7/debhrM/UO+CplPLfhFvTXOdU +xDUQruMPNjH6JHEExL27crO0d8eZRVSvx59ChdLf/0VOMO0WMJwS65H3iyZdWko AhznS6nE1oj0iS8b4NgQ3qRLBx7MD9E20o8LW8Rly1oocD3220Nx0+NGG7x8eH1d BZcXNccARaaOj8lI541DRFP9vDbcytpGrgwMLqX2IHQtqFyS9ZnX4xF/IXVnsp8L b6GKAjipNmJ4C2yzJaxHdsan4IKuPZhcxhlbLwjHhiZ2ME8yv9wZcKirFnaBVcYr 30Rc7y48I8l+rw== X-ME-Sender: X-Sasl-enc: 61vNBl9dMn9ipsVA8DENsYiCxQsnQcSufe8E/4UlRlGg 1497016355 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6830A24407; Fri, 9 Jun 2017 09:52:35 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, "John W. Linville" , Stephen Hurd , Ajit Khaparde , Declan Doherty , Helin Zhang , Jingjing Wu , Wenzhuo Lu , Konstantin Ananyev , Pascal Mazon , Gaetan Rivet , Jan Blunck Date: Fri, 09 Jun 2017 15:52:34 +0200 Message-ID: <1804015.XMfruEeC3U@xps> In-Reply-To: <20170526161141.4746-2-ferruh.yigit@intel.com> References: <20170526161141.4746-1-ferruh.yigit@intel.com> <20170526161141.4746-2-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure 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, 09 Jun 2017 13:52:36 -0000 26/05/2017 18:11, Ferruh Yigit: > Device name resides in two different locations, in rte_device->name and > in ethernet device private data. Yes would be nice to remove the name from rte_eth_dev_data. > For now, the copy in the ethernet device private data is required for > multi process support, the name is the how secondary process finds about > primary process device. Yes it is in rte_eth_dev_attach_secondary(). This secondary process forces us to write ugly data structures. > But for drivers there is no reason to use the copy in the ethernet > device private data. Yes I agree. There are probably other places where we can avoid using this field. I see rte_eth_dev_get_name_by_port() and rte_eth_dev_get_port_by_name() using rte_eth_dev_data[port].name. > This patch updates PMDs to use only rte_device->name. > > Signed-off-by: Ferruh Yigit