STRUCT NFP_APP_BPF(9)
π struct nfp_app_bpf β the bpf app priv structure, bestie
okay so real talk: this page lives in the Kernel API Manual (section 9, kernel internals, iykyk), and it's all about struct nfp_app_bpf β literally the bpf app priv structure. that's the whole NAME. short, sweet, iconic. β¨
πΈ SYNOPSIS πΈ
bestie. look at her. she's gorgeous. copy this exactly, no cap:
struct nfp_app_bpf {
struct nfp_app *app;
struct nfp_ccm ccm;
struct bpf_offload_dev *bpf_dev;
unsigned int cmsg_key_sz;
unsigned int cmsg_val_sz;
unsigned int cmsg_cache_cnt;
struct list_head map_list;
unsigned int maps_in_use;
unsigned int map_elems_in_use;
struct rhashtable maps_neutral;
u32 abi_version;
struct nfp_bpf_cap_adjust_head {
u32 flags;
int off_min;
int off_max;
int guaranteed_sub;
int guaranteed_add;
} adjust_head;
struct {
u32 types;
u32 max_maps;
u32 max_elems;
u32 max_key_sz;
u32 max_val_sz;
u32 max_elem_sz;
} maps;
struct {
u32 map_lookup;
u32 map_update;
u32 map_delete;
u32 perf_event_output;
} helpers;
bool pseudo_random;
bool queue_select;
bool adjust_tail;
bool cmsg_multi_ent;
};
she ate. periodt. π«Ά
β¨ Members β¨
the app-side girlies
appβ backpointer to the app. she knows where she came from πccmβ common control message handler databpf_devβ the BPF offload device handlecmsg_key_szβ size of key in cmsg element arraycmsg_val_szβ size of value in cmsg element arraycmsg_cache_cntβ number of entries to read for caching. she's counting, lowkey π
the map accounting section (very responsible, we love her)
map_listβ list of offloaded mapsmaps_in_useβ number of currently offloaded mapsmap_elems_in_useβ number of elements allocated to offloaded mapsmaps_neutralβ hash table of offload-neutral maps (on pointer)
versioning & vibes
abi_versionβ global BPF ABI version
adjust_head β the adjust head capability π
adjust_head.flagsβ extra flags for adjust headadjust_head.off_minβ minimal packet offset within buffer requiredadjust_head.off_maxβ maximum packet offset within buffer requiredadjust_head.guaranteed_subβ negative adjustment guaranteed possibleadjust_head.guaranteed_addβ positive adjustment guaranteed possible
maps β the map capability block π
maps.typesβ supported map typesmaps.max_mapsβ max number of maps supportedmaps.max_elemsβ max number of entries in each mapmaps.max_key_szβ max size of map keymaps.max_val_szβ max size of map valuemaps.max_elem_szβ max size of map entry (key + value)
helpers β helper addressess for various calls π§
ngl, the original spells it "addressess" and we're keeping it, it's canon now π
helpers.map_lookupβ map lookup helper addresshelpers.map_updateβ map update helper addresshelpers.map_deleteβ map delete helper addresshelpers.perf_event_outputβ output perf event to a ring buffer
the bool girlies π¦
pseudo_randomβ FW initialized the pseudo-random machinery (CSRs)queue_selectβ BPF can set the RX queue ID in packet vectoradjust_tailβ BPF can simply trunc packet size for adjust tailcmsg_multi_entβ FW can pack multiple map entries in a single cmsg
the way this struct has range. main character energy fr fr. π
π SEE ALSO π
go read these next, bestie, they're all family:
- Kernel file
./drivers/net/ethernet/netronome/nfp/bpf/main.h struct nfp_bpf_map(9)struct nfp_bpf_reg_state(9)struct nfp_insn_meta(9)struct nfp_bpf_subprog_info(9)struct nfp_prog(9)struct nfp_bpf_vnic(9)
okay and that's the whole page!! π this one came from ./drivers/net/ethernet/netrono... and it's dated October 2026, so yeah, timestamped and everything π
go off, kernel docs. mwah. ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms