xdp-project / xdp-tutorial

XDP tutorial
2.33k stars 562 forks source link

hiii everyone #426

Open Sadddddss opened 1 month ago

Sadddddss commented 1 month ago

i run t load in packet01 and i have a problem /xdp-tutorial/testenv/testenv.sh: line 454: $#-1: substring expression < 0 . what should i do now :((

KerstinHung commented 4 weeks ago

I met the same problem, and here's how I solved it:

  1. Check if the virtual environment has been set up. $ t status
  2. The error message "line 454: $#-1: substring expression < 0" indicates that there is a missing parameter after t load. $ t load xdp_prog_kern.o Since the t load is based on ./xdp-loader, I refer to the xdp-loader for the parameter.
  3. Check that the eBPF program is actually loaded on the interface (my interface is called test) $ sudo xdp-loader status test