Skip to content

m_gethdr will call m_pkthdr_init also, so there is no need to initialize it again#861

Merged
jfb8856606 merged 1 commit intoF-Stack:devfrom
liujinhui-job:fstack-delete-mbuf-double-init
Mar 3, 2025
Merged

m_gethdr will call m_pkthdr_init also, so there is no need to initialize it again#861
jfb8856606 merged 1 commit intoF-Stack:devfrom
liujinhui-job:fstack-delete-mbuf-double-init

Conversation

@liujinhui-job
Copy link
Copy Markdown
Contributor

m_gethdr use zone_mbuf.
In mbuf_init function

static void
mbuf_init(void *dummy)
{
zone_mbuf = uma_zcreate(MBUF_MEM_NAME, MSIZE,
mb_ctor_mbuf, mb_dtor_mbuf, NULL, NULL,
MSIZE - 1, UMA_ZONE_CONTIG | UMA_ZONE_MAXBUCKET);
..
}
The mb_ctor_mbuf is uma constructor‌‌ callback

@jfb8856606
Copy link
Copy Markdown
Contributor

Thanks very much for CR.

@jfb8856606 jfb8856606 merged commit 8346014 into F-Stack:dev Mar 3, 2025
@liujinhui-job liujinhui-job deleted the fstack-delete-mbuf-double-init branch March 12, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants