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

xdp_vlan01_kern.c:66:2: error: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Werror,-Wpass-failed=transform-warning] #411

Open
NobinPegasus opened this issue Mar 26, 2024 · 4 comments

Comments

@NobinPegasus
Copy link

When I try to compile the codes the xdp_vlan01_kern.c uses #pragma unroll, it throws error.

    CC       xdp_prog_user
    CLANG    xdp_prog_kern_02.o
    LLC      xdp_prog_kern_02.o
    CLANG    xdp_prog_kern_03.o
    LLC      xdp_prog_kern_03.o
    CLANG    tc_reply_kern_02.o
    LLC      tc_reply_kern_02.o
    CLANG    xdp_vlan01_kern.o
xdp_vlan01_kern.c:66:2: error: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Werror,-Wpass-failed=transform-warning]
   66 |         for (i = 0; i < VLAN_MAX_DEPTH; i++) {
      |         ^
1 error generated.
make: *** [../common/common.mk:116: xdp_vlan01_kern.o] Error 1

I'm using the latest clang

pegasus@pegasus:~/Documents/xdp-tutorial/packet-solutions$ clang --version
clang version 19.0.0git (https://github.com/llvm/llvm-project.git 815644b4dd882ade2e5649d4f97c3dd6f7aea200)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/pegasus/Documents/llvm-project/build/bin
@tohojo
Copy link
Member

tohojo commented Apr 12, 2024 via email

@SailorStu
Copy link

Reducing VLAN_MAX_DEPTH from 10 to 2 (QinQ) is a workaround. Do we really need 10 of these iterations unrolled?

@tohojo
Copy link
Member

tohojo commented May 8, 2024 via email

@Gloway17
Copy link

Gloway17 commented Jun 6, 2024

I also had this problem, but when I changed the clang version to 17, it was solved.

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

4 participants