STRUCT NFP_CPP_OPERATIONS(9)
π struct nfp_cpp_operations(9) β like, the NFP CPP operations structure, bestie β¨
okay so picture this: you're deep in the Kernel API Manual, section 9, and you've stumbled onto struct nfp_cpp_operations β the NFP CPP operations structure π. That's the whole vibe. It's a big ol' bundle of function pointers and sizes that tells the NFP CPP bus how to actually do stuff. Iconic. Let's get into it π
β¨ SYNOPSIS β¨
here's the whole struct, character for character, no cap:
struct nfp_cpp_operations {
size_t area_priv_size;
struct module *owner;
int (*init)(struct nfp_cpp *cpp);
void (*free)(struct nfp_cpp *cpp);
int (*read_serial)(struct device *dev, u8 *serial);
int (*get_interface)(struct device *dev);
int (*area_init)(struct nfp_cpp_area *area, u32 dest, unsigned long long address, unsigned long size);
void (*area_cleanup)(struct nfp_cpp_area *area);
int (*area_acquire)(struct nfp_cpp_area *area);
void (*area_release)(struct nfp_cpp_area *area);
struct resource *(*area_resource)(struct nfp_cpp_area *area);
phys_addr_t (*area_phys)(struct nfp_cpp_area *area);
void __iomem *(*area_iomem)(struct nfp_cpp_area *area);
int (*area_read)(struct nfp_cpp_area *area, void *kernel_vaddr, unsigned long offset, unsigned int length);
int (*area_write)(struct nfp_cpp_area *area, const void *kernel_vaddr, unsigned long offset, unsigned int length);
size_t explicit_priv_size;
int (*explicit_acquire)(struct nfp_cpp_explicit *expl);
void (*explicit_release)(struct nfp_cpp_explicit *expl);
int (*explicit_put)(struct nfp_cpp_explicit *expl, const void *buff, size_t len);
int (*explicit_get)(struct nfp_cpp_explicit *expl, void *buff, size_t len);
int (*explicit_do)(struct nfp_cpp_explicit *expl, const struct nfp_cpp_explicit_command *cmd, u64 address);
};
π«Ά MEMBERS π«Ά
okay, member-by-member tour, iykyk πΈ
π¦ the basics
area_priv_sizeβ the size of thenfp_cpp_areaprivate data. like, how much room your lil' area needs for its own stuff πownerβ the owner module, periodt.initβ initialize the NFP CPP bus π₯freeβ free the bus. bye bestie π
π serial + interface
read_serialβ read the serial number into the memory that's provided for it πget_interfaceβ return the CPP interface β¨
π area operations
area_initβ initialize a new NFP CPP area (not serialized! π)area_cleanupβ clean up a NFP CPP area (also not serialized π)area_acquireβ acquire the NFP CPP area (this one is serialized π)area_releaseβ release area (serialized π)area_resourceβ get the resource range of the area (not serialized)area_physβ get the physical address of the area (not serialized)area_iomemβ get the iomem of the area (not serialized)area_readβ perform a read from a NFP CPP area (serialized π)area_writeβ perform a write to a NFP CPP area (serialized π)
lowkey note the serialization thing bestie β the ones marked not serialized are on you to manage, the serialized ones handle their own locking vibe check π
π explicit operations
explicit_priv_sizeβ the size of an explicit's private areaexplicit_acquireβ acquire an explicit areaexplicit_releaseβ release an explicit areaexplicit_putβ write data to send π€explicit_getβ read data received π₯explicit_doβ perform the transaction β
π SEE ALSO π
go read the kernel file, fr fr:
Kernel file ./drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
and your whole friend group of related pages π
NFP_CPP_ID(9)NFP_CPP_ISLAND_ID(9)NFP_CPP_ID_TARGET_of(9)NFP_CPP_ID_TOKEN_of(9)NFP_CPP_ID_ACTION_of(9)NFP_CPP_ID_ISLAND_of(9)NFP_CPP_INTERFACE(9)NFP_CPP_INTERFACE_TYPE_of(9)NFP_CPP_INTERFACE_UNIT_of(9)NFP_CPP_INTERFACE_CHANNEL_of(9)nfp_cppcore_pcie_unit(9)
mwah π this page came from ./drivers/net/ethernet/netrono... and it's dated October 2026 β so like, mark your calendar bestie ποΈβ¨ slay, go write some operations π
π
π¦ 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