<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please confirm your NIC is configured to ETH and not IB, but running this command, for example:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424;background:white">mlxconfig -d /dev/mst/mt4119_pciconf0 q | grep LINK</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You should see something like this:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424;background:white">LINK_TYPE_P1 ETH(2)</span><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424"><br>
<span style="background:white">LINK_TYPE_P2 ETH(2)</span></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If not, please refer to this guide that explains how to configure the NIC as ETH:<o:p></o:p></p>
<p class="MsoNormal"><a href="https://support.mellanox.com/s/article/getting-started-with-connectx-4-100gb-s-adapter-for-linux">https://support.mellanox.com/s/article/getting-started-with-connectx-4-100gb-s-adapter-for-linux</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Asaf Penso<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> fwefew 4t4tg <7532yahoo@gmail.com> <br>
<b>Sent:</b> Friday, April 8, 2022 3:08 AM<br>
<b>To:</b> users@dpdk.org<br>
<b>Subject:</b> Mellanox Technologies MT27710 Family [ConnectX-4 Lx] not receiving (transmitting) packets<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I have two identical metal boxes running Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz. There is no virtualization; so I did NOT enable IOMMU. Both boxes are equipped with two Mellanox Technologies MT27710 NICs and two Intel NICs. The Intel NICs
 are out of scope. I am using the NIC at 01:00.1 for DPDK:<br>
<br>
# lspci | grep Eth<br>
01:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]<br>
01:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]<br>
03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)<br>
04:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">ibv and mst utilities see both Mellanox NICs. DPDK's testpmd application sees the NIC and reports decent values except perhaps ibv_devinfo which reports Infiniband transport. <br>
<br>
My application sends UDP packets from one machine to another. I know this code works on AWS ENA NICs. The build for Mellaonx finds the NIC just like DPDK's testpmd reporting the same EAL info. There are no errors transmitting packets; all numbers in stats are
 exactly what they should be. However, the receiving side never sees any packets. It reports no errors and does not see any packets. Every call to rx_burst sees 0 packets. There is no firewall issue. I can use ncat in tcp and udp mode to send files between
 the machines just fine.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">My application is using CRC checksum offload for RX and TX (value 6). And I triple checked the MAC and IP addresses I use in the code. I believe they are fine. I set auto-negotiate on both the RX and TX side. I have also tried to set 10Gbs
 link speed. No help. I also ran testdpdk then tried to send it packets with ncat; testpmd never sees any packets either.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
I have read through <a href="https://doc.dpdk.org/guides/nics/mlx5.html">https://doc.dpdk.org/guides/nics/mlx5.html</a> for proper setup. I found the following deviations:<br>
<br>
- <a href="https://doc.dpdk.org/guides/platform/mlx5.html#mlx5-common-env">https://doc.dpdk.org/guides/platform/mlx5.html#mlx5-common-env</a> says to set the link type to Eth: mlxconfig -d <mst device> query | grep LINK_TYPE. These devices do NOT have a link
 type and do not allow setting it. I am assuming it only works in Eth mode.<br>
<br>
- the latest and greatest MST toolkit wget <a href="https://www.mellanox.com/downloads/MFT/mft-4.18.0-106-x86_64-deb.tgz">
https://www.mellanox.com/downloads/MFT/mft-4.18.0-106-x86_64-deb.tgz</a> does not include the utiliity mlxdevm and neither does the OEFD install wget
<a href="https://www.mellanox.com/downloads/ofed/MLNX_EN-5.5-1.0.3.2/mlnx-en-5.5-1.0.3.2-ubuntu20.04-x86_64.iso">
https://www.mellanox.com/downloads/ofed/MLNX_EN-5.5-1.0.3.2/mlnx-en-5.5-1.0.3.2-ubuntu20.04-x86_64.iso</a> include it. The ISO file does NOT have a utility called mlnxofedinstall. So I am not sure if I am missing something. The doc reads:<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The firmware, the libraries libibverbs, libmlx5, and mlnx-ofed-kernel modules are packaged in Mellanox OFED. After downloading, it can be installed with this command:<o:p></o:p></p>
<div>
<p class="MsoNormal">./mlnxofedinstall --dpdk<br>
<br>
So I just ran ./install --dpdk since the ISO image does have an install script taking the --dpdk argument.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The doc <a href="https://doc.dpdk.org/guides/platform/mlx5.html#mlx5-common-env">https://doc.dpdk.org/guides/platform/mlx5.html#mlx5-common-env</a> mentions a whole bunch of instructions about SRIOV, SF ports etc but which requires mlxdevm.
 As I say above there is no such utility.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So I am stuck.<br>
