resp.nvs_sect[0].slotcnt);
hv->rxbuf_section_cnt = resp.nvs_sect[0].slotcnt;
- hv->rxbuf_info = rte_calloc("HN_RXBUF_INFO", hv->rxbuf_section_cnt,
- sizeof(*hv->rxbuf_info), RTE_CACHE_LINE_SIZE);
- if (!hv->rxbuf_info) {
+ /*
+ * Pimary queue's rxbuf_info is not allocated at creation time.
+ * Now we can allocate it after we figure out the slotcnt.
+ */
+ hv->primary->rxbuf_info = rte_calloc("HN_RXBUF_INFO",
+ hv->rxbuf_section_cnt,
+ sizeof(*hv->primary->rxbuf_info),
+ RTE_CACHE_LINE_SIZE);
+ if (!hv->primary->rxbuf_info) {
PMD_DRV_LOG(ERR,
"could not allocate rxbuf info");
return -ENOMEM;
error);
}
- rte_free(hv->rxbuf_info);
/*
* Linger long enough for NVS to disconnect RXBUF.
*/