From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 12458378B for ; Sat, 10 Jun 2017 09:35:48 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id g76so10904263wrd.2 for ; Sat, 10 Jun 2017 00:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=j3Am3VdLZl4ioHwhFCdPt/36dNH5prOwZ+cFa968SKA=; b=mILk5ZAaj24YlcsWsHiW6zygs2gHUYTmgK7ae0ATnzeDfnjZ7ceAPwuGwSOflt2iHV f0bOG6WLBS3toWnuQ27whq+2BzP8zsYnqhO/cBMjoNL4ZW3x6MeDXffHYu7+Ojla3Ht2 thfJQki7ckfdZ6yFCIR3gTWsaQx16IkAZpKx2ISVbjXmZFcrKsXytcAJgdJJdlcUOiPF IEwGVgVx5RuEDBCZlfA6dJAh2ElzR1cO7fuM1/eAfQX8gqz785c6AXLMtqWyasAh9Ww2 CAm4Ia7xk3fbwT45e9tItrulSVL86wpRR0EY+kU4HmfQqSbYpn9fRCZdJ+8fejSnuykn k2bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=j3Am3VdLZl4ioHwhFCdPt/36dNH5prOwZ+cFa968SKA=; b=cANJ7aoELmQZ5xLGmXPvGtxBZ9OCJ7kRRoVeXl7uGBEkBonY1+zCV8Zrtd7HMaLnyn q+7rtWOlvSxHghEs27+yhlgrPFKG4fomflDFVA8J0++DxyJs5Zo4Xm/qf9Y51jPFleee dq6PyLd6r7zq83TNlXjGuD2rQYNpGtr+0y2tPGvXOd0p+4EGsb1OtGjrtVKbGmnNGYqa Jd+YUk7TMqjlCoOY2zsI4Jqm+ZVE7MRMbWGsQp0Df8TugTbSqVpPyboe5bstZFRGhs3l rZl8w+TznAJBKN778p7KlfdT3KhADjvnSg55MuPHmH43gEbv5UQT9yVlmwec1DEobwVn bqiA== X-Gm-Message-State: AKS2vOxGl7q/2maB7KY4tm1UiJ8F21E9rzEETGLwexhyPpoCK5AKIG6X mx8M/ScbFlMpe9uImhCEOYguds0I3A== X-Received: by 10.28.228.84 with SMTP id b81mr2260985wmh.78.1497080147686; Sat, 10 Jun 2017 00:35:47 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.25.65 with HTTP; Sat, 10 Jun 2017 00:35:47 -0700 (PDT) In-Reply-To: <1804015.XMfruEeC3U@xps> References: <20170526161141.4746-1-ferruh.yigit@intel.com> <20170526161141.4746-2-ferruh.yigit@intel.com> <1804015.XMfruEeC3U@xps> From: Jan Blunck Date: Sat, 10 Jun 2017 09:35:47 +0200 X-Google-Sender-Auth: nh0RguXN2mDd-WjQlpq-hO7cFeQ Message-ID: To: Thomas Monjalon Cc: Ferruh Yigit , dev , "John W. Linville" , Stephen Hurd , Ajit Khaparde , Declan Doherty , Helin Zhang , Jingjing Wu , Wenzhuo Lu , Konstantin Ananyev , Pascal Mazon , Gaetan Rivet Content-Type: text/plain; charset="UTF-8" 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: Sat, 10 Jun 2017 07:35:48 -0000 On Fri, Jun 9, 2017 at 3:52 PM, Thomas Monjalon wrote: > 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. > I wonder if this is really the right thing to do. The name in the eth_dev data is the eth_dev device name and it might be different from the low-level device name. Some busses might use UUID as the device identifier and I don't believe that this is a user friendly name. >> 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. Probably. But it also depends on at what stage the driver is using the name and what information is printed. During probing I would expect the low-level device name to be printed. After probing the eth_dev PMD should use the user friendly device name. > 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 >