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

How to fix linux kernel don't trigger tx_ring #95

Open
xjj210130 opened this issue Aug 1, 2023 · 1 comment
Open

How to fix linux kernel don't trigger tx_ring #95

xjj210130 opened this issue Aug 1, 2023 · 1 comment

Comments

@xjj210130
Copy link

xjj210130 commented Aug 1, 2023

HI all:
My env is centos 7. core is 5.15.46 (build by myself) gcc 11.2.1 clang 14.0.6 llvm 14.0.6 bpftool is v5.15.46. I use bpf_redirect(redirectIfindex, 0);

to redirect packet. The para redirectIfindex is index network(sfp2).
However, i see there is no packet sent.
cat /sys/class/net/sfp2/statistics/tx_packets
The number is the same.

when i use xdp SKB model , the number change. But when i use NATIVE model, the number is the same. i build AF_XDP config

I use xdpdump/tcpdump to capture packet. There is no packet sent.
Is it any way to fix it ? Thanks

@sachintiptur
Copy link
Contributor

Then your NIC driver doesn't support xdp hook i guess. AF_XDP is for sending pkts to user space.

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

2 participants