cxgb4_best_aligned_mtu(9)
π cxgb4_best_aligned_mtu(9) β the Kernel API Manual, bestie edition π
okay so this is a kernel API manual page, and the function is cxgb4_best_aligned_mtu(9). yes the manual name goes there, we're not copying the header line, we're just casually mentioning it like it's the main character. periodt. β¨
β¨ NAME β¨
cxgb4_best_aligned_mtu β find the best MTU, [hopefully] data size aligned π¦
like that's literally the whole vibe of this function. it wants to find you the best MTU and it hopes the data size lines up. ngl the "hopefully" is sending me π
πΈ SYNOPSIS πΈ
unsigned int cxgb4_best_aligned_mtu (const unsigned short *mtus ,
unsigned short header_size , unsigned short data_size_max , unsigned
short data_size_align , unsigned int *mtu_idxp );
she takes five arguments and returns an unsigned int. we stan a function with a full roster. π
π ARGUMENTS π
mtusβ the HW MTU table, aka the sacred list.const unsigned short *mtus, do not touch, just read, bestie.header_sizeβ header size. that's it. that's the whole thing.unsigned short header_size. β¨data_size_maxβ the maximum Data Segment Size, i.e. the biggest the data chunk is allowed to be.unsigned short data_size_max.data_size_alignβ the desired Data Segment Size Alignment, expressed as 2^N (unsigned short data_size_align). we love a power-of-two moment. πmtu_idxpβ the HW MTU Table Index return value pointer, and listen, it is possibly NULL (unsigned int *mtu_idxp). so like, handle that. π
π DESCRIPTION π
okay so it's similar to cxgb4_best_mtu, but here's the twist that makes her iconic: instead of searching the Hardware MTU Table based solely on a Maximum MTU parameter, we break that parameter up into a Header Size and a Maximum Data Segment Size, and we provide a desired Data Segment Size Alignment. it's giving "let's be more specific about what we actually want." π
and then, if we find an MTU in the Hardware MTU Table which will result in a Data Segment Size with the requested alignment _and_ that MTU isn't "too far" from the closest MTU, then we'll return that one rather than the closest MTU. so it's not just "closest wins" β the aligned one gets the crown if it's not being extra about it. π
lowkey the whole function is a vibe check on MTUs: alignment β plus proximity β equals the winner. no cap. π₯
π«Ά SEE ALSO π«Ά
- Kernel file
./drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.cβ yes that exact path, character for character, don't come for me. π cxgb4_change_mac(9)cxgb4_write_rss(9)setup_rss(9)setup_sge_queues(9)cxgb4_set_rspq_intr_params(9)cxgb4_create_server(9)cxgb4_best_mtu(9)β her cousin!! the one mentioned in DESCRIPTION!! π₯Ήcxgb4_port_chan(9)cxgb4_port_e2cchan(9)cxgb4_port_viid(9)cxgb4_port_idx(9)cxgb_up(9)
that's the whole friend group, fr fr. go read them too. π
alright bestie, that's the page!! signature check: this one lives at ./drivers/net/ethernet/chelsio... in the source, dated October 2026, and it's the manual for cxgb4_best_aligned_mtu(9). mwah, go forth and align ur data segments πβ¨π
π¦ 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