Failed to run applications on host side, Error: failed to start port failed init port 0

Hi,

I would like to run the Application Simple Forward VNF on host side, but get this error.

root@host:/opt/mellanox/doca/applications/simple_fwd_vnf/bin# ./doca_simple_fwd_vnf -a 01:00.3 -a 01:00.4 -- -l 4 
EAL: Detected 6 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL:   Device is not NUMA-aware, defaulting socket to 0
EAL: Probe PCI driver: mlx5_pci (15b3:101e) device: 0000:01:00.3 (socket 0)
EAL:   Device is not NUMA-aware, defaulting socket to 0
EAL: Probe PCI driver: mlx5_pci (15b3:101e) device: 0000:01:00.4 (socket 0)
EAL: No legacy callbacks, legacy socket not created
[16:57:07:525387][DOCA][DBG][NUTILS:275]: Port 0 modified RSS hash function based on hardware support, requested:0x3ffffc configured:0x3afbc
[16:57:07:821430][DOCA][DBG][NUTILS:316]: Port 0 MAC: e6 84 55 8c 81 9f
[16:57:07:821518][DOCA][DBG][NUTILS:275]: Port 1 modified RSS hash function based on hardware support, requested:0x3ffffc configured:0x3afbc
[16:57:08:138679][DOCA][DBG][NUTILS:316]: Port 1 MAC: 66 c2 0a c3 df 05
[16:57:08:138762][DOCA][DBG][SIMPLE_FWD_FT:233]: malloc size =262208
[16:57:08:138836][DOCA][DBG][SIMPLE_FWD_FT:248]: FT created: flows=16384, user_data_size=32
[16:57:08:139171][DOCA][INF][engine_shared_resources:94]: Engine shared resources initialized successfully
[16:57:08:139292][DOCA][INF][encap_table:106]: encap table created
[16:57:08:139429][DOCA][INF][engine_shared_resources:124]: Allocated 16 shared resources of type 2
[16:57:08:139496][DOCA][INF][dpdk_resource_manager:167]: Dpdk resource manager register completed
[16:57:08:139559][DOCA][INF][dpdk_layer:35]: Dpdk layer register completed
[16:57:08:139614][DOCA][INF][doca_flow:119]: Doca flow initialized successfully
[16:57:08:139718][DOCA][ERR][dpdk_engine:2188]: port 0 build control flow fail - Port 0 create flow fail, type 16 message: cannot create jump action.
 (error type=8)
[16:57:08:139796][DOCA][ERR][dpdk_engine:2798]: port 0 root rx jump flow fail - Port 0 create flow fail, type 16 message: cannot create jump action.
 type=8
[16:57:08:139855][DOCA][ERR][dpdk_engine:3442]: failed init port - error type=8, message=Port 0 create flow fail, type 16 message: cannot create jump action.

[16:57:08:139927][DOCA][ERR][SIMPLE_FWD:274]: failed to start port failed init port 0 - ret code -1
[16:57:08:139984][DOCA][ERR][SIMPLE_FWD:496]: failed to start port 0 (null)
[16:57:08:140044][DOCA][ERR][SIMPLE_FWD_VNF:95]: vnf application init error
[16:57:08:140115][DOCA][INF][encap_table:123]: encap table destroyed
[16:57:08:140182][DOCA][INF][dpdk_resource_manager:174]: Dpdk resource manager unregister completed
[16:57:08:140249][DOCA][INF][dpdk_layer:44]: Dpdk layer unregister completed
[16:57:08:140315][DOCA][INF][engine_shared_resources:191]: Cleanup 16 shared resources of type 2 completed
[16:57:08:140379][DOCA][INF][doca_flow:134]: Doca flow destroyed
[16:57:08:322980][DOCA][DBG][NUTILS:453]: DPDK fini is done
root@host:/opt/mellanox/doca/applications/simple_fwd_vnf/bin# 

I have already create two vfs through this guide NVIDIA DOCA Virtual Functions User Guide and able to run this application on Bulefield-2 DPU side. I am using DOCA 1.3.

root@host:/opt/mellanox/doca/applications/simple_fwd_vnf/bin# lspci | grep Mellanox
01:00.0 Ethernet controller: Mellanox Technologies MT42822 BlueField-2 integrated ConnectX-6 Dx network controller (rev 01)
01:00.1 Ethernet controller: Mellanox Technologies MT42822 BlueField-2 integrated ConnectX-6 Dx network controller (rev 01)
01:00.2 DMA controller: Mellanox Technologies MT42822 BlueField-2 SoC Management Interface (rev 01)
01:00.3 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function (rev 01)
01:00.4 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function (rev 01)

I would be really grateful if you cound give me some advice.

Best Regards,
Zhaoyang.

Hi Zhaoyang,

This error message is usually caused by the VF or SF not being in trusted mode. Can you give that mlxreg command a try from the guide, here and see if that helps?

-Justin

Hi Justin,

Thanks for reply. That is the solution.

Now I am able to run applications on the host side. Sadly, when I tried to recreate sfs on the arm side to run applications, it turns out “No such device”

root@localhost:/home/ubuntu# /opt/mellanox/iproute2/sbin/mlxdevm port add pci/0000:03:00.0 flavour pcisf pfnum 0 sfnum 4 
pci/0000:03:00.0/229377: type eth netdev eth0 flavour pcisf controller 0 pfnum 0 sfnum 4
  function:
    hw_addr 00:00:00:00:04:00 state inactive opstate detached roce true max_uc_macs 128 trust on
root@localhost:/home/ubuntu# /opt/mellanox/iproute2/sbin/mlxdevm port function set pci/0000:03:00.0/229377 hw_addr 00:00:00:00:04:0 trust on state active
root@localhost:/home/ubuntu# echo mlx5_core.sf.4  > /sys/bus/auxiliary/drivers/mlx5_core.sf_cfg/unbind
bash: echo: write error: No such device
root@localhost:/home/ubuntu# echo mlx5_core.sf.4  > /sys/bus/auxiliary/drivers/mlx5_core.sf/bind
bash: echo: write error: No such device
root@localhost:/home/ubuntu# /opt/mellanox/iproute2/sbin/mlxdevm port show
pci/0000:03:00.0/229376: type eth netdev en3f0pf0sf0 flavour pcisf controller 0 pfnum 0 sfnum 0
  function:
    hw_addr 02:e2:72:f7:ba:40 state active opstate attached roce true max_uc_macs 128 trust off
pci/0000:03:00.0/229377: type eth netdev en3f0pf0sf4 flavour pcisf controller 0 pfnum 0 sfnum 4
  function:
    hw_addr 00:00:00:00:04:00 state active opstate detached roce true max_uc_macs 128 trust on
root@localhost:/home/ubuntu# 


I have tried to enable the SF function and cold reboot the device, it still didn’t help.

mlxconfig -d 0000:03:00.0 s PF_BAR2_ENABLE=0 PER_PF_NUM_SF=1 PF_TOTAL_SF=236 PF_SF_BAR_SIZE=10

I am wondering that can applications run on both host and arm side at the same time?

Hi Zhaoyang,

You should be able to run applications on both host and ARM at the same time.

Can you attach the output of
devlink dev show and
mlnx-sf -a show

Thanks!
-Justin

Hi Justin,

I hava sloved my problem, thanks a lot for your help.

Best Regards,
Zhaoyang.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.