DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] kni: fix build with Linux 6.10
@ 2024-07-16  8:44 Jiri Slaby
  2024-07-18  9:16 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2024-07-16  8:44 UTC (permalink / raw)
  To: dev; +Cc: Jiri Slaby

6.10 removed the "support" (it was never supported [1]) of separate
source and build dirs for out of tree modules.

KNI uses "src=" hack for that purpose.

Instead, copy sources to the build dir and don't rely upon the
unsupported...

Intended esp. for stable/22.11. It should go wherever kni is still in
the tree.

[1] https://lore.kernel.org/all/CAK7LNAQ47bZpE6c6Yoz-jQS78uU611oZwU8bH+7e=p5zSyADJw@mail.gmail.com/

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/linux/kni/meson.build | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index 4c90069e..39ca2ade 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -11,8 +11,8 @@ if run_cmd.stdout().contains('txqueue') == true
    kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
 endif
 
-
-kni_mkfile = custom_target('rte_kni_makefile',
+kni_deps = []
+kni_deps += custom_target('rte_kni_makefile',
         output: 'Makefile',
         command: ['touch', '@OUTPUT@'])
 
@@ -22,12 +22,15 @@ kni_sources = files(
         'Kbuild',
 )
 
+foreach file : kni_sources
+  kni_deps += fs.copyfile(file)
+endforeach
+
 custom_target('rte_kni',
         input: kni_sources,
         output: 'rte_kni.ko',
         command: ['make', '-j4', '-C', kernel_build_dir,
             'M=' + meson.current_build_dir(),
-            'src=' + meson.current_source_dir(),
             ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
             + dpdk_source_root + '/config/rte_config.h' +
             ' -I' + dpdk_source_root + '/lib/eal/include' +
@@ -35,7 +38,7 @@ custom_target('rte_kni',
             ' -I' + dpdk_build_root +
             ' -I' + meson.current_source_dir(),
             'modules'] + cross_args,
-        depends: kni_mkfile,
+        depends: kni_deps,
         install: install,
         install_dir: kernel_install_dir,
         build_by_default: get_option('enable_kmods'))
-- 
2.45.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kni: fix build with Linux 6.10
  2024-07-16  8:44 [PATCH] kni: fix build with Linux 6.10 Jiri Slaby
@ 2024-07-18  9:16 ` Thomas Monjalon
  2024-07-18  9:28   ` Luca Boccassi
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2024-07-18  9:16 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: dev, bluca, xuemingl, ktraynor, stable

Adding stable@dpdk.org and LTS maintainers as Cc.
It must be merged directly in LTS branches.


16/07/2024 10:44, Jiri Slaby:
> 6.10 removed the "support" (it was never supported [1]) of separate
> source and build dirs for out of tree modules.
> 
> KNI uses "src=" hack for that purpose.
> 
> Instead, copy sources to the build dir and don't rely upon the
> unsupported...
> 
> Intended esp. for stable/22.11. It should go wherever kni is still in
> the tree.
> 
> [1] https://lore.kernel.org/all/CAK7LNAQ47bZpE6c6Yoz-jQS78uU611oZwU8bH+7e=p5zSyADJw@mail.gmail.com/
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
>  kernel/linux/kni/meson.build | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> index 4c90069e..39ca2ade 100644
> --- a/kernel/linux/kni/meson.build
> +++ b/kernel/linux/kni/meson.build
> @@ -11,8 +11,8 @@ if run_cmd.stdout().contains('txqueue') == true
>     kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
>  endif
>  
> -
> -kni_mkfile = custom_target('rte_kni_makefile',
> +kni_deps = []
> +kni_deps += custom_target('rte_kni_makefile',
>          output: 'Makefile',
>          command: ['touch', '@OUTPUT@'])
>  
> @@ -22,12 +22,15 @@ kni_sources = files(
>          'Kbuild',
>  )
>  
> +foreach file : kni_sources
> +  kni_deps += fs.copyfile(file)
> +endforeach
> +
>  custom_target('rte_kni',
>          input: kni_sources,
>          output: 'rte_kni.ko',
>          command: ['make', '-j4', '-C', kernel_build_dir,
>              'M=' + meson.current_build_dir(),
> -            'src=' + meson.current_source_dir(),
>              ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
>              + dpdk_source_root + '/config/rte_config.h' +
>              ' -I' + dpdk_source_root + '/lib/eal/include' +
> @@ -35,7 +38,7 @@ custom_target('rte_kni',
>              ' -I' + dpdk_build_root +
>              ' -I' + meson.current_source_dir(),
>              'modules'] + cross_args,
> -        depends: kni_mkfile,
> +        depends: kni_deps,
>          install: install,
>          install_dir: kernel_install_dir,
>          build_by_default: get_option('enable_kmods'))





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kni: fix build with Linux 6.10
  2024-07-18  9:16 ` Thomas Monjalon
@ 2024-07-18  9:28   ` Luca Boccassi
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Boccassi @ 2024-07-18  9:28 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Jiri Slaby, dev, xuemingl, ktraynor, stable

Hi Jiri,

Please follow the process described in the "stable release" paragraph at:

https://core.dpdk.org/contribute/

ie, one patch per affected LTS branch must be prepared, tested and
sent individually, and then we'll apply it. Thanks.

On Thu, 18 Jul 2024 at 10:16, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> Adding stable@dpdk.org and LTS maintainers as Cc.
> It must be merged directly in LTS branches.
>
>
> 16/07/2024 10:44, Jiri Slaby:
> > 6.10 removed the "support" (it was never supported [1]) of separate
> > source and build dirs for out of tree modules.
> >
> > KNI uses "src=" hack for that purpose.
> >
> > Instead, copy sources to the build dir and don't rely upon the
> > unsupported...
> >
> > Intended esp. for stable/22.11. It should go wherever kni is still in
> > the tree.
> >
> > [1] https://lore.kernel.org/all/CAK7LNAQ47bZpE6c6Yoz-jQS78uU611oZwU8bH+7e=p5zSyADJw@mail.gmail.com/
> >
> > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > ---
> >  kernel/linux/kni/meson.build | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> > index 4c90069e..39ca2ade 100644
> > --- a/kernel/linux/kni/meson.build
> > +++ b/kernel/linux/kni/meson.build
> > @@ -11,8 +11,8 @@ if run_cmd.stdout().contains('txqueue') == true
> >     kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
> >  endif
> >
> > -
> > -kni_mkfile = custom_target('rte_kni_makefile',
> > +kni_deps = []
> > +kni_deps += custom_target('rte_kni_makefile',
> >          output: 'Makefile',
> >          command: ['touch', '@OUTPUT@'])
> >
> > @@ -22,12 +22,15 @@ kni_sources = files(
> >          'Kbuild',
> >  )
> >
> > +foreach file : kni_sources
> > +  kni_deps += fs.copyfile(file)
> > +endforeach
> > +
> >  custom_target('rte_kni',
> >          input: kni_sources,
> >          output: 'rte_kni.ko',
> >          command: ['make', '-j4', '-C', kernel_build_dir,
> >              'M=' + meson.current_build_dir(),
> > -            'src=' + meson.current_source_dir(),
> >              ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
> >              + dpdk_source_root + '/config/rte_config.h' +
> >              ' -I' + dpdk_source_root + '/lib/eal/include' +
> > @@ -35,7 +38,7 @@ custom_target('rte_kni',
> >              ' -I' + dpdk_build_root +
> >              ' -I' + meson.current_source_dir(),
> >              'modules'] + cross_args,
> > -        depends: kni_mkfile,
> > +        depends: kni_deps,
> >          install: install,
> >          install_dir: kernel_install_dir,
> >          build_by_default: get_option('enable_kmods'))
>
>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-18  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-16  8:44 [PATCH] kni: fix build with Linux 6.10 Jiri Slaby
2024-07-18  9:16 ` Thomas Monjalon
2024-07-18  9:28   ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).