Bug 393
Summary: | rte_zmalloc_socket does not zero memory | ||
---|---|---|---|
Product: | DPDK | Reporter: | xkr (pavel.krauz) |
Component: | core | Assignee: | Anatoly Burakov (anatoly.burakov) |
Status: | UNCONFIRMED --- | ||
Severity: | major | CC: | thomas |
Priority: | Normal | ||
Version: | 19.11 | ||
Target Milestone: | --- | ||
Hardware: | x86 | ||
OS: | Linux |
Description
xkr
2020-02-07 11:18:05 CET
rte_zmalloc does not, by itself, zero memory. This is done for performance reasons - memory is more often allocated than deallocated, and we get zero'ed memory from the kernel when we first hit the page, so DPDK will only zero out memory on rte_free(). This means that in practice rte_zmalloc will still give you zero'ed out memory, because that memory is necessarily either 1) fresh from the kernel and thus doesn't need to be zeroed out, or 2) has been previously freed and thus was zeroed out. There is a config option to enable this behavior, but normally it is not necessary. If there are circumstances where memory isn't zeroed out properly, that is a bug in rte_free and should be investigated. What is "degramgentation" that you are referring to? Hi, defragementation refers to IP defragmentation functions from librte_ip_frag.a essentially I am saying that librte_ip_frag.a function rte_ip_frag_table_create does not get zeroed memory from rte_zmalloc_socket and program crashes when calling some of the functions from librte_ip_frag.a. Can you reproduce the issue with DPDK's malloc autotest? Hi, can you tell me where I get it and how to run it? Hi, If you have compiled DPDK from source, the test app should be in the build tree. If you have got it from a distribution, the test application may or may not be there (i am not very familiar with how DPDK is packaged). |