[v16,1/8] net/sfc: fix aarch32 build

Message ID 1618995020-4775-2-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series aarch64 -> aarch32 cross compilation support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš April 21, 2021, 8:50 a.m. UTC
  From: Ruifeng Wang <ruifeng.wang@arm.com>

The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.

Updated meson file to disable sfc for aarch32 build.

Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Cc: arybchenko@solarflare.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/meson.build | 2 +-
 drivers/net/sfc/meson.build        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Andrew Rybchenko April 21, 2021, 9:04 a.m. UTC | #1
On 4/21/21 11:50 AM, Juraj Linkeš wrote:
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> 
> The sfc PMD was enabled for aarch32 which is 32-bit mode but has
> cpu_family set to aarch64.
> As sfc support only 64-bit system, it should be disabled for aarch32.
> 
> Updated meson file to disable sfc for aarch32 build.
> 
> Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
> Cc: arybchenko@solarflare.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Withdraw my ack

> ---
>  drivers/common/sfc_efx/meson.build | 2 +-
>  drivers/net/sfc/meson.build        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
> index 1ca9510733..db5a6a8b42 100644
> --- a/drivers/common/sfc_efx/meson.build
> +++ b/drivers/common/sfc_efx/meson.build
> @@ -10,7 +10,7 @@ if is_windows
>  	reason = 'not supported on Windows'
>  endif
>  
> -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
> +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))

Am I missing something or condition in parenthesis is always
true? I think it should be:

if arch_subdir != 'x86' or arch_subdir != 'arm' or not
dpdk_conf.get('RTE_ARCH_64')

>  	build = false
>  	reason = 'only supported on x86_64 and aarch64'
>  endif
> diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
> index 0c5cfb9058..0a96235e33 100644
> --- a/drivers/net/sfc/meson.build
> +++ b/drivers/net/sfc/meson.build
> @@ -12,7 +12,7 @@ if is_windows
>  	subdir_done()
>  endif
>  
> -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
> +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))

same here.

>  	build = false
>  	reason = 'only supported on x86_64 and aarch64'
>  endif
>
  
Ruifeng Wang April 21, 2021, 10:06 a.m. UTC | #2
> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Sent: Wednesday, April 21, 2021 5:05 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; thomas@monjalon.net;
> david.marchand@redhat.com; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: dev@dpdk.org; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> arybchenko@solarflare.com; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v16 1/8] net/sfc: fix aarch32 build
> 
> On 4/21/21 11:50 AM, Juraj Linkeš wrote:
> > From: Ruifeng Wang <ruifeng.wang@arm.com>
> >
> > The sfc PMD was enabled for aarch32 which is 32-bit mode but has
> > cpu_family set to aarch64.
> > As sfc support only 64-bit system, it should be disabled for aarch32.
> >
> > Updated meson file to disable sfc for aarch32 build.
> >
> > Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
> > Cc: arybchenko@solarflare.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 
> Withdraw my ack
> 
> > ---
> >  drivers/common/sfc_efx/meson.build | 2 +-
> >  drivers/net/sfc/meson.build        | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/common/sfc_efx/meson.build
> > b/drivers/common/sfc_efx/meson.build
> > index 1ca9510733..db5a6a8b42 100644
> > --- a/drivers/common/sfc_efx/meson.build
> > +++ b/drivers/common/sfc_efx/meson.build
> > @@ -10,7 +10,7 @@ if is_windows
> >  	reason = 'not supported on Windows'
> >  endif
> >
> > -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and
> > (arch_subdir != 'arm' or not
> > host_machine.cpu_family().startswith('aarch64'))
> > +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not
> > +dpdk_conf.get('RTE_ARCH_64'))
> 
> Am I missing something or condition in parenthesis is always true? I think it

Oops, it should be an 'and' in the parenthesis.

> should be:
> 
> if arch_subdir != 'x86' or arch_subdir != 'arm' or not
> dpdk_conf.get('RTE_ARCH_64')

I assume you meant to use 'and's.

> 
> >  	build = false
> >  	reason = 'only supported on x86_64 and aarch64'
> >  endif
> > diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
> > index 0c5cfb9058..0a96235e33 100644
> > --- a/drivers/net/sfc/meson.build
> > +++ b/drivers/net/sfc/meson.build
> > @@ -12,7 +12,7 @@ if is_windows
> >  	subdir_done()
> >  endif
> >
> > -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and
> > (arch_subdir != 'arm' or not
> > host_machine.cpu_family().startswith('aarch64'))
> > +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not
> > +dpdk_conf.get('RTE_ARCH_64'))
> 
> same here.
> 
> >  	build = false
> >  	reason = 'only supported on x86_64 and aarch64'
> >  endif
> >
  