<br>
DETAILS:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">uname -a<br>
Linux client 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
root@client:~/Dev/reinvent/scripts# ibv_devices<br>
    device             node GUID<br>
    ------           ----------------<br>
    mlx5_0           0c42a1030065fd82<br>
    mlx5_1           0c42a1030065fd83<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
# ibv_devinfo <br>
hca_id: mlx5_0<br>
transport: InfiniBand (0)<br>
fw_ver: 14.32.1010<br>
node_guid: 0c42:a103:0065:fd82<br>
sys_image_guid: 0c42:a103:0065:fd82<br>
vendor_id: 0x02c9<br>
vendor_part_id: 4117<br>
hw_ver: 0x0<br>
board_id: MT_2420110034<br>
phys_port_cnt: 1<br>
port: 1<br>
state: PORT_ACTIVE (4)<br>
max_mtu: 4096 (5)<br>
active_mtu: 1024 (3)<br>
sm_lid: 0<br>
port_lid: 0<br>
port_lmc: 0x00<br>
link_layer: Ethernet<br>
<br>
hca_id: mlx5_1<br>
transport: InfiniBand (0)<br>
fw_ver: 14.32.1010<br>
node_guid: 0c42:a103:0065:fd83<br>
sys_image_guid: 0c42:a103:0065:fd82<br>
vendor_id: 0x02c9<br>
vendor_part_id: 4117<br>
hw_ver: 0x0<br>
board_id: MT_2420110034<br>
phys_port_cnt: 1<br>
port: 1<br>
state: PORT_ACTIVE (4)<br>
max_mtu: 4096 (5)<br>
active_mtu: 1024 (3)<br>
sm_lid: 0<br>
port_lid: 0<br>
port_lmc: 0x00<br>
link_layer: Ethernet<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"># mst status -v<br>
MST modules:<br>
------------<br>
    MST PCI module is not loaded<br>
    MST PCI configuration module loaded<br>
PCI devices:<br>
------------<br>
DEVICE_TYPE             MST                           PCI       RDMA            NET                       NUMA  <br>
ConnectX4LX(rev:0)      /dev/mst/mt4117_pciconf0.1    01:00.1   mlx5_1          net-enp1s0f1              -1    <br>
<br>
ConnectX4LX(rev:0)      /dev/mst/mt4117_pciconf0      01:00.0   mlx5_0          net-bond0                 -1    <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">DPDK's testpmd application sees and likes the 01:00.1:<br>
<br>
/root/Dev/dpdk/build/app/dpdk-testpmd --proc-type primary --in-memory --log-level 7 -n 4 --allow 01:00.1,class=eth -- -i<br>
EAL: Detected CPU lcores: 16<br>
EAL: Detected NUMA nodes: 1<br>
EAL: Detected static linkage of DPDK<br>
EAL: Selected IOVA mode 'PA'<br>
EAL: No free 2048 kB hugepages reported on node 0<br>
EAL: VFIO support initialized<br>
EAL: Probe PCI driver: mlx5_pci (15b3:1015) device: 0000:01:00.1 (socket 0)<br>
mlx5_net: No available register for sampler.<br>
TELEMETRY: No legacy callbacks, legacy socket not created<br>
Interactive-mode selected<br>
testpmd: create a new mbuf pool <mb_pool_0>: n=267456, size=2176, socket=0<br>
testpmd: preferred mempool ops selected: ring_mp_mc<br>
<br>
Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.<br>
<br>
Configuring Port 0 (socket 0)<br>
Port 0: 0C:42:A1:65:FD:83<br>
Checking link statuses...<br>
Done<br>
testpmd> show port info 0<br>
<br>
********************* Infos for port 0  *********************<br>
MAC address: 0C:42:A1:65:FD:83<br>
Device name: 01:00.1<br>
Driver name: mlx5_pci<br>
Firmware-version: 14.32.1010<br>
Devargs: class=eth<br>
Connect to socket: 0<br>
memory allocation on the socket: 0<br>
Link status: up<br>
Link speed: 10 Gbps<br>
Link duplex: full-duplex<br>
Autoneg status: On<br>
MTU: 1500<br>
Promiscuous mode: enabled<br>
Allmulticast mode: disabled<br>
Maximum number of MAC addresses: 128<br>
Maximum number of MAC addresses of hash filtering: 0<br>
VLAN offload: <br>
  strip off, filter off, extend off, qinq strip off<br>
