From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 26C9C316B for ; Thu, 23 Feb 2017 16:49:45 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id 196so3931149wmm.1 for ; Thu, 23 Feb 2017 07:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dhuwfo1BQA9d7/1Sbll339NCSWIK7cWewJea2z3xb+c=; b=ZQwqjYlpZi0YS7iW8yZkOrqjfQPtil6WdFnQJih7WTpx+9UEAs8yqOYZXrwXIsf5hz D9pjIf86gkOquuZH58nK3ZmtZ7RsZYwt4gaJ5vZZ7jBvnk6WcY2S8dks/c3qCRhq0WWx PEy9mkkIhqG5ATCB9sFh6G3SYuUxTmaTOvl0783LCuo/iGbUEoHA1CzDSigpwMfMb9ij tuiaz0AfCftno4gbI3InadG+rEC8f82/ERjVge8hkyhii2G8Hr/TNhvW+7yu1Eqfxm6A kmoe8c1qaaPST3oBi169Jq1bAnQWP8k3dN916zzUqy4/OHiXMHG5OEn+NpMhkxvwPj6w K8UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dhuwfo1BQA9d7/1Sbll339NCSWIK7cWewJea2z3xb+c=; b=LZmaApu+wC8/936ZkWZL1vQKAx+GKHSNCECRsJmeKBwsLXVw9AJskz49UVoOytRJfg 1qfZceS4xuKVlEEoWSMdLUSCNNjuAzsP3wFzOPj/Wvbp9vRAIuJ2jIw93VLLT16RHBuV 0jYt7Euo+gKhfx+z3iVKXwQSX3oQMhQSlLrPSbHC126pkB8D7+KKCpNziklOtSFHUNAx qPK23/UgBbnGBFOgce1RPus777dseb8gkZjXPgBY2c48im9iRn2yOeRUiFVfVQ3McSw/ o3GegHry0/7mDMvsm2ZltPyMIRehOo63j/bcPXZHx1t17gg1t8c/+l1dwOnFuMIOc44U T8NA== X-Gm-Message-State: AMke39kqRY4o6iHD09vSi89b5kt1uBkrXcTBn3b9yAPTYu1ibwSgSo8v7zdeODn4O0HtRFdF X-Received: by 10.28.68.6 with SMTP id r6mr5218369wma.57.1487864985521; Thu, 23 Feb 2017 07:49:45 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t103sm6515032wrc.43.2017.02.23.07.49.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Feb 2017 07:49:44 -0800 (PST) Date: Thu, 23 Feb 2017 16:49:36 +0100 From: Adrien Mazarguil To: "Ramakrishnan, Kuralamudhan" Cc: "vasilyf@mellanox.com" , "dev@dpdk.org" Message-ID: <20170223154936.GF10133@6wind.com> References: <45A864C2E6DC734AB0DD4BF0A94057750A8EDE@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45A864C2E6DC734AB0DD4BF0A94057750A8EDE@irsmsx105.ger.corp.intel.com> Subject: Re: [dpdk-dev] Regarding phys port id in mellanox NIC 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: Thu, 23 Feb 2017 15:49:46 -0000 Hi Kural, On Thu, Feb 23, 2017 at 11:23:37AM +0000, Ramakrishnan, Kuralamudhan wrote: > Hello, > > I have a question regarding the phys port id in mellanox NIC, is this feature deprecated in the latest mlnx-en-dpdk driver ? > > Issue: > > I am working on the Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro] NIC. > I used to read the /sys/class/net/enp6s0/phys_port_id file, this will give me the value as 248a070300728f70 for port 1 and 248a070300728f71 for port 2. While I cannot answer about phys_port_id's deprecation status, how about relying on the simpler dev_port file instead? /sys/class/net/enp6s0/dev_port Which contains either 0 or 1 depending on the underlying physical port number (that is, unless your Linux kernel version is < 3.15 in which case you should look into the dev_id file instead, check priv_get_ifname() for more info). > The modinfo details before installing the mlnx-en-dpdk is as follows > > # modinfo mlx4_en > filename: /lib/modules/4.4.0-59-generic/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko > version: 2.2-1 (Feb 2014) > license: Dual BSD/GPL > description: Mellanox ConnectX HCA Ethernet driver > author: Liran Liss, Yevgeny Petrilin > srcversion: CF3245DD50A90F3D536D0A7 > depends: mlx4_core,ptp,vxlan > intree: Y > vermagic: 4.4.0-59-generic SMP mod_unload modversions > parm: udp_rss:Enable RSS for incoming UDP traffic or disabled (0) (uint) > parm: pfctx:Priority based Flow Control policy on TX[7:0]. Per priority bit mask (uint) > parm: pfcrx:Priority based Flow Control policy on RX[7:0]. Per priority bit mask (uint) > parm: inline_thold:Threshold for using inline data (range: 17-104, default: 104) (uint) > > After that that I installed the mlnx-en-dpdk drivers as follows. > > Download and extract Mellanox divers: > # cd ~/packages > # wget http://www.mellanox.com/downloads/ofed/MLNX_EN-3.4-2.0.0.0/mlnx-en-3.4-2.0.0.0-ubuntu16.04-x86_64.tgz > # mkdir mlnx > # tar xvzf mlnx-en-3.4-2.0.0.0-ubuntu16.04-x86_64.tgz --strip-components=2 -C mlnx/ > Update the /etc/apt/sources.list.d/mlnx_ofed.list file with extraction directory path as mentioned below > # echo "deb file:/root/packages/mlnx/DEBS ./" > /etc/apt/sources.list.d/mlnx_ofed.list > Add key to the apt tool and then update > # wget -qO - http://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | sudo apt-key add -# apt update > Install the driver > # apt install -y mlnx-en-dpdk > > > I am getting the error message as follows > # cat /sys/class/net/enp6s0/phys_port_id > cat: /sys/class/net/enp6s0/phys_port_id: Operation not supported Same here, I'm not sure this file can be relied on anymore. > currently the modinfo details is as below. > > # modinfo mlx4_en > filename: /lib/modules/4.4.0-59-generic/updates/dkms/mlx4_en.ko > version: 3.4-2.0.0 (23 Nov 2016) > license: Dual BSD/GPL > description: Mellanox ConnectX HCA Ethernet driver > author: Liran Liss, Yevgeny Petrilin > srcversion: B25238324E1CDB4A38E4970 > depends: mlx4_core,mlx_compat,ptp,vxlan > vermagic: 4.4.0-59-generic SMP mod_unload modversions > parm: udp_rss:Enable RSS for incoming UDP traffic or disabled (0) (uint) > parm: pfctx:Priority based Flow Control policy on TX[7:0]. Per priority bit mask (uint) > parm: pfcrx:Priority based Flow Control policy on RX[7:0]. Per priority bit mask (uint) > parm: inline_thold:Threshold for using inline data (range: 17-104, default: 104) (uint) > > # hostnamectl > Static hostname: ubuntu > Icon name: computer-server > Chassis: server > Operating System: Ubuntu 16.04.1 LTS > Kernel: Linux 4.4.0-59-generic > Architecture: x86-64 > > Please let us know, is there any patch available to restore the phys port id in mellanox NICs ? Well, I suggest using dev_port then. So far only mlx4 exposes two physical ports on a single PCI bus address hence the need for this distinction. This is not the case with mlx5, where dev_port is always 0. > Kural > > Kuralamudhan Ramakrishnan > > > -------------------------------------------------------------- > Intel Research and Development Ireland Limited > Registered in Ireland > Registered Office: Collinstown Industrial Park, Leixlip, County Kildare > Registered Number: 308263 > > > This e-mail and any attachments may contain confidential material for the sole > use of the intended recipient(s). Any review or distribution by others is > strictly prohibited. If you are not the intended recipient, please contact the > sender and delete all copies. Remember this this a public mailing list, thankfully I'm one of the intended recipients, phew! -- Adrien Mazarguil 6WIND