Skip to Content.
Sympa Menu

rare-users - Re: [RARE-users] [freertr] Freertr Install On AWS and DPDK

Subject: RARE user and assistance email list

List archive

Re: [RARE-users] [freertr] Freertr Install On AWS and DPDK


Chronological Thread 
  • From: "Christopher Adigun" <>
  • To: ,
  • Subject: Re: [RARE-users] [freertr] Freertr Install On AWS and DPDK
  • Date: Thu, 5 Jan 2023 13:46:39 -0500
  • List-id: <freertr.groups.io>
  • Mailing-list: list ; contact

Thanks..

For future reference, can we get the full steps for compiling.. Encountered errors while attempting to build it (tried centos, fedora), I already installed the prerequisites you mentioned.

[fedora@ip-172-31-43-100 native]$ ./c.sh
arch=x86_64, cc=clang, mode=-O3, flag=-march=corei7, out=../../binTmp
compiling p4xdp_pass.
p4xdp_pass.c:2:10: fatal error: 'bpf/bpf_helpers.h' file not found
#include <bpf/bpf_helpers.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
compiling p4xdp_drop.
p4xdp_drop.c:2:10: fatal error: 'bpf/bpf_helpers.h' file not found
#include <bpf/bpf_helpers.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
compiling p4xdp_kern.
p4xdp_kern.c:2:10: fatal error: 'bpf/bpf_helpers.h' file not found
#include <bpf/bpf_helpers.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
compiling p4mnl_kern.
p4mnl_kern.c:2:10: fatal error: 'bpf/bpf_helpers.h' file not found
#include <bpf/bpf_helpers.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
compiling p4xdp_user.
p4xdp_user.c:12:10: fatal error: 'bpf/bpf.h' file not found
#include <bpf/bpf.h>
         ^~~~~~~~~~~
1 error generated.
compiling p4mnl_user.
p4mnl_user.c:13:10: fatal error: 'bpf/bpf.h' file not found
#include <bpf/bpf.h>
         ^~~~~~~~~~~
1 error generated.
precompiling p4emu_full.
In file included from p4emu_full.c:12:
./p4emu_hdr.h:3:10: fatal error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
precompiling p4emu_dbg.
In file included from p4emu_dbg.c:12:
./p4emu_hdr.h:3:10: fatal error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
precompiling p4emu_none.
In file included from p4emu_none.c:9:
./p4emu_hdr.h:3:10: fatal error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
precompiling p4emu_pcap.
p4emu_pcap.c:9:10: fatal error: 'pcap.h' file not found
#include <pcap.h>
         ^~~~~~~~
1 error generated.
precompiling p4emu_bench.
In file included from p4emu_bench.c:10:
./p4emu_hdr.h:3:10: fatal error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
precompiling p4emu_udp.
In file included from p4emu_udp.c:11:
./p4emu_hdr.h:3:10: fatal error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
precompiling p4emu_dpdk.
p4emu_dpdk.c:9:10: fatal error: 'dpdk/rte_config.h' file not found
#include <dpdk/rte_config.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
linking p4emu.
/usr/bin/ld: cannot find -lpcap
/usr/bin/ld: cannot find -lcrypto
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4dbg.
/usr/bin/ld: cannot find -lpcap
/usr/bin/ld: cannot find -lcrypto
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4pkt.
/usr/bin/ld: cannot find -lpcap
/usr/bin/ld: cannot find -lcrypto
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4dpdk.
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: cannot find -lrte_eal
/usr/bin/ld: cannot find -lrte_mempool
/usr/bin/ld: cannot find -lrte_mbuf
/usr/bin/ld: cannot find -lrte_ring
/usr/bin/ld: cannot find -lrte_ethdev
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4dpdkDbg.
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: cannot find -lrte_eal
/usr/bin/ld: cannot find -lrte_mempool
/usr/bin/ld: cannot find -lrte_mbuf
/usr/bin/ld: cannot find -lrte_ring
/usr/bin/ld: cannot find -lrte_ethdev
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4dpdkPkt.
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: cannot find -lrte_eal
/usr/bin/ld: cannot find -lrte_mempool
/usr/bin/ld: cannot find -lrte_mbuf
/usr/bin/ld: cannot find -lrte_ring
/usr/bin/ld: cannot find -lrte_ethdev
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4bench.
/usr/bin/ld: cannot find -lcrypto
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
linking p4udp.
/usr/bin/ld: cannot find -lcrypto
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
compiling pcapInt.
pcapInt.c:9:10: fatal error: 'pcap.h' file not found
#include <pcap.h>
         ^~~~~~~~
1 error generated.
compiling pcap2pcap.
pcap2pcap.c:9:10: fatal error: 'pcap.h' file not found
#include <pcap.h>
         ^~~~~~~~
1 error generated.
compiling sender.
sender.c:5:10: fatal error: 'pcap.h' file not found
#include <pcap.h>
         ^~~~~~~~
1 error generated.
compiling mapInt.
compiling rawInt.
compiling tapInt.
compiling bundle.
compiling vlan.
compiling hdlcInt.
compiling stdLin.
compiling ttyLin.
compiling modem.
compiling ptyRun.
compiling dummyCon.
compiling daemonRun.



On Thu, Jan 5, 2023 at 12:56 PM mc36 <> wrote:
hi,
nevermind about recompiling.... i've made every error (except the memory allocations) to warning with the below change:
https://github.com/rare-freertr/freeRtr/commit/a59b34ecaa14ad276267cb0f5542678c219b0d71
as far as i know the fedora is daily rebuilds itself automatically, so just wait a day and upgrade afterwards...
br,
cs


