- /* Allocate memory to store the LPM data structures. */
- if (mem_location == RTE_LPM_MEMZONE) {
- const struct rte_memzone *mz;
- uint32_t mz_flags = 0;
-
- mz = rte_memzone_reserve(mem_name, mem_size, socket_id,
- mz_flags);
- if (mz == NULL) {
- RTE_LOG(ERR, LPM, "LPM memzone creation failed\n");
- return NULL;
- }
-
- memset(mz->addr, 0, mem_size);
- lpm = (struct rte_lpm *) mz->addr;