Skip to contentSkip to conversation

BPF: Linking error in librte_bpf

dpdk-dev [email protected] 1 participant 2 messages May 18, 2019 – May 20, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=281

            Bug ID: 281
           Summary: BPF: Linking error in librte_bpf
           Product: DPDK
           Version: 19.08
          Hardware: x86
                OS: Linux
            Status: CONFIRMED
          Severity: normal
          Priority: Normal
         Component: testpmd
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

I've downloaded DPDK from the git repository (19.08-rc0), installed libelf and libelf-dev, enabled CONFIG_RTE_LIBRTE_BPF_ELF in config/common_base, made config for target "x86_64-native-linuxapp-gcc", and built it. My machine is running Ubuntu 18.04.1. Then, I ran the following commands:

$ cd $RTE_SDK/$RTE_TARGET/app/
$ sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
[INITIALIZATION MESSAGES]

testpmd> bpf-load rx 0 0 - /home/michel/git/latest_dpdk/examples/bpf/t1.o rte_bpf_elf_load() is not supported with current config rebuild with libelf installed
-95:Operation not supported

Investigating this issue, I've found that it is a linking error since function rte_bpf_elf_load() is being mapped to bpf_load.o instead of bpf_load_elf.o:

$ grep ^rte_bpf_elf_load x86_64-native-linuxapp-gcc/app/testpmd.map 
rte_bpf_elf_load                                 
/home/michel/test_latest_dpdk/dpdk/x86_64-native-linuxapp-gcc/lib/librte_bpf.a(bpf_load.o)

I also noticed that file bpf_load_elf.o after file bpf_load.o in librte_bpf.a:

$ ar t build/lib/librte_bpf.a
bpf.o
bpf_exec.o
bpf_load.o
bpf_pkt.o
bpf_validate.o
bpf_load_elf.o
bpf_jit_x86.o
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=281

Michel Machado ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Michel Machado ([email protected]) --- I've followed your steps and it worked. I don't know what I did wrong when I was testing it.

I'm sorry for bothering you. Thank you for your help.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.