fbnic_tlv_attr_put_value(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– fbnic_tlv_attr_put_value β€” the one that adds your data to the message πŸ’–

okay so bestie, welcome to the kernel API manual for fbnic_tlv_attr_put_value πŸ’… this is a kernel API page and honestly? she's giving "quiet little helper that keeps everything aligned" and we respect her for it. ✨


🌸 NAME 🌸

fbnic_tlv_attr_put_value β€” add data to a message 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int fbnic_tlv_attr_put_value (struct fbnic_tlv_msg *msg , const u16
attr_id , const void *value , const int len );

like, that's the whole signature, no notes, copy it exactly, periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • msg β€” the message header we're adding this flag attribute to. it's the main character of this whole operation ngl πŸ‘‘
  • attr_id β€” the ID of the flag attribute we're adding to the message, iykyk 🏷️
  • value β€” a pointer to the data that's gonna get stored πŸ’Ύ
  • len β€” the size of the data to be stored, fr fr πŸ“

⭐ RETURN ⭐

okay so the vibe check on the return value:

  • -ENOSPC β€” returned if there's literally no room for the attribute 😭 like the message said "no more, I'm full"
  • 0 β€” otherwise. that's it. that's the whole deal. slay ✨

πŸ”₯ DESCRIPTION πŸ”₯

so what she does is add the header and copy the data pointed to by value into the message πŸ’– and then β€” this is the iconic part β€” the result gets rounded up to the nearest DWORD for sizing, so that the headers stay aligned. the way that alignment is preserved? obsessed. πŸ‘‘

the assumption here (and this is important, bestie, don't skip it) is that the value field is in a format where byte ordering can be guaranteed, like a byte array or a little endian format. no cap, that's a real assumption, not a suggestion πŸ™ˆ

⚠️ heads up: if your data doesn't have guaranteed byte ordering, this function is assuming things about it. read the above line again, bestie, it's doing the heavy lifting 🫢

🌈 SEE ALSO 🌈

the whole friend group, in order πŸ’œ:

Kernel file ./drivers/net/ethernet/meta/fbnic/fbnic_tlv.c


πŸ’« that's the whole page, bestie πŸ’« this one came from ./drivers/net/ethernet/meta/fbnic and it's dated October 2026 β€” go off, October 2026, we love a timestamped queen πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from