From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] [RFC] ether: standardize getting the port by name Date: Mon, 18 Dec 2017 23:25:37 +0100 Message-ID: <1900781.GHbs7vIcDE@xps> References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <20171205110446.GN4062@6wind.com> <4433948.XFY0rnHxgs@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Yuanhan Liu , =?ISO-8859-1?Q?Ga=EBtan?= Rivet , Stephen Hemminger , Ciara Loftus , Kevin Traynor , hemant.agrawal@nxp.com To: Adrien Mazarguil Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 4993D200 for ; Mon, 18 Dec 2017 23:25:39 +0100 (CET) In-Reply-To: <4433948.XFY0rnHxgs@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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