How to read the Mellanox net interface phys_port_id file ?

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.

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 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 ./” > /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 http://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | sudo apt-key add -# apt update

  • Install the driver

apt install -y mlnx-en-dpdkaapt

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

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 me know, I misconfigured anything in my set up.

could be a glitch related to mlnx-en-dpdk driver. you can probably look at the dmesg/messages outputs to get an insight on what amy be the root-cause

suggesting to approach to support@mellanox.com mailto:support@mellanox.com and get their further advice and investigate this