[dpdk-dev] [PATCH v3 1/4] mempool: add external mempool manager support
Yuanhan Liu
yuanhan.liu at linux.intel.com
Tue Apr 12 00:52:21 CEST 2016
Hi David,
On Wed, Mar 09, 2016 at 09:50:34AM +0000, David Hunt wrote:
> -static struct rte_tailq_elem rte_mempool_tailq = {
> +struct rte_tailq_elem rte_mempool_tailq = {
Why removing static? I didn't see it's referenced somewhere else.
> + if (flags && MEMPOOL_F_INT_HANDLER) {
I would assume it's "flags & MEMPOOL_F_INT_HANDLER". BTW, you might want
to do a thorough check, as I found few more typos like this.
--yliu
> + if (flags && MEMPOOL_F_INT_HANDLER) {
> +
> + if (rte_eal_has_hugepages()) {
> + startaddr = (void *)mz->addr;
> + } else {
> + /* align memory pool start address on a page boundary */
> + unsigned long addr = (unsigned long)mz->addr;
> +
> + if (addr & (page_size - 1)) {
> + addr += page_size;
> + addr &= ~(page_size - 1);
> + }
> + startaddr = (void *)addr;
> }
> - startaddr = (void*)addr;
> + } else {
> + startaddr = (void *)mz->addr;
> }
More information about the dev
mailing list