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 A59EF271 for ; Mon, 18 Dec 2017 23:41:56 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 315C9211CD; Mon, 18 Dec 2017 17:41:56 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 18 Dec 2017 17:41:56 -0500 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; s=mesmtp; bh=pDOdW653imWWjd3LUWET5AtOIA O4wfbyWb6X0yDjSUc=; b=RQ9P8QxN4heR6fiz9SII3U8K7fZvNqhw8F3DbyFJoq s6YbwTJqK/6jT1JRu8f6xeJlLyFXrL02oZiVmcC2arvv4INiVypDmBAjxFsazKkt Kj6R34rdYs2aiE1qntrkRxrsgHgW1+LYc3QOgRyZVbCVFycFsCtO3MSgHpYSCHsY Y= 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; s=fm1; bh=pDOdW6 53imWWjd3LUWET5AtOIAO4wfbyWb6X0yDjSUc=; b=HOnTUCIRHvoqYSV7fa/POx RQcKoG4lRIONWfi6LeHA9b63PHldMpMkGWISiizcdBsb+GufMB49ItYJpmfiC+D7 4LmPg32w+2vOvUjfElnWL0PR4FpaYfyhU3Z46VLAkjcnn0PDmZLrYbmrohupwamP s0lYhiRyfLYaqSjHerVSAMZB6m+5roU+8qn64IfN8uFRo0NHwhtUwG9hEZYh9vPn dpUN5vxTy/uBYqojjbJklzsdHnY2HqBKFndyvB8B29KdqILL3f9urE4oyghmFlJA MOe6E7pLdyemqX+hxEmp9JbtHmlcUoyuRs9moWdS9OR6P3Fv7BOEpuRdAvdpFmhg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D485924692; Mon, 18 Dec 2017 17:41:55 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, Adrien Mazarguil , Yuanhan Liu , =?ISO-8859-1?Q?Ga=EBtan?= Rivet , Ciara Loftus , Kevin Traynor , hemant.agrawal@nxp.com Date: Mon, 18 Dec 2017 23:41:54 +0100 Message-ID: <7846673.3N12EFDVMd@xps> In-Reply-To: <20171218143045.6a366c14@xeon-e3> References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <1900781.GHbs7vIcDE@xps> <20171218143045.6a366c14@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by 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: Mon, 18 Dec 2017 22:41:56 -0000 18/12/2017 23:30, Stephen Hemminger: > On Mon, 18 Dec 2017 23:25:37 +0100 > Thomas Monjalon wrote: > > > 05/12/2017 14:20, Thomas Monjalon: > > > 05/12/2017 12:04, Adrien Mazarguil: > > > > Just for information, this "port=x" argument in mlx4 is consistent with the > > > > value found in /sys/class/net/ethX/dev_port under Linux. If we choose to use > > > > a port index (instead of a MAC or something else), it would make sense to > > > > standardize it on the same order as given by the host OS for consistency > > > > across all PMDs. > > > > > > Good idea, thanks. > > > > dev_port is implemented in Linux for few devices: > > > > % git grep -l '\' drivers/net/ethernet > > drivers/net/ethernet/broadcom/bnxt/bnxt.c > > drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > > drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c > > drivers/net/ethernet/intel/i40e/i40e_fcoe.c > > drivers/net/ethernet/mellanox/mlx4/en_netdev.c > > > > port is used to distinguish multiple physical ports on a single card. > It is not global like the DPDK port. Yes, it is an additional property helpful to identify devices.