[dpdk-dev] net/octeontx: register fpa as platform HW mempool

Message ID 20180122154507.14617-1-pbhagavatula@caviumnetworks.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Pavan Nikhilesh Jan. 22, 2018, 3:45 p.m. UTC
  Register octeontx-fpavf as platform HW mempool when net/octeontx pmd is
used.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---

 This patch depends on http://dpdk.org/dev/patchwork/patch/34239 patchset.

 drivers/net/octeontx/octeontx_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.16.0
  

Comments

Ferruh Yigit Jan. 31, 2018, 7:51 p.m. UTC | #1
On 1/22/2018 3:45 PM, Pavan Nikhilesh wrote:
> Register octeontx-fpavf as platform HW mempool when net/octeontx pmd is
> used.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
> 
>  This patch depends on http://dpdk.org/dev/patchwork/patch/34239 patchset.

This patch was waiting dependent patch, which seems merged now.

But now because of "__rte_experimental" tag in
rte_mbuf_set_platform_mempool_ops() that this patch uses getting build errors [1].

Need to add a special note to pmd makefile to allow experimental API usage:
CFLAGS += -DALLOW_EXPERIMENTAL_API



[1]
...dpdk/drivers/net/octeontx/octeontx_ethdev.c:1330:2: error:
'rte_mbuf_set_platform_mempool_ops' is deprecated: Symbol is not yet part of
stable ABI [-Werror,-Wdeprecate
d-declarations]


        rte_mbuf_set_platform_mempool_ops("octeontx_fpavf");
        ^

...dpdk/x86_64-native-linuxapp-clang/include/rte_mbuf_pool_ops.h:37:5: note:
'rte_mbuf_set_platform_mempool_ops' has been explicitly marked deprecated here
int __rte_experimental

    ^


...dpdk/x86_64-native-linuxapp-clang/include/rte_compat.h:107:16: note: expanded
from macro '__rte_experimental'

__attribute__((deprecated("Symbol is not yet part of stable ABI"), \
               ^

1 error generated.
  

Patch

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index adca3435e..2b4a07d2b 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -16,6 +16,7 @@ 
 #include <rte_dev.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
+#include <rte_mbuf_pool_ops.h>
 #include <rte_prefetch.h>
 #include <rte_bus_vdev.h>

@@ -1326,6 +1327,7 @@  octeontx_probe(struct rte_vdev_device *dev)
 		res = -ENOTSUP;
 		goto parse_error;
 	}
+	rte_mbuf_set_platform_mempool_ops("octeontx_fpavf");
 	probe_once = 1;

 	return 0;