[dpdk-dev,[PATCH,v2] 07/13] linuxapp: eal: arm: Always return 0 for rte_eal_iopl_init()

Message ID 1450098032-21198-8-git-send-email-sshukla@mvista.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Santosh Shukla Dec. 14, 2015, 1 p.m. UTC
  iopl() syscall not supported in linux-arm/arm64 so always return 0 value.

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
 lib/librte_eal/linuxapp/eal/eal.c |    3 +++
 1 file changed, 3 insertions(+)
  

Comments

Jan Viktorin Dec. 14, 2015, 2:34 p.m. UTC | #1
I believe, I've already acked this patch. I can see no change here so I
assume it's still the same.

On Mon, 14 Dec 2015 18:30:26 +0530
Santosh Shukla <sshukla@mvista.com> wrote:

> iopl() syscall not supported in linux-arm/arm64 so always return 0 value.
> 
> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
  
Jerin Jacob Dec. 14, 2015, 2:37 p.m. UTC | #2
On Mon, Dec 14, 2015 at 06:30:26PM +0530, Santosh Shukla wrote:
> iopl() syscall not supported in linux-arm/arm64 so always return 0 value.
>
> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
> ---
>  lib/librte_eal/linuxapp/eal/eal.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
> index 635ec36..2617037 100644
> --- a/lib/librte_eal/linuxapp/eal/eal.c
> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> @@ -716,6 +716,9 @@ rte_eal_iopl_init(void)
>  		return -1;
>  	return 0;
>  #else
> +#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
> +	return 0; /* iopl syscall not supported for ARM/ARM64 */

I guess for other architectures also iopl not supported.I think better
to move this function to eal. Else this function will return 'true' for
ppc64

or have at least postive logic,
#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) ||
defined(RTE_ARCH_X86_X32)


> +#endif
>  	return -1;
>  #endif
>  }
> --
> 1.7.9.5
>
  
Santosh Shukla Dec. 14, 2015, 3:04 p.m. UTC | #3
On Mon, Dec 14, 2015 at 8:04 PM, Jan Viktorin <viktorin@rehivetech.com>
wrote:

> I believe, I've already acked this patch. I can see no change here so I
> assume it's still the same.
>
> On Mon, 14 Dec 2015 18:30:26 +0530
> Santosh Shukla <sshukla@mvista.com> wrote:
>
> > iopl() syscall not supported in linux-arm/arm64 so always return 0 value.
> >
> > Signed-off-by: Santosh Shukla <sshukla@mvista.com>
> Acked-by: Jan Viktorin <viktorin@rehivetech.com>
>

Sorry that I missed in v2 patch! Gonna add in next revision. Thanks
  
Santosh Shukla Dec. 14, 2015, 3:24 p.m. UTC | #4
On Mon, Dec 14, 2015 at 8:07 PM, Jerin Jacob
<jerin.jacob@caviumnetworks.com> wrote:
> On Mon, Dec 14, 2015 at 06:30:26PM +0530, Santosh Shukla wrote:
>> iopl() syscall not supported in linux-arm/arm64 so always return 0 value.
>>
>> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
>> ---
>>  lib/librte_eal/linuxapp/eal/eal.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
>> index 635ec36..2617037 100644
>> --- a/lib/librte_eal/linuxapp/eal/eal.c
>> +++ b/lib/librte_eal/linuxapp/eal/eal.c
>> @@ -716,6 +716,9 @@ rte_eal_iopl_init(void)
>>               return -1;
>>       return 0;
>>  #else
>> +#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
>> +     return 0; /* iopl syscall not supported for ARM/ARM64 */
>
> I guess for other architectures also iopl not supported.I think better
> to move this function to eal. Else this function will return 'true' for
> ppc64
>

didn't understood. This func is in eal right? and for ppc64, function
will return -1 (false). Although i could include ppc64 / tile or
invert the logic such a way that non-x86 arch to return default true
value.

However iopl() used for virtio and only two arch using x86/ now arm. I
am not sure ppc64/tile or other arch has any plan to use virtio pmd
thus care for iopl().

> or have at least postive logic,
> #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) ||
> defined(RTE_ARCH_X86_X32)
>
>
>> +#endif
>>       return -1;
>>  #endif
>>  }
>> --
>> 1.7.9.5
>>
  