Juraj Linkeš April 21, 2021, 2:08 p.m. UTC | #3
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Wednesday, April 21, 2021 12:06 PM
> To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Juraj Linkeš
> <juraj.linkes@pantheon.tech>; thomas@monjalon.net;
> david.marchand@redhat.com; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: dev@dpdk.org; arybchenko@solarflare.com; stable@dpdk.org; nd
> <nd@arm.com>
> Subject: RE: [dpdk-dev] [PATCH v16 1/8] net/sfc: fix aarch32 build
> 
> > -----Original Message-----
> > From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> > Sent: Wednesday, April 21, 2021 5:05 PM
> > To: Juraj Linkeš <juraj.linkes@pantheon.tech>; thomas@monjalon.net;
> > david.marchand@redhat.com; bruce.richardson@intel.com;
> > aconole@redhat.com; maicolgabriel@hotmail.com
> > Cc: dev@dpdk.org; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> > arybchenko@solarflare.com; stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v16 1/8] net/sfc: fix aarch32 build
> >
> > On 4/21/21 11:50 AM, Juraj Linkeš wrote:
> > > From: Ruifeng Wang <ruifeng.wang@arm.com>
> > >
> > > The sfc PMD was enabled for aarch32 which is 32-bit mode but has
> > > cpu_family set to aarch64.
> > > As sfc support only 64-bit system, it should be disabled for aarch32.
> > >
> > > Updated meson file to disable sfc for aarch32 build.
> > >
> > > Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
> > > Cc: arybchenko@solarflare.com
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > > Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> >
> > Withdraw my ack
> >
> > > ---
> > >  drivers/common/sfc_efx/meson.build | 2 +-
> > >  drivers/net/sfc/meson.build        | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/common/sfc_efx/meson.build
> > > b/drivers/common/sfc_efx/meson.build
> > > index 1ca9510733..db5a6a8b42 100644
> > > --- a/drivers/common/sfc_efx/meson.build
> > > +++ b/drivers/common/sfc_efx/meson.build
> > > @@ -10,7 +10,7 @@ if is_windows
> > >  	reason = 'not supported on Windows'
> > >  endif
> > >
> > > -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and
> > > (arch_subdir != 'arm' or not
> > > host_machine.cpu_family().startswith('aarch64'))
> > > +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not
> > > +dpdk_conf.get('RTE_ARCH_64'))
> >
> > Am I missing something or condition in parenthesis is always true? I
> > think it
> 

Thanks for catching this.

> Oops, it should be an 'and' in the parenthesis.
> 
> > should be:
> >
> > if arch_subdir != 'x86' or arch_subdir != 'arm' or not
> > dpdk_conf.get('RTE_ARCH_64')
> 
> I assume you meant to use 'and's.
> 

I believe the actual correct condition is:
(arch_subdir != 'x86' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))

This should result in 'only supported on x86_64 and aarch64'.

> >
> > >  	build = false
> > >  	reason = 'only supported on x86_64 and aarch64'
> > >  endif
> > > diff --git a/drivers/net/sfc/meson.build
> > > b/drivers/net/sfc/meson.build index 0c5cfb9058..0a96235e33 100644
> > > --- a/drivers/net/sfc/meson.build
> > > +++ b/drivers/net/sfc/meson.build
> > > @@ -12,7 +12,7 @@ if is_windows
> > >  	subdir_done()
> > >  endif
> > >
> > > -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and
> > > (arch_subdir != 'arm' or not
> > > host_machine.cpu_family().startswith('aarch64'))
> > > +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not
> > > +dpdk_conf.get('RTE_ARCH_64'))
> >
> > same here.
> >
> > >  	build = false
> > >  	reason = 'only supported on x86_64 and aarch64'
> > >  endif
> > >
  
