Doca examples

Hi all,
I’m new to DOCA SDK. I’m trying to run the example applications but I’m getting the following error, can anyone help?

./doca_url_filter -a 0000:03:00.0,class=regex -a auxiliary:mlx5_core.sf.4,sft_en=1 -a auxiliary:mlx5_core.sf.5,sft_en=1 -c3 –– -p

./doca_url_filter: error while loading shared libraries: librte_regexdev.so.21: cannot open shared object file: No such file or directory

1 Like

Ok I solved the shared library problem by doing this:
export LD_LIBRARY_PATH=/opt/mellanox/dpdk/lib/aarch64-linux-gnu/

But now I’m getting the following error:
/opt/mellanox/doca/examples/url_filter/bin# ./doca_url_filter -a 0000:03:00.0,class=regex -a auxiliary:mlx5_core.sf.4,sft_en=1 -a auxiliary:mlx5_core.sf.5,sft_en=1 -c3 – -p

EAL: Detected 8 lcore(s)

EAL: Detected 1 NUMA nodes

EAL: failed to parse device “auxiliary:mlx5_core.sf.4”

EAL: Unable to parse device ‘auxiliary:mlx5_core.sf.4,sft_en=1’

EAL: Error - exiting with code: 1

Cause: EAL initialization failed

Can you try this set of arguments?

/opt/mellanox/doca/examples/url_filter/bin/doca_url_filter -a 0000:03:00.0,class=regex:eth,representor=[65535],sft_en=0 –p

I checked the docs today and it’s been updated to the string you are trying there. That might be a change to support updates/changes for DOCA 1.1 that just released.

1 Like

The missing LD_LIBRARY_PATH was fixed in the DOCA 1.1 BFB image, so I’m assuming your setup is installed on the previous release (DOCA 1.0).

Anyway, the updated command line you’ve used applies to running the URL-Filter with SFs. I recommend going over the SF guide so to properly configure them on the DPU, as shown in the example figure in the application’s page.

Thanks a lot for your response, Yes I had installed the previous version DOCA 1.0. Should I un-install and install the new version to get the newly released sdk 1.1?

Can you try this and report back?

/opt/mellanox/doca/examples/url_filter/bin/doca_url_filter -a 0000:03:00.0,class=regex:eth,representor=[65535],sft_en=0 –p

1 Like

should I upgrade to version 1.1? I’m still using version 1.0

after repeating the steps in the example, looks like it is working now! Thanks a lot.

/opt/mellanox/doca/examples/url_filter/bin/doca_url_filter -a 0000:03:00.0,class=regex:eth,representor=[65535],sft_en=0 –p

EAL: Detected 8 lcore(s)

EAL: Detected 1 NUMA nodes

EAL: Multi-process socket /var/run/dpdk/rte/mp_socket

EAL: Selected IOVA mode ‘VA’

EAL: No available hugepages reported in hugepages-32768kB

EAL: No available hugepages reported in hugepages-64kB

EAL: No available hugepages reported in hugepages-1048576kB

EAL: Probing VFIO support…

EAL: VFIO support initialized

EAL: Invalid NUMA socket, default to 0

EAL: Probe PCI driver: mlx5_pci (15b3:a2d6) device: 0000:03:00.0 (socket 0)

mlx5_pci: CT ASO is supported.

mlx5_pci: CT ASO is supported.

EAL: No legacy callbacks, legacy socket not created

common_mlx5: representor 2047 cannot set VF MAC address 1A:AF:E1:36:BF:10 : Invalid argument

INFO: 7 cores are used as DPI workers

URL FILTER>>

Happy to see that it works.

On the BlueField OS image from March (DOCA 1.0) once LD_LIBRARY_PATH is configured to include “/opt/mellanox/dpdk/lib/aarch64-linux-gnu”, you will be able to run the applications using the 1.0 version of the command line (the “-a 0000:03:00.0,class=regex:eth,representor=[65535],sft_en=0” flags).