Jerin Jacob Dec. 14, 2015, 3:56 p.m. UTC | #5
On Mon, Dec 14, 2015 at 08:54:08PM +0530, Santosh Shukla wrote:
> On Mon, Dec 14, 2015 at 8:07 PM, Jerin Jacob
> <jerin.jacob@caviumnetworks.com> wrote:
> > On Mon, Dec 14, 2015 at 06:30:26PM +0530, Santosh Shukla wrote:
> >> iopl() syscall not supported in linux-arm/arm64 so always return 0 value.
> >>
> >> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
> >> ---
> >>  lib/librte_eal/linuxapp/eal/eal.c |    3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
> >> index 635ec36..2617037 100644
> >> --- a/lib/librte_eal/linuxapp/eal/eal.c
> >> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> >> @@ -716,6 +716,9 @@ rte_eal_iopl_init(void)
> >>               return -1;
> >>       return 0;
> >>  #else
> >> +#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
> >> +     return 0; /* iopl syscall not supported for ARM/ARM64 */
> >
> > I guess for other architectures also iopl not supported.I think better
> > to move this function to eal. Else this function will return 'true' for
> > ppc64
> >
> 
> didn't understood. This func is in eal right? and for ppc64, function

meant to abstract through lib/librte_eal/common/include/arch/
to avoid #ifdef clutter

> will return -1 (false). Although i could include ppc64 / tile or
> invert the logic such a way that non-x86 arch to return default true
> value.
> 
> However iopl() used for virtio and only two arch using x86/ now arm. I
> am not sure ppc64/tile or other arch has any plan to use virtio pmd
> thus care for iopl().

Why not? With your patch, dpdk-virtio has very minimal dependency on
architecture (implementing raw_*) or even we can have generic routine for that

> 
> > or have at least postive logic,
> > #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) ||
> > defined(RTE_ARCH_X86_X32)
> >
> >
> >> +#endif
> >>       return -1;
> >>  #endif
> >>  }
> >> --
> >> 1.7.9.5
> >>
  
Santosh Shukla Dec. 14, 2015, 4:13 p.m. UTC | #6
On Mon, Dec 14, 2015 at 9:26 PM, Jerin Jacob
<jerin.jacob@caviumnetworks.com> wrote:
> On Mon, Dec 14, 2015 at 08:54:08PM +0530, Santosh Shukla wrote:
>> On Mon, Dec 14, 2015 at 8:07 PM, Jerin Jacob
>> <jerin.jacob@caviumnetworks.com> wrote:
>> > On Mon, Dec 14, 2015 at 06:30:26PM +0530, Santosh Shukla wrote:
>> >> iopl() syscall not supported in linux-arm/arm64 so always return 0 value.
>> >>
>> >> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
>> >> ---
>> >>  lib/librte_eal/linuxapp/eal/eal.c |    3 +++
>> >>  1 file changed, 3 insertions(+)
>> >>
>> >> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
>> >> index 635ec36..2617037 100644
>> >> --- a/lib/librte_eal/linuxapp/eal/eal.c
>> >> +++ b/lib/librte_eal/linuxapp/eal/eal.c
>> >> @@ -716,6 +716,9 @@ rte_eal_iopl_init(void)
>> >>               return -1;
>> >>       return 0;
>> >>  #else
>> >> +#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
>> >> +     return 0; /* iopl syscall not supported for ARM/ARM64 */
>> >
>> > I guess for other architectures also iopl not supported.I think better
>> > to move this function to eal. Else this function will return 'true' for
>> > ppc64
>> >
>>
>> didn't understood. This func is in eal right? and for ppc64, function
>
> meant to abstract through lib/librte_eal/common/include/arch/
> to avoid #ifdef clutter
>

make sense to me :)

>> will return -1 (false). Although i could include ppc64 / tile or
>> invert the logic such a way that non-x86 arch to return default true
>> value.
>>
>> However iopl() used for virtio and only two arch using x86/ now arm. I
>> am not sure ppc64/tile or other arch has any plan to use virtio pmd
>> thus care for iopl().
>
> Why not? With your patch, dpdk-virtio has very minimal dependency on
> architecture (implementing raw_*) or even we can have generic routine for that
>

Right!

We'll do in v3, Thanks!!
>>
>> > or have at least postive logic,
>> > #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) ||
>> > defined(RTE_ARCH_X86_X32)
>> >
>> >
>> >> +#endif
>> >>       return -1;
>> >>  #endif
>> >>  }
>> >> --
>> >> 1.7.9.5
>> >>
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 635ec36..2617037 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -716,6 +716,9 @@  rte_eal_iopl_init(void)
 		return -1;
 	return 0;
 #else
+#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
+	return 0; /* iopl syscall not supported for ARM/ARM64 */
+#endif
 	return -1;
 #endif
 }