Hash key size in bytes: 40<br>
Redirection table size: 1<br>
Supported RSS offload flow types:<br>
  ipv4<br>
  ipv4-frag<br>
  ipv4-tcp<br>
  ipv4-udp<br>
  ipv4-other<br>
  ipv6<br>
  ipv6-frag<br>
  ipv6-tcp<br>
  ipv6-udp<br>
  ipv6-other<br>
  ipv6-ex<br>
  ipv6-tcp-ex<br>
  ipv6-udp-ex<br>
  user defined 60<br>
  user defined 61<br>
  user defined 62<br>
  user defined 63<br>
Minimum size of RX buffer: 32<br>
Maximum configurable length of RX packet: 65536<br>
Maximum configurable size of LRO aggregated packet: 65280<br>
Current number of RX queues: 1<br>
Max possible RX queues: 1024<br>
Max possible number of RXDs per queue: 65535<br>
Min possible number of RXDs per queue: 0<br>
RXDs number alignment: 1<br>
Current number of TX queues: 1<br>
Max possible TX queues: 1024<br>
Max possible number of TXDs per queue: 65535<br>
Min possible number of TXDs per queue: 0<br>
TXDs number alignment: 1<br>
Max segment number per packet: 40<br>
Max segment number per MTU/TSO: 40<br>
Device capabilities: 0x14( RXQ_SHARE FLOW_SHARED_OBJECT_KEEP )<br>
Switch name: 01:00.1<br>
Switch domain Id: 0<br>
Switch Port Id: 65535<br>
Switch Rx domain: 0<br>
testpmd> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"># lsmod | egrep "(mlx|ib)" | sort<br>
ib_cm                  53248  2 rdma_cm,ib_ipoib<br>
ib_core               368640  8 rdma_cm,ib_ipoib,iw_cm,ib_umad,rdma_ucm,ib_uverbs,mlx5_ib,ib_cm<br>
ib_ipoib              135168  0<br>
ib_umad                24576  0<br>
ib_uverbs             139264  2 rdma_ucm,mlx5_ib<br>
libahci                36864  1 ahci<br>
libcrc32c              16384  2 btrfs,raid456<br>
mlx5_core            1634304  1 mlx5_ib<br>
mlx5_ib               397312  0<br>
mlx_compat             69632  11 rdma_cm,ib_ipoib,mlxdevm,iw_cm,ib_umad,ib_core,rdma_ucm,ib_uverbs,mlx5_ib,ib_cm,mlx5_core<br>
mlxdevm               172032  1 mlx5_core<br>
mlxfw                  32768  1 mlx5_core<br>
pci_hyperv_intf        16384  1 mlx5_core<br>
psample                20480  1 mlx5_core<br>
tls                    94208  2 bonding,mlx5_core<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>