Andrew Rybchenko April 21, 2021, 2:20 p.m. UTC | #4
On 4/21/21 5:08 PM, Juraj Linkeš wrote:
> 
> 
>> -----Original Message-----
>> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
>> Sent: Wednesday, April 21, 2021 12:06 PM
>> To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Juraj Linkeš
>> <juraj.linkes@pantheon.tech>; thomas@monjalon.net;
>> david.marchand@redhat.com; bruce.richardson@intel.com;
>> aconole@redhat.com; maicolgabriel@hotmail.com
>> Cc: dev@dpdk.org; arybchenko@solarflare.com; stable@dpdk.org; nd
>> <nd@arm.com>
>> Subject: RE: [dpdk-dev] [PATCH v16 1/8] net/sfc: fix aarch32 build
>>
>>> -----Original Message-----
>>> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>>> Sent: Wednesday, April 21, 2021 5:05 PM
>>> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; thomas@monjalon.net;
>>> david.marchand@redhat.com; bruce.richardson@intel.com;
>>> aconole@redhat.com; maicolgabriel@hotmail.com
>>> Cc: dev@dpdk.org; Ruifeng Wang <Ruifeng.Wang@arm.com>;
>>> arybchenko@solarflare.com; stable@dpdk.org
>>> Subject: Re: [dpdk-dev] [PATCH v16 1/8] net/sfc: fix aarch32 build
>>>
>>> On 4/21/21 11:50 AM, Juraj Linkeš wrote:
>>>> From: Ruifeng Wang <ruifeng.wang@arm.com>
>>>>
>>>> The sfc PMD was enabled for aarch32 which is 32-bit mode but has
>>>> cpu_family set to aarch64.
>>>> As sfc support only 64-bit system, it should be disabled for aarch32.
>>>>
>>>> Updated meson file to disable sfc for aarch32 build.
>>>>
>>>> Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
>>>> Cc: arybchenko@solarflare.com
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
>>>> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>>>
>>> Withdraw my ack
>>>
>>>> ---
>>>>  drivers/common/sfc_efx/meson.build | 2 +-
>>>>  drivers/net/sfc/meson.build        | 2 +-
>>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/common/sfc_efx/meson.build
>>>> b/drivers/common/sfc_efx/meson.build
>>>> index 1ca9510733..db5a6a8b42 100644
>>>> --- a/drivers/common/sfc_efx/meson.build
>>>> +++ b/drivers/common/sfc_efx/meson.build
>>>> @@ -10,7 +10,7 @@ if is_windows
>>>>  	reason = 'not supported on Windows'
>>>>  endif
>>>>
>>>> -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and
>>>> (arch_subdir != 'arm' or not
>>>> host_machine.cpu_family().startswith('aarch64'))
>>>> +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not
>>>> +dpdk_conf.get('RTE_ARCH_64'))
>>>
>>> Am I missing something or condition in parenthesis is always true? I
>>> think it
>>
> 
> Thanks for catching this.
> 
>> Oops, it should be an 'and' in the parenthesis.
>>
>>> should be:
>>>
>>> if arch_subdir != 'x86' or arch_subdir != 'arm' or not
>>> dpdk_conf.get('RTE_ARCH_64')
>>
>> I assume you meant to use 'and's.
>>
> 
> I believe the actual correct condition is:
> (arch_subdir != 'x86' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
> 
> This should result in 'only supported on x86_64 and aarch64'.

Yes, many thanks.

Andrew.

> 
>>>
>>>>  	build = false
>>>>  	reason = 'only supported on x86_64 and aarch64'
>>>>  endif
>>>> diff --git a/drivers/net/sfc/meson.build
>>>> b/drivers/net/sfc/meson.build index 0c5cfb9058..0a96235e33 100644
>>>> --- a/drivers/net/sfc/meson.build
>>>> +++ b/drivers/net/sfc/meson.build
>>>> @@ -12,7 +12,7 @@ if is_windows
>>>>  	subdir_done()
>>>>  endif
>>>>
>>>> -if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and
>>>> (arch_subdir != 'arm' or not
>>>> host_machine.cpu_family().startswith('aarch64'))
>>>> +if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not
>>>> +dpdk_conf.get('RTE_ARCH_64'))
>>>
>>> same here.
>>>
>>>>  	build = false
>>>>  	reason = 'only supported on x86_64 and aarch64'
>>>>  endif
>>>>
>
  

Patch

diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 1ca9510733..db5a6a8b42 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -10,7 +10,7 @@  if is_windows
 	reason = 'not supported on Windows'
 endif
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index 0c5cfb9058..0a96235e33 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -12,7 +12,7 @@  if is_windows
 	subdir_done()
 endif
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif