DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Incorrect install_dir for Linux kernel modules
@ 2019-06-06 18:33 Igor Ryzhov
  2019-06-07  9:29 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Ryzhov @ 2019-06-06 18:33 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

Hi everyone,

I faced an issue today with install directory for rte_kni and igb_uio.
Modules are installed to '/usr/src/...' instead of '/lib/modules/...'.

Right now install_dir for both modules is set to:

install_dir: kernel_dir + '/../extra/dpdk'

where 'kernel_dir' is set manually or automatically to:

kernel_version = run_command('uname', '-r').stdout().strip()
kernel_dir = '/lib/modules/' + kernel_version + '/build'


I believe the intention of using '/../extra/dpdk' was to come back to
'/lib/modules/kernel_version/' and install the modules there, but as
'/lib/modules/kernel_version/build' is a symlink, we actually get into
the '/usr/src/linux-headers-kernel-version' and install modules there.

I see two possible solutions here:
1. Add new 'kernel_install_dir' option. If it is not set, set it
automatically:

kernel_version = run_command('uname', '-r').stdout().strip()
kernel_install_dir = '/lib/modules/' + kernel_version

and set install_dir to:
install_dir: kernel_install_dir + '/extra/dpdk'

2. Replace 'kernel_dir' option with new option 'kernel_version', and do the
following:

if kernel_version == ''

kernel_version = run_command('uname', '-r').stdout().strip()


then set 'kernel_dir' and 'kernel_install_dir' accordingly:

kernel_dir = '/lib/modules/' + kernel_version + '/build'

kernel_install_dir = 'lib/modules/' + kernel_version

and use it for building and installation:
custom_target('rte_kni',

...

command: ['make', '-j4', '-C', kernel_dir,

...

install_dir: kernel_install_dir + '/extra/dpdk',

...


I prefer the second one and already have a patch.
Can send the patch if maintainers are good with the solution.

Best regards,
Igor

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

* Re: [dpdk-dev] Incorrect install_dir for Linux kernel modules
  2019-06-06 18:33 [dpdk-dev] Incorrect install_dir for Linux kernel modules Igor Ryzhov
@ 2019-06-07  9:29 ` Bruce Richardson
  2019-06-10  8:32   ` Igor Ryzhov
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2019-06-07  9:29 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Ferruh Yigit

On Thu, Jun 06, 2019 at 09:33:09PM +0300, Igor Ryzhov wrote:
> Hi everyone,
> 
> I faced an issue today with install directory for rte_kni and igb_uio.
> Modules are installed to '/usr/src/...' instead of '/lib/modules/...'.
> 
> Right now install_dir for both modules is set to:
> 
> install_dir: kernel_dir + '/../extra/dpdk'
> 
> where 'kernel_dir' is set manually or automatically to:
> 
> kernel_version = run_command('uname', '-r').stdout().strip()
> kernel_dir = '/lib/modules/' + kernel_version + '/build'
> 
> 
> I believe the intention of using '/../extra/dpdk' was to come back to
> '/lib/modules/kernel_version/' and install the modules there, but as
> '/lib/modules/kernel_version/build' is a symlink, we actually get into
> the '/usr/src/linux-headers-kernel-version' and install modules there.
> 
> I see two possible solutions here:
> 1. Add new 'kernel_install_dir' option. If it is not set, set it
> automatically:
> 
> kernel_version = run_command('uname', '-r').stdout().strip()
> kernel_install_dir = '/lib/modules/' + kernel_version
> 
> and set install_dir to:
> install_dir: kernel_install_dir + '/extra/dpdk'
> 
> 2. Replace 'kernel_dir' option with new option 'kernel_version', and do the
> following:
> 
> if kernel_version == ''
> 
> kernel_version = run_command('uname', '-r').stdout().strip()
> 
> 
> then set 'kernel_dir' and 'kernel_install_dir' accordingly:
> 
> kernel_dir = '/lib/modules/' + kernel_version + '/build'
> 
> kernel_install_dir = 'lib/modules/' + kernel_version
> 
> and use it for building and installation:
> custom_target('rte_kni',
> 
> ...
> 
> command: ['make', '-j4', '-C', kernel_dir,
> 
> ...
> 
> install_dir: kernel_install_dir + '/extra/dpdk',
> 
> ...
> 
> 
> I prefer the second one and already have a patch.
> Can send the patch if maintainers are good with the solution.
> 
Thanks for highlighting this, and I agree with option 2 as a good solution.
Please send out the patch.

/Bruce

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

* Re: [dpdk-dev] Incorrect install_dir for Linux kernel modules
  2019-06-07  9:29 ` Bruce Richardson
@ 2019-06-10  8:32   ` Igor Ryzhov
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Ryzhov @ 2019-06-10  8:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Ferruh Yigit

Done – http://patches.dpdk.org/patch/54619/

On Fri, Jun 7, 2019 at 12:29 PM Bruce Richardson <bruce.richardson@intel.com>
wrote:

> On Thu, Jun 06, 2019 at 09:33:09PM +0300, Igor Ryzhov wrote:
> > Hi everyone,
> >
> > I faced an issue today with install directory for rte_kni and igb_uio.
> > Modules are installed to '/usr/src/...' instead of '/lib/modules/...'.
> >
> > Right now install_dir for both modules is set to:
> >
> > install_dir: kernel_dir + '/../extra/dpdk'
> >
> > where 'kernel_dir' is set manually or automatically to:
> >
> > kernel_version = run_command('uname', '-r').stdout().strip()
> > kernel_dir = '/lib/modules/' + kernel_version + '/build'
> >
> >
> > I believe the intention of using '/../extra/dpdk' was to come back to
> > '/lib/modules/kernel_version/' and install the modules there, but as
> > '/lib/modules/kernel_version/build' is a symlink, we actually get into
> > the '/usr/src/linux-headers-kernel-version' and install modules there.
> >
> > I see two possible solutions here:
> > 1. Add new 'kernel_install_dir' option. If it is not set, set it
> > automatically:
> >
> > kernel_version = run_command('uname', '-r').stdout().strip()
> > kernel_install_dir = '/lib/modules/' + kernel_version
> >
> > and set install_dir to:
> > install_dir: kernel_install_dir + '/extra/dpdk'
> >
> > 2. Replace 'kernel_dir' option with new option 'kernel_version', and do
> the
> > following:
> >
> > if kernel_version == ''
> >
> > kernel_version = run_command('uname', '-r').stdout().strip()
> >
> >
> > then set 'kernel_dir' and 'kernel_install_dir' accordingly:
> >
> > kernel_dir = '/lib/modules/' + kernel_version + '/build'
> >
> > kernel_install_dir = 'lib/modules/' + kernel_version
> >
> > and use it for building and installation:
> > custom_target('rte_kni',
> >
> > ...
> >
> > command: ['make', '-j4', '-C', kernel_dir,
> >
> > ...
> >
> > install_dir: kernel_install_dir + '/extra/dpdk',
> >
> > ...
> >
> >
> > I prefer the second one and already have a patch.
> > Can send the patch if maintainers are good with the solution.
> >
> Thanks for highlighting this, and I agree with option 2 as a good solution.
> Please send out the patch.
>
> /Bruce
>

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

end of thread, other threads:[~2019-06-10  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 18:33 [dpdk-dev] Incorrect install_dir for Linux kernel modules Igor Ryzhov
2019-06-07  9:29 ` Bruce Richardson
2019-06-10  8:32   ` Igor Ryzhov

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).