dpsw_fdb_add_unicast(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dpsw_fdb_add_unicast(9) β€” the Kernel API Manual, section 9, bestie ✨

Okay so picture this: you're deep in the kernel API manual (section 9, obviously), and you stumble onto dpsw_fdb_add_unicast. That's the function's whole name and title, and yes, we're gonna say it out loud every time because it slays.


🌸 NAME 🌸

dpsw_fdb_add_unicast β€” this function adds an unicast entry into the MAC lookup table. That's it. That's the vibe. πŸ’–


✨ SYNOPSIS ✨

int dpsw_fdb_add_unicast (struct fsl_mc_io *mc_io , u32 cmd_flags , u16
token , u16 fdb_id , const struct dpsw_fdb_unicast_cfg *cfg );

Like, look at that signature. Gorgeous. Returns an int, takes five things, we'll get to each one, don't panic 🫢


πŸŽ€ ARGUMENTS πŸŽ€

Every single one, no skipping, periodt:

  • mc_io β€” Pointer to MC portal's I/O object. Yeah, a pointer, it's giving main character energy.
  • cmd_flags β€” Command flags; one or more of 'MC_CMD_FLAG_'. Note the trailing underscore bestie, that's intentional, don't come for me.
  • token β€” Token of DPSW object. It's a u16 and it's your little object ID badge πŸ’…
  • fdb_id β€” Forwarding Database Identifier. Your FDB gets an id, and this is it.
  • cfg β€” Unicast entry configuration. It's a const struct dpsw_fdb_unicast_cfg * and it holds the actual entry details, so fill it in before you call, mwah.

πŸ”₯ RETURN πŸ”₯

Completion status. '0' on Success; Error code otherwise. That's the whole story β€” zero means slay, anything else means go read your error code 😭


πŸ¦‹ SEE ALSO πŸ¦‹

The kernel file lives at ./drivers/net/ethernet/freescale/dpaa2/dpsw.c and honestly it's related to basically the entire DPSW friend group. Full list, every last one, here we go:

Like, that's a whole squad. Go read them, iykyk πŸ’œ


Ngl this page is short and sweet β€” one function, one job, one MAC lookup table entry. But the see-also list is a whole friend group so don't say I didn't warn you 🫢

And that's the page, bestie! This little gem came from ./drivers/net/ethernet/freesca... (yeah, the footer truncates it exactly like that, iconic) and it's dated October 2026. Stan. πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from