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

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

Checks

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

Commit Message

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

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

 v2 Changes:
 - fixed compilation issues caused by using experimental API in both meson and
 make.

 drivers/net/octeontx/Makefile          | 2 ++
 drivers/net/octeontx/meson.build       | 2 ++
 drivers/net/octeontx/octeontx_ethdev.c | 2 ++
 3 files changed, 6 insertions(+)

--
2.16.0
  

Comments

Santosh Shukla Feb. 5, 2018, 5:41 a.m. UTC | #1
On Sunday 04 February 2018 09:03 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>
> ---

Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
  
Ferruh Yigit Feb. 5, 2018, 10:34 a.m. UTC | #2
On 2/4/2018 3:33 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>
> ---
> 
>  v2 Changes:
>  - fixed compilation issues caused by using experimental API in both meson and
>  make.
> 
>  drivers/net/octeontx/Makefile          | 2 ++
>  drivers/net/octeontx/meson.build       | 2 ++

Meson patches are still going through the Bruce's tree. Can you please make this
two separate patches (not patchset), I can get the driver one and Makefile,
Bruce can get meson one.

Thanks,
ferruh
  
Pavan Nikhilesh Feb. 5, 2018, 10:44 a.m. UTC | #3
On Mon, Feb 05, 2018 at 10:34:00AM +0000, Ferruh Yigit wrote:
> On 2/4/2018 3:33 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>
> > ---
> >
> >  v2 Changes:
> >  - fixed compilation issues caused by using experimental API in both meson and
> >  make.
> >
> >  drivers/net/octeontx/Makefile          | 2 ++
> >  drivers/net/octeontx/meson.build       | 2 ++
>
> Meson patches are still going through the Bruce's tree. Can you please make this
> two separate patches (not patchset), I can get the driver one and Makefile,
> Bruce can get meson one.

Just a heads up doing so would break meson build on next-net branch.
Will split the patches and resend them.

>
> Thanks,
> ferruh

Thanks,
Pavan.
  
Bruce Richardson Feb. 5, 2018, 11:44 a.m. UTC | #4
On Sun, Feb 04, 2018 at 09:03:09PM +0530, Pavan Nikhilesh wrote:
> Register octeontx-fpavf as platform HW mempool when net/octeontx pmd is
> used.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
> 
>  v2 Changes:
>  - fixed compilation issues caused by using experimental API in both meson and
>  make.
> 
>  drivers/net/octeontx/Makefile          | 2 ++
>  drivers/net/octeontx/meson.build       | 2 ++
>  drivers/net/octeontx/octeontx_ethdev.c | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile
> index b47bf7a40..3e4a10662 100644
> --- a/drivers/net/octeontx/Makefile
> +++ b/drivers/net/octeontx/Makefile
> @@ -43,6 +43,8 @@ else
>  CFLAGS_octeontx_rxtx.o += -O3 -Ofast
>  endif
> 
> +CFLAGS_octeontx_ethdev.o += -DALLOW_EXPERIMENTAL_API
> +
>  LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
>  LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
>  LDLIBS += -lrte_mempool_octeontx
> diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build
> index ef789eaa9..135e63e2f 100644
> --- a/drivers/net/octeontx/meson.build
> +++ b/drivers/net/octeontx/meson.build
> @@ -8,6 +8,8 @@ sources = files('octeontx_rxtx.c',
>  		'octeontx_ethdev.c'
>  		)
> 
> +cflags += '-DALLOW_EXPERIMENTAL_API'
> +

Rather than having each driver modify cflags, I've set up the variable
"allow_experimental_apis" in the top-level meson.build file. So just put

allow_experimental_apis = true

in your driver file.

/Bruce
  
Bruce Richardson Feb. 5, 2018, 11:46 a.m. UTC | #5
On Mon, Feb 05, 2018 at 10:34:00AM +0000, Ferruh Yigit wrote:
> On 2/4/2018 3:33 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>
> > ---
> > 
> >  v2 Changes:
> >  - fixed compilation issues caused by using experimental API in both meson and
> >  make.
> > 
> >  drivers/net/octeontx/Makefile          | 2 ++
> >  drivers/net/octeontx/meson.build       | 2 ++
> 
> Meson patches are still going through the Bruce's tree. Can you please make this
> two separate patches (not patchset), I can get the driver one and Makefile,
> Bruce can get meson one.
> 
Hi Ferruh,

I disagree with this. Since the meson build is now merged into mainline,
many patches will have meson file changes to keep things building. These
patches should not go in the next-build tree but should be part of the
tree the rest of the patch targets. It should not be permitted to apply
a patch to next-net which breaks the meson build.

Only patches which add new capabilities or drivers to the build system
will go in my tree.

Regards,
/Bruce
  
Ferruh Yigit Feb. 5, 2018, 6:55 p.m. UTC | #6
On 2/5/2018 11:46 AM, Bruce Richardson wrote:
> On Mon, Feb 05, 2018 at 10:34:00AM +0000, Ferruh Yigit wrote:
>> On 2/4/2018 3:33 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>
>>> ---
>>>
>>>  v2 Changes:
>>>  - fixed compilation issues caused by using experimental API in both meson and
>>>  make.
>>>
>>>  drivers/net/octeontx/Makefile          | 2 ++
>>>  drivers/net/octeontx/meson.build       | 2 ++
>>
>> Meson patches are still going through the Bruce's tree. Can you please make this
>> two separate patches (not patchset), I can get the driver one and Makefile,
>> Bruce can get meson one.
>>
> Hi Ferruh,
> 
> I disagree with this. Since the meson build is now merged into mainline,
> many patches will have meson file changes to keep things building. These
> patches should not go in the next-build tree but should be part of the
> tree the rest of the patch targets. It should not be permitted to apply
> a patch to next-net which breaks the meson build.
> 
> Only patches which add new capabilities or drivers to the build system
> will go in my tree.

OK, so I will merge this with original patch.

> 
> Regards,
> /Bruce
>
  

Patch

diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile
index b47bf7a40..3e4a10662 100644
--- a/drivers/net/octeontx/Makefile
+++ b/drivers/net/octeontx/Makefile
@@ -43,6 +43,8 @@  else
 CFLAGS_octeontx_rxtx.o += -O3 -Ofast
 endif

+CFLAGS_octeontx_ethdev.o += -DALLOW_EXPERIMENTAL_API
+
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
 LDLIBS += -lrte_mempool_octeontx
diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build
index ef789eaa9..135e63e2f 100644
--- a/drivers/net/octeontx/meson.build
+++ b/drivers/net/octeontx/meson.build
@@ -8,6 +8,8 @@  sources = files('octeontx_rxtx.c',
 		'octeontx_ethdev.c'
 		)

+cflags += '-DALLOW_EXPERIMENTAL_API'
+
 deps += ['mempool_octeontx', 'eventdev']

 includes += include_directories('base')
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 06aa0a2c9..b739c0b39 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;