Now that DOCA 1.1 was released, we recommend upgrading to it and to the latest BlueField OS version (3.7), as described in the updated installation guide. Once the new version is installed, the new command line (the “-a auxiliary:mlx5_core.sf.4,sft_en=1 -a auxiliary:mlx5_core.sf.5,sft_en=1”) should work as well.

You can read more about the updated execution mode of the applications in the updated documentation here.

Ok now that we have updated to doca 1.1
I’m getting a new error, any idea on this?
/opt/mellanox/doca/examples/url_filter/bin# ./doca_url_filter -a auxiliary:mlx5_core.sf.4,sft_en=1 -a auxiliary:mlx5_core.sf.5,sft_en=1

EAL: Detected 8 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: No available hugepages reported in hugepages-32768kB

EAL: No available hugepages reported in hugepages-64kB

EAL: No available hugepages reported in hugepages-1048576kB

EAL: Probing VFIO support…

EAL: VFIO support initialized

EAL: No legacy callbacks, legacy socket not created

[03:06:48:938847][DOCA][E][FOFLD]: Application will only function with 2 ports, num_of_ports=0

First, the example command line from the application’s documentation is the following:

/opt/mellanox/doca/examples/url_filter/bin/doca_url_filter -a 0000:03:00.0,class=regex -a auxiliary:mlx5_core.sf.4,sft_en=1 -a auxiliary:mlx5_core.sf.5,sft_en=1

The error that you are seeing is probably an indicator that no Scalable Functions (SFs) were configured, or that the ones configured have different identifiers than “sf.4” and “sf.5”.

The “-a” EAL flag adds a given device to the “allow list”, essentially meaning that the application will use 2 network devices (mlx5_core.sf.4 and mlx5_core.sf.5). In addition, as seen above in the example command line, the application also needs access to the RegEx hardware accelerator, and as such we also pass “-a 0000:03:00.0,class=regex”.

The application’s documentation describes the recommended SF setup, and the Scalable Functions Guide explains how to configure the SFs themselves (and how to get their IDs so they could be used by the application).

1 Like

good information

1 Like

Hi, this error is returned to me, how can I fix it?

opt/mellanox/doca/examples/url_filter/src$ /opt/mellanox/doca/examples/url_filter/bin/doca_url_filter -a 0000:03:00.0,class=regex -a auxiliary:mlx5_core.sf.4,sft_en=1 -a auxiliary:mlx5_core.sf.5,sft_en=1
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: failed to parse device "auxiliary:mlx5_core.sf.4"
EAL: Unable to parse device 'auxiliary:mlx5_core.sf.4,sft_en=1'
EAL: Error - exiting with code: 1
  Cause: EAL initialization failed

Hi, is it possible that you are using DOCA 1.0 by any chance? Please see instructions below about upgrading to DOCA 1.1 which is the version that supports the above command line arguments.

i think i have the latest version of doca, running these commands on the dpu i get these results

sudo apt install doca-sdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
doca-sdk is already the newest version (1.1-0.5.4.1.0.3.0.bf.3.7.0.11805).
The following package was automatically installed and is no longer required:
  libllvm11
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 275 not upgraded.

sudo apt install doca-runtime
Reading package lists... Done
Building dependency tree       
Reading state information... Done
doca-runtime is already the newest version (1.1-0.5.4.1.0.3.0.bf.3.7.0.11805).
The following package was automatically installed and is no longer required:
  libllvm11
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 275 not upgraded.

sudo apt install doca-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
doca-tools is already the newest version (1.1-0.5.4.1.0.3.0.bf.3.7.0.11805).
The following package was automatically installed and is no longer required:
  libllvm11
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 275 not upgraded.

The DOCA packages are indeed those of DOCA 1.1, however I’m having trouble reproducing this error on my setup. Could you please add here the output of the following commands from your DPU?

  1. cat /etc/mlnx-release - Prints the full details of the installed BFB
  2. apt list --installed | grep dpdk - Prints the package versions of the mlnx-dpdk packages
  3. sudo mlnx-sf --action show - Prints the status of the allocated SFs