It will be used for the upcoming LRO hash table initialization. And probably will be useful in other cases, when M_WAITOK can't be used.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/sys/systm.h | ||
---|---|---|
193 | I think you can drop the comment for the variable in the prototype as that isn't typical style in FreeBSD. There is a manpage for hashinit/phashinit that should be updated for this new function as well. That is where the meaning of the flags argument should be documented instead. |
sys/kern/subr_hash.c | ||
---|---|---|
111 | To my taste, the new name is too long. We often call such enhanced functions e.g. phashinit1(). I understand that you just copied what was done to hashinit. | |
130 | You wrote the assert expression in very compact way. Why spend 4 lines to translate flags ? m_flags = (flags & HASH_NOWAIT) != 0 ? M_NOWAIT : M_WAITOK; |
Comment Actions
Maybe as a followup fix hashinit_flags() to not duplicate the malloc and instead use the logic you used in phashinit_flags(). That's optional though (and I wouldn't include it as part of this change).