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

So Slow with AF_XDP code ? #425

Open
samueljaydan opened this issue May 31, 2024 · 0 comments
Open

So Slow with AF_XDP code ? #425

samueljaydan opened this issue May 31, 2024 · 0 comments

Comments

@samueljaydan
Copy link

When I get the codes and use them directly, I run the code with the following iptables rules. Then the pages open very slowly. For example, the speedtest page opens, but it starts calculating after 1 minute or so. When I close the code, there is no problem with direct internet output. What could be the reasons for this?

iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o enp2s0 -j ​​SNAT --to-source 10.10.1.254

4: enp3s0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 xdp qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 10:02:02:44:4e:9e brd ff:ff:ff:ff:ff:ff
    prog/xdp id 150 name xdp_sock_prog tag 85660fbfaf1d42c0 jited 
4: enp3s0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 xdp/id:150 qdisc mq state UP group default qlen 1000
    link/ether 10:02:02:44:4e:9e brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.254/24 brd 192.168.11.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::1202:2ff:fe44:4e9e/64 scope link 
       valid_lft forever preferred_lft forever
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

1 participant