On 1/5/23 16:46, mc36 wrote:
> hi,
> let's dissect this again to two prats... the systemctl output is fully eal errors...
> messages starting with eal are from the dpdk... its quite cryptic but finally it starts,
> i know this becasue the final message is from p4dpdk noting that it needs at least 2 ports...
> it can be easily that without root, dpdk was not able to grab the nics...
> the second, when you run it by hand is more interesting...
> i recognize a lot of messages from p4dpdk trying to bring up the port then finally it terminates:
> https://github.com/rare-freertr/freeRtr/blob/master/misc/native/p4emu_dpdk.c#L542
> here is my suggestion:
>
> sudo dnf install gcc clang dpdk-dev
> wget freertr.org/rtr.zip
> unzip rtr.zip
> cd misc/native
> editor p4emu_dpdk.c     #comment out the whole line 542 completely containing the message "error setting promiscuous mode"
> ./c.sh
> sudo ../../binTmp/p4dpdk.bin --vdev=net_af_packet1,iface=veth0b -- 127.0.0.1 9080 2
>
> if it starts this way and you'll have the packets finally, i'll make it a warning,
> then you'll have just do your regular update to have it from the daily recompilations...
> thanks,
> cs
>
> On 1/5/23 16:01, Christopher Adigun wrote:
>> No improvement, the interface is still down.
>>
>> I decided to change the user from /*freerouter* /to /*root* /in the systemd file   /usr/lib/systemd/system/freerouter.service, now I get the following error:
>>
>>        freerouter.service - Main process of freerouter
>>            Loaded: loaded (/usr/lib/systemd/system/freerouter.service; disabled; vendor preset: disabled)
>>            Active: active (running) since Thu 2023-01-05 13:19:21 UTC; 4s ago
>>      Main PID: 24397 (java)
>>            CGroup: /system.slice/freerouter.service
>>                                                24397 /usr/lib/jvm/jre-11-openjdk/bin/java -jar /usr/share/java/rtr.jar router /etc/freerouter/rtr-
>>                                                24491 /bin/pcapInt.bin veth0a 19998 127.0.0.1 19999 127.0.0.1
>> Jan 05 13:19:23 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24486]: EAL: Requested device 0000:00:07.0 cannot be used
>> Jan 05 13:19:24 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24486]: TELEMETRY: No legacy callbacks, legacy socket not created
>> Jan 05 13:19:24 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24486]: EAL: Error - exiting with code: 1
>>                                                                                                                                                                                                                                                      Cause:
>> Jan 05 13:19:25 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: EAL: Cannot open VFIO container /dev/vfio/vfio, error 2 (No such file or directory)
>> Jan 05 13:19:25 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: EAL: VFIO support could not be initialized
>> Jan 05 13:19:25 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: EAL: Requested device 0000:00:06.0 cannot be used
>> Jan 05 13:19:25 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: EAL: Requested device 0000:00:07.0 cannot be used
>> Jan 05 13:19:26 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: TELEMETRY: No legacy callbacks, legacy socket not created
>> Jan 05 13:19:26 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: EAL: Error - exiting with code: 1
>>                                                                                                                                                                                                                                                      Cause:
>> Jan 05 13:19:26 ip-172-31-38-199.eu-west-1.compute.internal p4dpdk.bin[24857]: at least 2 ports needed
>>
>> So I decided to run *//bin/p4dpdk.bin --vdev=net_af_packet1,iface=veth0b -- 127.0.0.1 9080 2/* manually and I got the promiscuous error:
>>
>> /*[root@ip-172-31-38-199 log]# /bin/p4dpdk.bin --vdev=net_af_packet1,iface=veth0b -- 127.0.0.1 9080 2*/ EAL: Detected CPU lcores: 8 EAL: Detected NUMA nodes: 1 EAL: Detected
>> shared linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support
>> initialized EAL: Using IOMMU type 8 (No-IOMMU) EAL: Probe PCI driver: net_ena (1d0f:ec20) device: 0000:00:06.0 (socket 0) EAL: Probe PCI driver: net_ena (1d0f:ec20) device:
>> 0000:00:07.0 (socket 0) TELEMETRY: No legacy callbacks, legacy socket not created 8 cores and 3 ports detected... dpdk version: DPDK 21.11.2 openssl version: OpenSSL 1.1.1g FIPS
>> 21 Apr 2020 connecting 127.0.0.1 9080. cpu port is #2 of 3... there will be 0 forwarding only cores... there will be 8191 mbufs, each 2048 bytes, 250 cached... there will be 1024
>> rx and 1024 tx descriptors, 512 tx and 512 fwd mbufs... there will be 32 bursts and maybe 100 sleeps... opening mempool on socket 0... opening port 0 named 0000:00:06.0 on socket
>> 0 on lcore 0 for rx and 0 for tx... devinfo: pmd=net_ena, mtu=128..9216, bufs=64, pktl=9234, rxque=10, txque=8, rxcapa=0000200e, txcapa=0000800e... configuring port: offloads
>> rx=00002000, tx=00008000, pktlen=2048 EAL: Error - exiting with code: 1 Cause: error setting promiscuous mode
>>
>> N.B - I have tested the dpdk interfaces in VPP and it works.
>>
>
>
>
>
>
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#931) | | | Mute This Topic | New Topic
Your Subscription | | Unsubscribe []

_._,_._,_



Archive powered by MHonArc 2.6.19.

Top of Page