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

Bpf firmware compilation #7

Open
petrarce opened this issue Feb 24, 2020 · 3 comments
Open

Bpf firmware compilation #7

petrarce opened this issue Feb 24, 2020 · 3 comments

Comments

@petrarce
Copy link

Hi everyone!

I am trying to compile netronome firmware from scratch, but after i am loading the firmware to the i am not able to load any bpf filter. Loading original firmware doesn't have such a problem.

Here are steps i am performing to compile and load firmware:

  make nic/nic_AMDA0099-0001_2x10.nffw
  cp ./firmware/nffw/nic/nic_AMDA0099-0001_2x10.nffw /opt/netronome/agilio-bpf-firmware/ic_AMDA0099-0001_2x10.nffw
  rmmod nfp
  modprobe nfp

But when i am trying to load ebpf filter i am getting

bpf: bpf(BPF_PROG_LOAD): Invalid argument

Is there something i am missing during compilation?

@mrapson-netronome
Copy link
Contributor

Hi petrarce,

Thanks for your query. I assume you are trying to load the eBPF filter offloaded? The short answer is that Netronome has not made the BPF support open source.

When you build a "nic/nic_AMDA0099-0001_2x10.nffw", you are building the most basic firmware with PF support only. "sriov/nic_AMDA0099-0001_2x10.nffw" provides SRIOV support as well. Each of these firmwares advertises themselves as a different "flavour" or "nfp_app_id" to the nfp.ko module. The nfp_app_id for BPF is 2, see https://github.com/Netronome/nfp-drv-kmods/blob/master/src/nfp_app.h.

Overall, you are probably not doing anything wrong with your building process. The more advanced offloads (BPF and TC for example) have not been open sourced at this time.

@jmalcaraz
Copy link

jmalcaraz commented May 14, 2021

It is clear that the logic for eBPF is already available in the source code. For example, adding the FLAVOUR=bfp in the makefile will enable bfp offloading and it will work if you do not make use of maps. However, it is a shame the complete bpf support with maps has not been released because it makes the usage of the card much less attrative for research purposes. +1 to vote to provide such support as open source.

@mcabranches
Copy link

Hi! Any chances Netronome will make the firmware with BPF support open source?

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