Closed BuzzRage closed 3 years ago
This is not something that we have tested so I'm not sure if it will work. In particular, if you want packets to leave pktgen and go to ONVM that might be tricky since pktgen tries to send directly out the NIC -- I think the packets would have to leave the system, go to a switch, and then be routed back to ONVM (or are you connecting one port directly to the other with a cable?)
In any case, it seems like there is some issue with your pktgen configuration if it will not run even without ONVM. We are preparing an updated release which will include newer versions of both DPDK and pktgen -- if you want to try this out now you can use the develop
branch in this repository. That might help resolve your basic pktgen problems.
To run them together you will need to modify both the pktgen and onvm manager startup script. There are some DPDK flags you need to modify to restrict the process to only allocate a portion of the huge page memory and you need to use the --file-prefix
option so they use different hugetablefs entries. See https://doc.dpdk.org/guides/linux_gsg/linux_eal_parameters.html
I would suggest trying to get pktgen plus a simple DPDK sample application to run (l2fwd). If that works then move on to pktgen + ONVM. I can't think of any reason why ONVM would prevent this setup (although as I mentioned above, I don't think there is an easy way to have the pktgen packets to go ONVM without leaving the machine and coming back).
As a final note, if your goal is simply to generate packets and send them to OVNM you might consider the speed_tester
example using the option to load a PCAP. We also have a load_generator
sample which is more configurable, although I think it had some bugs (maybe we resolved these, I forget).
Thank you for your answer.
I will try to connect one port directly to the other, even if I guess the best way to send packets with pktgen to ONVM is to have 2 machines.
I am able to run pktgen without ONVM, but yes, I still need to read the documentation to understand DPDK configurations. I will test the develop
branch, thank you for your advice !
I will also try to adapt the pktgen and onvm manager startup script to my environment with two different --file-prefix
. Also I realized that I didn't disabled hyperthreading, maybe it's part of the problem.
I already used the speed_tester
NF with .pcap
files, but I'm not sure if packets are simply stored in memory before being played or if they are actually played on a NIC port using the network stack.
I will try your suggestions and post results here, thank you for your time.
Please re-open this if you are still having problems.
Bug Report
Current Behavior Hi, I try to make PktGen works with OpenNetVM on the same machine. This machine has two NIC ports. I would like to generate packet with PktGen on one port, and then forward packets to a distant machine by passing through OpenNetVM and using the second NIC port. Here is dpdk-devbind output:
I'm trying different ways but nothing seems to work. I think I am misunderstanding something.
Expected behavior/code We expect to have a packet generator that sends data to OpenNetVM.
Steps to reproduce I followed the wiki here and I ran the manager with
./go.sh 0,1,2 3 0xF8 -s stdout -v
, I set the correct MAC address in/tools/Pktgen/OpenNetVM-Scripts/pktgen-config.lua
and I ran./run-pktgen.sh 1
but it gives the following error:So I added
--proc-type=secondary
for EAL arguments in this line of./run-pktgen.sh
:(cd "$PKTGEN_HOME" && sudo "$PKTGEN_BUILD" -c 0xff -n 3 "$BLACK_LIST" --proc-type=secondary -- -p 0x1 "$PORT_MASK" -P -m "[1:2].0" -f "$PKTGEN_CONFIG")
and it gaves me another error:I also tried to go directly with this command
sudo -E ./app/x86_64-native-linuxapp-gcc/pktgen -l 3-5 -n 1 --proc-type=secondary -- -P -m "[4:5].0"
in pktgen-dpdk directory but I can't manage to having both PktGen and ONVM work.When I only run
./run-pktgen.sh 1
without OpenNetVM's manager it gives me that:Environment
Possible Solution I know that it is possible to have multiple DPDK application on the same machine. So it might be possible to have PktGen and ONVM on the same machine. I think the problem come from a misunderstanding of EAL configuration (especially core mapping).