Implement m_getm2(), which is widely used via m_getm() macro, as a wrapper
around mc_get(). New code is advised to use mc_get().
Details
- Reviewers
tuexen markj - Group Reviewers
transport network - Commits
- rG71f8702f49a7: mbuf: provide mc_get() that allocates struct mchain of given length
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 56647 Build 53535: arc lint + arc unit
Event Timeline
sys/kern/kern_mbuf.c | ||
---|---|---|
1454 | Please don't have len and length in the same function. | |
1469 | Please explain the reason inline, e.g., "this avoids blocking if the jumbop zone is exhausted, for example by an ongoing DoS." Code comments should be self-contained. | |
sys/sys/mbuf.h | ||
1762 | Keep these alphabetically sorted? It'd also be a bit neater to put these after all of the mc_ inline function definitions. |
sys/kern/kern_mbuf.c | ||
---|---|---|
1469 | To be fair I don't full agree with what had been done in 796d4eb89e2c, although I'm listed as reviewer. It addresses a specific problem that appeared under specific conditions with specific hardware configuration. It won't work if a NIC driver used 2k mbufs to fill rings. It won't work if limits set on 4k and 2k zones were configured differently. The new mc_get() would be git blamed fully to my name, but I want to redirect people who question the M_NOWAIT into the proper place where this M_NOWAIT comes from. So I ended up with providing a full sentence as you suggest, but kept external reference, too. |
sys/kern/kern_mbuf.c | ||
---|---|---|
1502 | IMO it would be nice to provide mc_first() and mc_last() accessors. |