dpsw_fdb_dump(9)
π dpsw_fdb_dump β bestie, let's dump that FDB table π
okay so this is a page from the Kernel API Manual (section 9, kernel developer vibes β¨) and it's literally all about dpsw_fdb_dump. yes we're doing kernel networking today, put your hair up, we got this π
πΈ NAME πΈ
dpsw_fdb_dump β Dump the content of FDB table into memory. that's it, that's the whole gig π
β¨ SYNOPSIS β¨
int dpsw_fdb_dump (struct fsl_mc_io *mc_io , u32 cmd_flags , u16 token ,
u16 fdb_id , u64 iova_addr , u32 iova_size , u16 *num_entries );
like, seven arguments bestie. seven. but we're gonna get through them together π«Ά
π¦ ARGUMENTS π¦
mc_ioβ Pointer to MC portal's I/O object. this is your little doorway into the management complex, don't lose it πcmd_flagsβ Command flags; one or more of'MC_CMD_FLAG_'. pick your flags, own your flags πtokenβ Token of DPSW object. the DPSW's little name tag πfdb_idβ Forwarding Database Identifier. which FDB we're dumping, iykykiova_addrβ Data will be stored here as an array ofstruct fdb_dump_entry. this is where the good stuff lands β¨iova_sizeβ Memory size allocated atiova_addr. gotta tell it how much room it has, be a considerate bestienum_entriesβ Number of entries written atiova_addr. it reports back how many it actually wrote, slay π
π₯ RETURN π₯
Completion status. '0' on Success; Error code otherwise. so if you get 0 you're iconic, anything else is a vibe check failure π
π DESCRIPTION π
okay so listen close, this part lowkey matters π
The memory allocated at iova_addr must be initialized with zero before command execution. not optional, not "if you feel like it" β zero it out first, fr fr.
If the FDB table does not fit into memory, MC will stop after the memory is filled up. no cap, it just gives up when it runs out of room π
The struct fdb_dump_entry array must be parsed until the end of memory area or until an entry with mac_addr set to zero is found. so like, two ways to know you're done β either you hit the end of the buffer, or you hit that zero-mac_addr sentinel. that's your stopping condition, bestie π
π SEE ALSO π
Kernel file ./drivers/net/ethernet/freescale/dpaa2/dpsw.c plus the whole friend group π:
dpsw_open(9)dpsw_close(9)dpsw_enable(9)dpsw_disable(9)dpsw_reset(9)dpsw_set_irq_enable(9)dpsw_set_irq_mask(9)dpsw_get_irq_status(9)dpsw_clear_irq_status(9)dpsw_get_attributes(9)dpsw_if_set_link_cfg(9)dpsw_if_get_link_state(9)dpsw_if_set_tci(9)dpsw_if_get_tci(9)dpsw_if_set_stp(9)dpsw_if_get_counter(9)dpsw_if_enable(9)dpsw_if_disable(9)dpsw_if_get_attributes(9)dpsw_if_set_max_frame_length(9)dpsw_vlan_add(9)dpsw_vlan_add_if(9)dpsw_vlan_add_if_untagged(9)dpsw_vlan_remove_if(9)dpsw_vlan_remove_if_untagged(9)dpsw_vlan_remove(9)dpsw_fdb_add(9)dpsw_fdb_remove(9)dpsw_fdb_add_unicast(9)dpsw_fdb_remove_unicast(9)dpsw_fdb_add_multicast(9)dpsw_fdb_remove_multicast(9)dpsw_ctrl_if_get_attributes(9)dpsw_ctrl_if_set_pools(9)dpsw_ctrl_if_set_queue(9)dpsw_get_api_version(9)dpsw_if_get_port_mac_addr(9)dpsw_ctrl_if_enable(9)dpsw_ctrl_if_disable(9)dpsw_set_egress_flood(9)dpsw_if_set_learning_mode(9)dpsw_acl_add(9)dpsw_acl_remove(9)dpsw_acl_add_if(9)dpsw_acl_remove_if(9)dpsw_acl_prepare_entry_cfg(9)dpsw_acl_add_entry(9)dpsw_acl_remove_entry(9)dpsw_set_reflection_if(9)dpsw_if_add_reflection(9)dpsw_if_remove_reflection(9)dpsw_lag_set(9)dpsw_if_set_lag_state(9)
and that's the whole page bestie π«Ά zero the buffer, parse till the sentinel, collect your 0, move on. main character kernel dev energy only π
kisses and goodnight from ./drivers/net/ethernet/freesca... πΈ β source/version vibes landing October 2026, page dpsw_fdb_dump(9), 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