fbnic_tlv_attr_put_value(9)
π 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
fbnic_tlv_msg_alloc(9)fbnic_tlv_attr_put_flag(9)__fbnic_tlv_attr_put_int(9)fbnic_tlv_attr_put_mac_addr(9)fbnic_tlv_attr_put_string(9)fbnic_tlv_attr_get_unsigned(9)fbnic_tlv_attr_get_signed(9)fbnic_tlv_attr_get_string(9)fbnic_tlv_attr_nest_start(9)fbnic_tlv_attr_nest_stop(9)fbnic_tlv_attr_parse_array(9)fbnic_tlv_attr_parse(9)fbnic_tlv_msg_parse(9)fbnic_tlv_parser_error(9)fbnic_tlv_test_create(9)fbnic_tlv_parser_test_attr(9)fbnic_tlv_parser_test(9)
π« 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
- 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