STRUCT NFP_CPP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct nfp_cpp(9) β€” the kernel API manual, bestie edition πŸ’–

okay so this is struct nfp_cpp, the main nfpcore device structure, and here's the tea: the following fields are read-only after probe() exits or netdevs are spawned. no cap, don't touch 'em after that. 🫢


✨ SYNOPSIS ✨

like, the whole shape of it:

struct nfp_cpp {
    struct device dev;
    void *priv;
    u32 model;
    u16 interface;
    u8 serial[NFP_SERIAL_LEN];
    const struct nfp_cpp_operations *op;
    struct list_head resource_list;
    rwlock_t resource_lock;
    wait_queue_head_t waitq;
    u32 imb_cat_table[16];
    unsigned int mu_locality_lsb;
    struct mutex area_cache_mutex;
    struct list_head area_cache_list;
 };

πŸŽ€ Members πŸŽ€

bestie, let's go field by field, i'm obsessed with each one:

  • dev β€” the embedded device structure. it's literally in there. main character energy. πŸ‘‘
  • priv β€” private data of the low-level implementation. mysterious. iykyk. πŸ™ˆ
  • model β€” chip model. which chip are we even dealing with πŸ’…
  • interface β€” chip interface id we are using to reach it. the ~connection~ ✨
  • serial β€” chip serial number. every chip's lil ID πŸ“
  • op β€” low-level implementation ops. the actual doing-stuff part 🌸
  • resource_list β€” NFP CPP resource list. a whole list of resources, slay πŸ“‹
  • resource_lock β€” protects resource_list. bodyguard behavior fr fr πŸ›‘οΈ
  • waitq β€” area wait queue. the queue is waiting, be patient 😭
  • imb_cat_table β€” CPP Mapping Table. yes it's a u32 array of 16, periodt πŸ—ΊοΈ
  • mu_locality_lsb β€” MU access type bit offset. bit offset core 🧚
  • area_cache_mutex β€” protects area_cache_list. another bodyguard, we stay protected πŸ’œ
  • area_cache_list β€” cached areas for cpp/xpb read/write speed up. speed. it's giving efficiency πŸ”₯

πŸ’… Description πŸ’…

the following fields use explicit locking:

lowkey that's all it says, bestie β€” no list of which fields, no extra deets. it just says explicit locking and moves on. iconic brevity honestly. πŸ’€

🌈 SEE ALSO 🌈

the kernel file lives here, go look at it if you want the full lore:

./drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c

and now the whole friend group, in order, no one left out, all of them tagged 🫢:

nfp_cpp_free(9), nfp_cpp_model(9), nfp_cpp_interface(9), nfp_cpp_serial(9), nfp_cpp_area_alloc_with_name(9), nfp_cpp_area_alloc(9), nfp_cpp_area_alloc_acquire(9), nfp_cpp_area_free(9), nfp_cpp_area_acquire(9), nfp_cpp_area_acquire_nonblocking(9), nfp_cpp_area_release(9), nfp_cpp_area_release_free(9), nfp_cpp_area_read(9), nfp_cpp_area_write(9), nfp_cpp_area_size(9), nfp_cpp_area_name(9), nfp_cpp_area_priv(9), nfp_cpp_area_cpp(9), nfp_cpp_area_resource(9), nfp_cpp_area_phys(9), nfp_cpp_area_iomem(9), nfp_cpp_area_readl(9), nfp_cpp_area_writel(9), nfp_cpp_area_readq(9), nfp_cpp_area_writeq(9), nfp_cpp_area_fill(9), nfp_cpp_area_cache_add(9), nfp_cpp_read(9), nfp_cpp_write(9), nfp_xpb_readl(9), nfp_xpb_writel(9), nfp_xpb_writelm(9), nfp_cpp_from_operations(9), nfp_cpp_priv(9), nfp_cpp_device(9), nfp_cpp_explicit_acquire(9), nfp_cpp_explicit_set_target(9), nfp_cpp_explicit_set_data(9), nfp_cpp_explicit_set_signal(9), nfp_cpp_explicit_set_posted(9), nfp_cpp_explicit_put(9), nfp_cpp_explicit_do(9), nfp_cpp_explicit_get(9), nfp_cpp_explicit_release(9), nfp_cpp_explicit_cpp(9), nfp_cpp_explicit_priv(9)


and that's the whole page, bestie ✨ this lil gem comes from the source path ./drivers/net/ethernet/netrono... (yes it really truncates like that, crying 😭) and it's dated October 2026, under the manual name struct nfp_cpp(9) πŸ’– go forth and read them areas, mwah πŸŽ€

πŸ“¦ where this page comes from