From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] [RFC] ether: standardize getting the port by name Date: Mon, 18 Dec 2017 14:30:45 -0800 Message-ID: <20171218143045.6a366c14@xeon-e3> References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <20171205110446.GN4062@6wind.com> <4433948.XFY0rnHxgs@xps> <1900781.GHbs7vIcDE@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Adrien Mazarguil , dev@dpdk.org, Yuanhan Liu , =?UTF-8?B?R2HDq3Rhbg==?= Rivet , Ciara Loftus , Kevin Traynor , hemant.agrawal@nxp.com To: Thomas Monjalon Return-path: Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by dpdk.org (Postfix) with ESMTP id 9B1D0200 for ; Mon, 18 Dec 2017 23:30:49 +0100 (CET) Received: by mail-pf0-f196.google.com with SMTP id n6so10291578pfa.4 for ; Mon, 18 Dec 2017 14:30:49 -0800 (PST) In-Reply-To: <1900781.GHbs7vIcDE@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" 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.