Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Pktgen rnd to send packets, the port did not change. #281

Open
wangjun0728 opened this issue Aug 27, 2024 · 3 comments
Open

Using Pktgen rnd to send packets, the port did not change. #281

wangjun0728 opened this issue Aug 27, 2024 · 3 comments

Comments

@wangjun0728
Copy link

version:Pktgen 23.06.1 DPDK 23.07.0

Packet capture shows that the L4 ports are fixed, with src port 1234 and dst port 5678.
Is this an issue with how I'm using it, or is there a bug in the code? When I use range mode, the L4 port changes correctly.

  mkdir -p /hugepag_2M
  umount /hugepages
  mount | grep huge
  mount -t hugetlbfs none /hugepag_2M -o pagesize=2MB
     
  mkdir -p /hugepages
  mount -t hugetlbfs hugetlbfs /hugepages
  echo 12288 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
  modprobe uio_pci_generic
  insmod /root/dpdk-tool/dpdk-kmods/linux/igb_uio/igb_uio.ko
  ifconfig eth1 0
  /root/dpdk-tool/dpdk/usertools/dpdk-devbind.py  -b igb_uio 0000:03:02.0
      
  export LD_LIBRARY_PATH=export LD_LIBRARY_PATH=/root/dpdk-tool/dpdk/dpdk-install/lib64
  /root/dpdk-tool/Pktgen-DPDK-pktgen-23.06.1/Builddir/app/pktgen -c 0xffff  --   -m [1-15:1-15].0
  enable 0 random
  set 0 rnd 0 34 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  set 0 src mac 0e:71:44:d8:57:d7
  set 0 src ip 10.0.0.7/32
  set 0 dst mac 06:87:a8:2b:9e:a3
  set 0 dst ip 10.0.0.10
  set 0 proto udp
  set 0 size 16
  start 0
@KeithWiles
Copy link
Collaborator

OK, I some how got delete happy and removed the call to set the random bits :-(

Please checkout the branch fix-random-issue and let me know if that fixes the problem.

@wangjun0728
Copy link
Author

Thank you very much for your changes. I'm not able to easily switch to the latest version. Could you confirm if the same issue exists in Pktgen version 23.06.1? I noticed there are still quite a few differences from the latest code.
Additionally, after analyzing the changes in your branch fix-random-issue, shouldn't the checksum be recalculated after applying the random number modifications? Otherwise, the checksum might be incorrect, right?

@pktgen
Copy link
Owner

pktgen commented Sep 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants