diff mbox series

[ovs-dev,v1,4/4] travis: Enable OVS Travis CI for arm

Message ID 1574237726-5497-1-git-send-email-Lance.Yang@arm.com
State Superseded
Headers show
Series Fix issues and enable Travis CI on arm | expand

Commit Message

Lance Yang Nov. 20, 2019, 8:15 a.m. UTC
Enable part of travis jobs with gcc compiler for arm64 architecture

1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
directory for arm64 architecture.
2. Temporarily disable sparse checker because of static code checking
failure on arm64

Successful travis build jobs report:
https://travis-ci.org/yzyuestc/ovs/builds/614299933

Reviewed-by: Yanqin Wei <Yanqin.Wei@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Reviewed-by: Gavin Hu <Gavin.Hu@arm.com>
Signed-off-by: Lance Yang <Lance.Yang@arm.com>
---
 .travis.yml            | 18 ++++++++++++++++++
 .travis/linux-build.sh |  6 +++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

Comments

Ilya Maximets Nov. 21, 2019, 7:46 p.m. UTC | #1
On 20.11.2019 9:15, Lance Yang wrote:
> Enable part of travis jobs with gcc compiler for arm64 architecture
> 
> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
> directory for arm64 architecture.
> 2. Temporarily disable sparse checker because of static code checking
> failure on arm64

Could you provide the sparse error messages?
Maybe we could fix them instead of disabling.

> 
> Successful travis build jobs report:
> https://travis-ci.org/yzyuestc/ovs/builds/614299933

There are some issues in Travis in above build.  It seems that
Travis fails to upload the resulted cache directory due to missing md5deep:

""
store build cache
0.02s5.41sInstalling md5deep
Reading package lists...
Building dependency tree...
Reading state information...
md5deep is already the newest version (4.4-2).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
/home/travis/.casher/bin/casher: line 230: md5deep: command not found
nothing changed
""

Best regards, Ilya Maximets.
Lance Yang Nov. 22, 2019, 9:35 a.m. UTC | #2
Hi Ilya,

Thanks for your reply. Please see the inline reply.

Best regards,
Lance Yang

> -----Original Message-----
> From: Ilya Maximets <i.maximets@ovn.org>
> Sent: Friday, November 22, 2019 3:47 AM
> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
> dev@openvswitch.org
> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
> Technology China) <Ruifeng.Wang@arm.com>
> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>
> On 20.11.2019 9:15, Lance Yang wrote:
> > Enable part of travis jobs with gcc compiler for arm64 architecture
> >
> > 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
> > directory for arm64 architecture.
> > 2. Temporarily disable sparse checker because of static code checking
> > failure on arm64
>
> Could you provide the sparse error messages?
> Maybe we could fix them instead of disabling.
>
> >
> > Successful travis build jobs report:
> > https://travis-ci.org/yzyuestc/ovs/builds/614299933
>
> There are some issues in Travis in above build.  It seems that Travis fails to upload the
> resulted cache directory due to missing md5deep:
>
> ""
[Lance]
The issue occurred because sparse checker does not recognize some arm neon intrinsics:

1. Some components in Open vSwitch source code directly includes the header file <arm_neon.h>.

2. When compiling OvS with DPDK, OvS includes some DPDK headers, which sometimes includes <arm_neon.h>. You can see the details of the error in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391 after line 2693

For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it seems that I am unable to fix this issue until DPDK solved it.

> store build cache
> 0.02s5.41sInstalling md5deep
> Reading package lists...
> Building dependency tree...
> Reading state information...
> md5deep is already the newest version (4.4-2).
> 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
> /home/travis/.casher/bin/casher: line 230: md5deep: command not found nothing
> changed ""
>
[Lance]
Thanks for pointing out the issue. The upload cache on arm is not successful, that means arm jobs will always clone and build DPDK. I just posted this issue to Travis CI community. You can see: https://travis-ci.community/t/no-cache-support-on-arm64/5416/21
> Best regards, Ilya Maximets.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Ilya Maximets Nov. 22, 2019, 10:36 a.m. UTC | #3
On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
> Hi Ilya,
> 
> Thanks for your reply. Please see the inline reply.
> 
> Best regards,
> Lance Yang
> 
>> -----Original Message-----
>> From: Ilya Maximets <i.maximets@ovn.org>
>> Sent: Friday, November 22, 2019 3:47 AM
>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
>> dev@openvswitch.org
>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
>> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
>> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
>> Technology China) <Ruifeng.Wang@arm.com>
>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>>
>> On 20.11.2019 9:15, Lance Yang wrote:
>>> Enable part of travis jobs with gcc compiler for arm64 architecture
>>>
>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
>>> directory for arm64 architecture.
>>> 2. Temporarily disable sparse checker because of static code checking
>>> failure on arm64
>>
>> Could you provide the sparse error messages?
>> Maybe we could fix them instead of disabling.
>>
>>>
>>> Successful travis build jobs report:
>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
>>
>> There are some issues in Travis in above build.  It seems that Travis fails to upload the
>> resulted cache directory due to missing md5deep:
>>
>> ""
> [Lance]
> The issue occurred because sparse checker does not recognize some arm neon intrinsics:
> 
> 1. Some components in Open vSwitch source code directly includes the header file <arm_neon.h>.
> 
> 2. When compiling OvS with DPDK, OvS includes some DPDK headers, which sometimes includes <arm_neon.h>. You can see the details of the error in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391 after line 2693
> 
> For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it seems that I am unable to fix this issue until DPDK solved it.

Hi.

Thanks for the information.
Could, you, please, check if the following patch fixes the issue:
    https://patchwork.ozlabs.org/patch/1199398/
?

> 
>> store build cache
>> 0.02s5.41sInstalling md5deep
>> Reading package lists...
>> Building dependency tree...
>> Reading state information...
>> md5deep is already the newest version (4.4-2).
>> 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
>> /home/travis/.casher/bin/casher: line 230: md5deep: command not found nothing
>> changed ""
>>
> [Lance]
> Thanks for pointing out the issue. The upload cache on arm is not successful, that means arm jobs will always clone and build DPDK. I just posted this issue to Travis CI community. You can see: https://travis-ci.community/t/no-cache-support-on-arm64/5416/21

Thanks!  Let's wait for their reply.

Best regards, Ilya Maximets.
Lance Yang Nov. 25, 2019, 6:28 a.m. UTC | #4
> -----Original Message-----
> From: Ilya Maximets <i.maximets@ovn.org>
> Sent: Friday, November 22, 2019 6:36 PM
> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya Maximets
> <i.maximets@ovn.org>; ovs-dev@openvswitch.org
> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
> <Yanqin.Wei@arm.com>
> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>
> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
> > Hi Ilya,
> >
> > Thanks for your reply. Please see the inline reply.
> >
> > Best regards,
> > Lance Yang
> >
> >> -----Original Message-----
> >> From: Ilya Maximets <i.maximets@ovn.org>
> >> Sent: Friday, November 22, 2019 3:47 AM
> >> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
> >> dev@openvswitch.org
> >> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
> >> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
> >> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
> >> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
> >> <Ruifeng.Wang@arm.com>
> >> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
> >> for arm
> >>
> >> On 20.11.2019 9:15, Lance Yang wrote:
> >>> Enable part of travis jobs with gcc compiler for arm64 architecture
> >>>
> >>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
> >>> directory for arm64 architecture.
> >>> 2. Temporarily disable sparse checker because of static code
> >>> checking failure on arm64
> >>
> >> Could you provide the sparse error messages?
> >> Maybe we could fix them instead of disabling.
> >>
> >>>
> >>> Successful travis build jobs report:
> >>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
> >>
> >> There are some issues in Travis in above build.  It seems that Travis
> >> fails to upload the resulted cache directory due to missing md5deep:
> >>
> >> ""
> > [Lance]
> > The issue occurred because sparse checker does not recognize some arm neon intrinsics:
> >
> > 1. Some components in Open vSwitch source code directly includes the header file
> <arm_neon.h>.
> >
> > 2. When compiling OvS with DPDK, OvS includes some DPDK headers, which
> > sometimes includes <arm_neon.h>. You can see the details of the error
> > in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391
> > after line 2693
> >
> > For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set
> v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it
> seems that I am unable to fix this issue until DPDK solved it.
>
> Hi.
>
> Thanks for the information.
> Could, you, please, check if the following patch fixes the issue:
>     https://patchwork.ozlabs.org/patch/1199398/
> ?
[Lance]
Thanks for your reply.

I downloaded and applied the patch from patchwork. However, it seems that the patch does not work as expected. I attached the original travis report link: https://travis-ci.org/yzyuestc/ovs/jobs/616442657#L2692. You can check the error after line 2692.

Thanks for your time.
>
> >
> >> store build cache
> >> 0.02s5.41sInstalling md5deep
> >> Reading package lists...
> >> Building dependency tree...
> >> Reading state information...
> >> md5deep is already the newest version (4.4-2).
> >> 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
> >> /home/travis/.casher/bin/casher: line 230: md5deep: command not found
> >> nothing changed ""
> >>
> > [Lance]
> > Thanks for pointing out the issue. The upload cache on arm is not
> > successful, that means arm jobs will always clone and build DPDK. I
> > just posted this issue to Travis CI community. You can see:
> > https://travis-ci.community/t/no-cache-support-on-arm64/5416/21
>
> Thanks!  Let's wait for their reply.
>
> Best regards, Ilya Maximets.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Ilya Maximets Nov. 26, 2019, 12:37 p.m. UTC | #5
On 25.11.2019 7:28, Lance Yang (Arm Technology China) wrote:
> 
> 
>> -----Original Message-----
>> From: Ilya Maximets <i.maximets@ovn.org>
>> Sent: Friday, November 22, 2019 6:36 PM
>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya Maximets
>> <i.maximets@ovn.org>; ovs-dev@openvswitch.org
>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
>> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
>> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
>> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
>> <Yanqin.Wei@arm.com>
>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>>
>> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
>>> Hi Ilya,
>>>
>>> Thanks for your reply. Please see the inline reply.
>>>
>>> Best regards,
>>> Lance Yang
>>>
>>>> -----Original Message-----
>>>> From: Ilya Maximets <i.maximets@ovn.org>
>>>> Sent: Friday, November 22, 2019 3:47 AM
>>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
>>>> dev@openvswitch.org
>>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
>>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
>>>> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
>>>> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
>>>> <Ruifeng.Wang@arm.com>
>>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
>>>> for arm
>>>>
>>>> On 20.11.2019 9:15, Lance Yang wrote:
>>>>> Enable part of travis jobs with gcc compiler for arm64 architecture
>>>>>
>>>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
>>>>> directory for arm64 architecture.
>>>>> 2. Temporarily disable sparse checker because of static code
>>>>> checking failure on arm64
>>>>
>>>> Could you provide the sparse error messages?
>>>> Maybe we could fix them instead of disabling.
>>>>
>>>>>
>>>>> Successful travis build jobs report:
>>>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
>>>>
>>>> There are some issues in Travis in above build.  It seems that Travis
>>>> fails to upload the resulted cache directory due to missing md5deep:
>>>>
>>>> ""
>>> [Lance]
>>> The issue occurred because sparse checker does not recognize some arm neon intrinsics:
>>>
>>> 1. Some components in Open vSwitch source code directly includes the header file
>> <arm_neon.h>.
>>>
>>> 2. When compiling OvS with DPDK, OvS includes some DPDK headers, which
>>> sometimes includes <arm_neon.h>. You can see the details of the error
>>> in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391
>>> after line 2693
>>>
>>> For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set
>> v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it
>> seems that I am unable to fix this issue until DPDK solved it.
>>
>> Hi.
>>
>> Thanks for the information.
>> Could, you, please, check if the following patch fixes the issue:
>>     https://patchwork.ozlabs.org/patch/1199398/
>> ?
> [Lance]
> Thanks for your reply.
> 
> I downloaded and applied the patch from patchwork. However, it seems that the patch does not work as expected. I attached the original travis report link: https://travis-ci.org/yzyuestc/ovs/jobs/616442657#L2692. You can check the error after line 2692.


Thanks for checking.  I found the root cause.
The issue is that GCC has NEON vector types as compiler built-in types.
x86 vector types (e.g. __m128i) are typedefs of a normal types with
a special 'vector_size' attribute that sparse understands.  But it
can not understand special built-in types.  Note that clang defines
NEON vector types with 'vector_size' attribute inside arm_neon.h, so
it's unclear why GCC doesn't do the same.

So, there are 3 options on how we can fix that:

1. Create special include/sparse/arm_neon.h  header and mock all the
   GCC built-ins for NEON support.  This doesn't look very hard, but
   could take some time.  I tried to re-define all the base types this
   way, but it requires something else and I need to look at exact
   arm_neon.h that is in use to understand what is missing. We, probably,
   will have to mock a bunch of NEON-specific built-in functions too.
   Not sure if it worth the efforts.

2. Add NEON support to sparse itself, i.e. allow it to understand GCC
   specific vector types and built-in functions.  That is the most
   clean solution, but requires development in a different project and
   it's unclear when this support will be integrated to upstream sparse.

3. Just disable sparse for ARM in our Travis for now.  The easiest
   solution that you've already implemented.  So, we, probably, should
   start from this.  One thing that I'm asking is to add more information
   why it was disabled in commit message and in a comment in the travis
   file.  You may use some parts of my investigation above.

Best regards, Ilya Maximets.
Ilya Maximets Nov. 26, 2019, 12:47 p.m. UTC | #6
On 26.11.2019 13:37, Ilya Maximets wrote:
> On 25.11.2019 7:28, Lance Yang (Arm Technology China) wrote:
>>
>>
>>> -----Original Message-----
>>> From: Ilya Maximets <i.maximets@ovn.org>
>>> Sent: Friday, November 22, 2019 6:36 PM
>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya Maximets
>>> <i.maximets@ovn.org>; ovs-dev@openvswitch.org
>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
>>> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
>>> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
>>> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
>>> <Yanqin.Wei@arm.com>
>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>>>
>>> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
>>>> Hi Ilya,
>>>>
>>>> Thanks for your reply. Please see the inline reply.
>>>>
>>>> Best regards,
>>>> Lance Yang
>>>>
>>>>> -----Original Message-----
>>>>> From: Ilya Maximets <i.maximets@ovn.org>
>>>>> Sent: Friday, November 22, 2019 3:47 AM
>>>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
>>>>> dev@openvswitch.org
>>>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
>>>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
>>>>> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
>>>>> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
>>>>> <Ruifeng.Wang@arm.com>
>>>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
>>>>> for arm
>>>>>
>>>>> On 20.11.2019 9:15, Lance Yang wrote:
>>>>>> Enable part of travis jobs with gcc compiler for arm64 architecture
>>>>>>
>>>>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
>>>>>> directory for arm64 architecture.
>>>>>> 2. Temporarily disable sparse checker because of static code
>>>>>> checking failure on arm64
>>>>>
>>>>> Could you provide the sparse error messages?
>>>>> Maybe we could fix them instead of disabling.
>>>>>
>>>>>>
>>>>>> Successful travis build jobs report:
>>>>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
>>>>>
>>>>> There are some issues in Travis in above build.  It seems that Travis
>>>>> fails to upload the resulted cache directory due to missing md5deep:
>>>>>
>>>>> ""
>>>> [Lance]
>>>> The issue occurred because sparse checker does not recognize some arm neon intrinsics:
>>>>
>>>> 1. Some components in Open vSwitch source code directly includes the header file
>>> <arm_neon.h>.
>>>>
>>>> 2. When compiling OvS with DPDK, OvS includes some DPDK headers, which
>>>> sometimes includes <arm_neon.h>. You can see the details of the error
>>>> in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391
>>>> after line 2693
>>>>
>>>> For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set
>>> v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it
>>> seems that I am unable to fix this issue until DPDK solved it.
>>>
>>> Hi.
>>>
>>> Thanks for the information.
>>> Could, you, please, check if the following patch fixes the issue:
>>>     https://patchwork.ozlabs.org/patch/1199398/
>>> ?
>> [Lance]
>> Thanks for your reply.
>>
>> I downloaded and applied the patch from patchwork. However, it seems that the patch does not work as expected. I attached the original travis report link: https://travis-ci.org/yzyuestc/ovs/jobs/616442657#L2692. You can check the error after line 2692.
> 
> 
> Thanks for checking.  I found the root cause.
> The issue is that GCC has NEON vector types as compiler built-in types.
> x86 vector types (e.g. __m128i) are typedefs of a normal types with
> a special 'vector_size' attribute that sparse understands.  But it
> can not understand special built-in types.  Note that clang defines
> NEON vector types with 'vector_size' attribute inside arm_neon.h, so
> it's unclear why GCC doesn't do the same.
> 
> So, there are 3 options on how we can fix that:
> 
> 1. Create special include/sparse/arm_neon.h  header and mock all the
>    GCC built-ins for NEON support.  This doesn't look very hard, but
>    could take some time.  I tried to re-define all the base types this
>    way, but it requires something else and I need to look at exact
>    arm_neon.h that is in use to understand what is missing. We, probably,
>    will have to mock a bunch of NEON-specific built-in functions too.
>    Not sure if it worth the efforts.
> 
> 2. Add NEON support to sparse itself, i.e. allow it to understand GCC
>    specific vector types and built-in functions.  That is the most
>    clean solution, but requires development in a different project and
>    it's unclear when this support will be integrated to upstream sparse.
> 
> 3. Just disable sparse for ARM in our Travis for now.  The easiest
>    solution that you've already implemented.  So, we, probably, should
>    start from this.  One thing that I'm asking is to add more information
>    why it was disabled in commit message and in a comment in the travis
>    file.  You may use some parts of my investigation above.

There is one more option is to use clang for ARM64 build instead of gcc.
We're not using sparse for clang builds right now.  If we'll be lucky
someday to make sparse work with clang in our Travis environment, there
should be no such big issues with NEON, because clang doesn't use built-in
types.

Is it possible to build OVS with clang on aarch64 in Travis?

Best regards, Ilya Maximets.
Lance Yang Nov. 27, 2019, 7:11 a.m. UTC | #7
> -----Original Message-----
> From: Ilya Maximets <i.maximets@ovn.org>
> Sent: Friday, November 22, 2019 6:36 PM
> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya Maximets
> <i.maximets@ovn.org>; ovs-dev@openvswitch.org
> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
> <Yanqin.Wei@arm.com>
> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>
> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
> > Hi Ilya,
> >
> > Thanks for your reply. Please see the inline reply.
> >
> > Best regards,
> > Lance Yang
> >
> >> -----Original Message-----
> >> From: Ilya Maximets <i.maximets@ovn.org>
> >> Sent: Friday, November 22, 2019 3:47 AM
> >> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
> >> dev@openvswitch.org
> >> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
> >> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
> >> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
> >> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
> >> <Ruifeng.Wang@arm.com>
> >> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
> >> for arm
> >>
> >> On 20.11.2019 9:15, Lance Yang wrote:
> >>> Enable part of travis jobs with gcc compiler for arm64 architecture
> >>>
> >>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
> >>> directory for arm64 architecture.
> >>> 2. Temporarily disable sparse checker because of static code
> >>> checking failure on arm64
> >>
> >> Could you provide the sparse error messages?
> >> Maybe we could fix them instead of disabling.
> >>
> >>>
> >>> Successful travis build jobs report:
> >>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
> >>
> >> There are some issues in Travis in above build.  It seems that Travis
> >> fails to upload the resulted cache directory due to missing md5deep:
> >>
> >> ""
> > [Lance]
> > The issue occurred because sparse checker does not recognize some arm neon intrinsics:
> >
> > 1. Some components in Open vSwitch source code directly includes the header file
> <arm_neon.h>.
> >
> > 2. When compiling OvS with DPDK, OvS includes some DPDK headers, which
> > sometimes includes <arm_neon.h>. You can see the details of the error
> > in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391
> > after line 2693
> >
> > For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set
> v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it
> seems that I am unable to fix this issue until DPDK solved it.
>
> Hi.
>
> Thanks for the information.
> Could, you, please, check if the following patch fixes the issue:
>     https://patchwork.ozlabs.org/patch/1199398/
> ?
>
> >
> >> store build cache
> >> 0.02s5.41sInstalling md5deep
> >> Reading package lists...
> >> Building dependency tree...
> >> Reading state information...
> >> md5deep is already the newest version (4.4-2).
> >> 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
> >> /home/travis/.casher/bin/casher: line 230: md5deep: command not found
> >> nothing changed ""
> >>
> > [Lance]
> > Thanks for pointing out the issue. The upload cache on arm is not
> > successful, that means arm jobs will always clone and build DPDK. I
> > just posted this issue to Travis CI community. You can see:
> > https://travis-ci.community/t/no-cache-support-on-arm64/5416/21
>
> Thanks!  Let's wait for their reply.
>
> Best regards, Ilya Maximets.
[Lance]

Hi Ilya,

It seems that travis CI has fixed the md5deep: command not found issue. You can refer the link: https://travis-ci.community/t/no-cache-support-on-arm64/5416/23?u=yzyuestc. And if you check https://travis-ci.community/t/no-cache-support-on-arm64/5416/26?u=yzyuestc, you will find Travis has deployed it to production.

I triggered a build and found it works, the report on line 5093: https://travis-ci.org/yzyuestc/ovs/jobs/616991450#L5093 It shows the correct directory has been uploaded successfully.

Best regards,
Lance
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Lance Yang Nov. 27, 2019, 7:49 a.m. UTC | #8
> -----Original Message-----
> From: Ilya Maximets <i.maximets@ovn.org>
> Sent: Tuesday, November 26, 2019 8:48 PM
> To: Ilya Maximets <i.maximets@ovn.org>; Lance Yang (Arm Technology China)
> <Lance.Yang@arm.com>; ovs-dev@openvswitch.org
> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
> <Yanqin.Wei@arm.com>; Ben Pfaff <blp@ovn.org>
> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>
> On 26.11.2019 13:37, Ilya Maximets wrote:
> > On 25.11.2019 7:28, Lance Yang (Arm Technology China) wrote:
> >>
> >>
> >>> -----Original Message-----
> >>> From: Ilya Maximets <i.maximets@ovn.org>
> >>> Sent: Friday, November 22, 2019 6:36 PM
> >>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya
> >>> Maximets <i.maximets@ovn.org>; ovs-dev@openvswitch.org
> >>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
> >>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
> >>> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
> >>> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
> >>> <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
> >>> <Yanqin.Wei@arm.com>
> >>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
> >>> for arm
> >>>
> >>> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
> >>>> Hi Ilya,
> >>>>
> >>>> Thanks for your reply. Please see the inline reply.
> >>>>
> >>>> Best regards,
> >>>> Lance Yang
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Ilya Maximets <i.maximets@ovn.org>
> >>>>> Sent: Friday, November 22, 2019 3:47 AM
> >>>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
> >>>>> dev@openvswitch.org
> >>>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
> >>>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni
> >>>>> (Arm Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com;
> >>>>> nd <nd@arm.com>; Ruifeng Wang (Arm Technology China)
> >>>>> <Ruifeng.Wang@arm.com>
> >>>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
> >>>>> for arm
> >>>>>
> >>>>> On 20.11.2019 9:15, Lance Yang wrote:
> >>>>>> Enable part of travis jobs with gcc compiler for arm64
> >>>>>> architecture
> >>>>>>
> >>>>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk
> >>>>>> cache directory for arm64 architecture.
> >>>>>> 2. Temporarily disable sparse checker because of static code
> >>>>>> checking failure on arm64
> >>>>>
> >>>>> Could you provide the sparse error messages?
> >>>>> Maybe we could fix them instead of disabling.
> >>>>>
> >>>>>>
> >>>>>> Successful travis build jobs report:
> >>>>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
> >>>>>
> >>>>> There are some issues in Travis in above build.  It seems that
> >>>>> Travis fails to upload the resulted cache directory due to missing md5deep:
> >>>>>
> >>>>> ""
> >>>> [Lance]
> >>>> The issue occurred because sparse checker does not recognize some arm neon
> intrinsics:
> >>>>
> >>>> 1. Some components in Open vSwitch source code directly includes
> >>>> the header file
> >>> <arm_neon.h>.
> >>>>
> >>>> 2. When compiling OvS with DPDK, OvS includes some DPDK headers,
> >>>> which sometimes includes <arm_neon.h>. You can see the details of
> >>>> the error in the report at:
> >>>> https://travis-ci.org/yzyuestc/ovs/jobs/615414391
> >>>> after line 2693
> >>>>
> >>>> For the first issue where OvS directly imported the arm_neon.h,  I
> >>>> can fix it in my patch set
> >>> v2. However, for the second issue that DPDK project has imported the
> >>> arm neon intrinsics, it seems that I am unable to fix this issue until DPDK solved it.
> >>>
> >>> Hi.
> >>>
> >>> Thanks for the information.
> >>> Could, you, please, check if the following patch fixes the issue:
> >>>     https://patchwork.ozlabs.org/patch/1199398/
> >>> ?
> >> [Lance]
> >> Thanks for your reply.
> >>
> >> I downloaded and applied the patch from patchwork. However, it seems that the patch
> does not work as expected. I attached the original travis report link: https://travis-
> ci.org/yzyuestc/ovs/jobs/616442657#L2692. You can check the error after line 2692.
> >
> >
> > Thanks for checking.  I found the root cause.
> > The issue is that GCC has NEON vector types as compiler built-in types.
> > x86 vector types (e.g. __m128i) are typedefs of a normal types with a
> > special 'vector_size' attribute that sparse understands.  But it can
> > not understand special built-in types.  Note that clang defines NEON
> > vector types with 'vector_size' attribute inside arm_neon.h, so it's
> > unclear why GCC doesn't do the same.
> >
> > So, there are 3 options on how we can fix that:
> >
> > 1. Create special include/sparse/arm_neon.h  header and mock all the
> >    GCC built-ins for NEON support.  This doesn't look very hard, but
> >    could take some time.  I tried to re-define all the base types this
> >    way, but it requires something else and I need to look at exact
> >    arm_neon.h that is in use to understand what is missing. We, probably,
> >    will have to mock a bunch of NEON-specific built-in functions too.
> >    Not sure if it worth the efforts.
> >
> > 2. Add NEON support to sparse itself, i.e. allow it to understand GCC
> >    specific vector types and built-in functions.  That is the most
> >    clean solution, but requires development in a different project and
> >    it's unclear when this support will be integrated to upstream sparse.
> >
> > 3. Just disable sparse for ARM in our Travis for now.  The easiest
> >    solution that you've already implemented.  So, we, probably, should
> >    start from this.  One thing that I'm asking is to add more information
> >    why it was disabled in commit message and in a comment in the travis
> >    file.  You may use some parts of my investigation above.
>
> There is one more option is to use clang for ARM64 build instead of gcc.
> We're not using sparse for clang builds right now.  If we'll be lucky someday to make sparse
> work with clang in our Travis environment, there should be no such big issues with NEON,
> because clang doesn't use built-in types.
>
> Is it possible to build OVS with clang on aarch64 in Travis?
>
> Best regards, Ilya Maximets.
[Lance]

Hi Ilya,

Thanks for the options you provided.

We will enable clang jobs on aarch64 in the next step. As a short-term solution, we prefer the third option to temporarily disable sparse running arm jobs. Meanwhile, we can wait for the sparse supports on neon.

Best regards,
Lance


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Ilya Maximets Nov. 28, 2019, 7:02 p.m. UTC | #9
On 27.11.2019 8:49, Lance Yang (Arm Technology China) wrote:
> 
> 
>> -----Original Message-----
>> From: Ilya Maximets <i.maximets@ovn.org>
>> Sent: Tuesday, November 26, 2019 8:48 PM
>> To: Ilya Maximets <i.maximets@ovn.org>; Lance Yang (Arm Technology China)
>> <Lance.Yang@arm.com>; ovs-dev@openvswitch.org
>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
>> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
>> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
>> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
>> <Yanqin.Wei@arm.com>; Ben Pfaff <blp@ovn.org>
>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>>
>> On 26.11.2019 13:37, Ilya Maximets wrote:
>>> On 25.11.2019 7:28, Lance Yang (Arm Technology China) wrote:
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Ilya Maximets <i.maximets@ovn.org>
>>>>> Sent: Friday, November 22, 2019 6:36 PM
>>>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya
>>>>> Maximets <i.maximets@ovn.org>; ovs-dev@openvswitch.org
>>>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
>>>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
>>>>> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
>>>>> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
>>>>> <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
>>>>> <Yanqin.Wei@arm.com>
>>>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
>>>>> for arm
>>>>>
>>>>> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
>>>>>> Hi Ilya,
>>>>>>
>>>>>> Thanks for your reply. Please see the inline reply.
>>>>>>
>>>>>> Best regards,
>>>>>> Lance Yang
>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Ilya Maximets <i.maximets@ovn.org>
>>>>>>> Sent: Friday, November 22, 2019 3:47 AM
>>>>>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
>>>>>>> dev@openvswitch.org
>>>>>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
>>>>>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni
>>>>>>> (Arm Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com;
>>>>>>> nd <nd@arm.com>; Ruifeng Wang (Arm Technology China)
>>>>>>> <Ruifeng.Wang@arm.com>
>>>>>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
>>>>>>> for arm
>>>>>>>
>>>>>>> On 20.11.2019 9:15, Lance Yang wrote:
>>>>>>>> Enable part of travis jobs with gcc compiler for arm64
>>>>>>>> architecture
>>>>>>>>
>>>>>>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk
>>>>>>>> cache directory for arm64 architecture.
>>>>>>>> 2. Temporarily disable sparse checker because of static code
>>>>>>>> checking failure on arm64
>>>>>>>
>>>>>>> Could you provide the sparse error messages?
>>>>>>> Maybe we could fix them instead of disabling.
>>>>>>>
>>>>>>>>
>>>>>>>> Successful travis build jobs report:
>>>>>>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
>>>>>>>
>>>>>>> There are some issues in Travis in above build.  It seems that
>>>>>>> Travis fails to upload the resulted cache directory due to missing md5deep:
>>>>>>>
>>>>>>> ""
>>>>>> [Lance]
>>>>>> The issue occurred because sparse checker does not recognize some arm neon
>> intrinsics:
>>>>>>
>>>>>> 1. Some components in Open vSwitch source code directly includes
>>>>>> the header file
>>>>> <arm_neon.h>.
>>>>>>
>>>>>> 2. When compiling OvS with DPDK, OvS includes some DPDK headers,
>>>>>> which sometimes includes <arm_neon.h>. You can see the details of
>>>>>> the error in the report at:
>>>>>> https://travis-ci.org/yzyuestc/ovs/jobs/615414391
>>>>>> after line 2693
>>>>>>
>>>>>> For the first issue where OvS directly imported the arm_neon.h,  I
>>>>>> can fix it in my patch set
>>>>> v2. However, for the second issue that DPDK project has imported the
>>>>> arm neon intrinsics, it seems that I am unable to fix this issue until DPDK solved it.
>>>>>
>>>>> Hi.
>>>>>
>>>>> Thanks for the information.
>>>>> Could, you, please, check if the following patch fixes the issue:
>>>>>     https://patchwork.ozlabs.org/patch/1199398/
>>>>> ?
>>>> [Lance]
>>>> Thanks for your reply.
>>>>
>>>> I downloaded and applied the patch from patchwork. However, it seems that the patch
>> does not work as expected. I attached the original travis report link: https://travis-
>> ci.org/yzyuestc/ovs/jobs/616442657#L2692. You can check the error after line 2692.
>>>
>>>
>>> Thanks for checking.  I found the root cause.
>>> The issue is that GCC has NEON vector types as compiler built-in types.
>>> x86 vector types (e.g. __m128i) are typedefs of a normal types with a
>>> special 'vector_size' attribute that sparse understands.  But it can
>>> not understand special built-in types.  Note that clang defines NEON
>>> vector types with 'vector_size' attribute inside arm_neon.h, so it's
>>> unclear why GCC doesn't do the same.
>>>
>>> So, there are 3 options on how we can fix that:
>>>
>>> 1. Create special include/sparse/arm_neon.h  header and mock all the
>>>    GCC built-ins for NEON support.  This doesn't look very hard, but
>>>    could take some time.  I tried to re-define all the base types this
>>>    way, but it requires something else and I need to look at exact
>>>    arm_neon.h that is in use to understand what is missing. We, probably,
>>>    will have to mock a bunch of NEON-specific built-in functions too.
>>>    Not sure if it worth the efforts.
>>>
>>> 2. Add NEON support to sparse itself, i.e. allow it to understand GCC
>>>    specific vector types and built-in functions.  That is the most
>>>    clean solution, but requires development in a different project and
>>>    it's unclear when this support will be integrated to upstream sparse.
>>>
>>> 3. Just disable sparse for ARM in our Travis for now.  The easiest
>>>    solution that you've already implemented.  So, we, probably, should
>>>    start from this.  One thing that I'm asking is to add more information
>>>    why it was disabled in commit message and in a comment in the travis
>>>    file.  You may use some parts of my investigation above.
>>
>> There is one more option is to use clang for ARM64 build instead of gcc.
>> We're not using sparse for clang builds right now.  If we'll be lucky someday to make sparse
>> work with clang in our Travis environment, there should be no such big issues with NEON,
>> because clang doesn't use built-in types.
>>
>> Is it possible to build OVS with clang on aarch64 in Travis?
>>
>> Best regards, Ilya Maximets.
> [Lance]
> 
> Hi Ilya,
> 
> Thanks for the options you provided.
> 
> We will enable clang jobs on aarch64 in the next step. As a short-term solution, we prefer the third option to temporarily disable sparse running arm jobs. Meanwhile, we can wait for the sparse supports on neon.
I don't think that sparse will support neon in a near future.
So, the option #3 should be our choice.

Best regards, Ilya Maximets.
Ilya Maximets Nov. 28, 2019, 7:06 p.m. UTC | #10
On 27.11.2019 8:11, Lance Yang (Arm Technology China) wrote:
> 
>> -----Original Message-----
>> From: Ilya Maximets <i.maximets@ovn.org>
>> Sent: Friday, November 22, 2019 6:36 PM
>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya Maximets
>> <i.maximets@ovn.org>; ovs-dev@openvswitch.org
>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
>> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
>> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
>> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
>> <Yanqin.Wei@arm.com>
>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>>
>> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
>>> Hi Ilya,
>>>
>>> Thanks for your reply. Please see the inline reply.
>>>
>>> Best regards,
>>> Lance Yang
>>>
>>>> -----Original Message-----
>>>> From: Ilya Maximets <i.maximets@ovn.org>
>>>> Sent: Friday, November 22, 2019 3:47 AM
>>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
>>>> dev@openvswitch.org
>>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
>>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
>>>> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
>>>> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
>>>> <Ruifeng.Wang@arm.com>
>>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
>>>> for arm
>>>>
>>>> On 20.11.2019 9:15, Lance Yang wrote:
>>>>> Enable part of travis jobs with gcc compiler for arm64 architecture
>>>>>
>>>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk cache
>>>>> directory for arm64 architecture.
>>>>> 2. Temporarily disable sparse checker because of static code
>>>>> checking failure on arm64
>>>>
>>>> Could you provide the sparse error messages?
>>>> Maybe we could fix them instead of disabling.
>>>>
>>>>>
>>>>> Successful travis build jobs report:
>>>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
>>>>
>>>> There are some issues in Travis in above build.  It seems that Travis
>>>> fails to upload the resulted cache directory due to missing md5deep:
>>>>
>>>> ""
>>> [Lance]
>>> The issue occurred because sparse checker does not recognize some arm neon intrinsics:
>>>
>>> 1. Some components in Open vSwitch source code directly includes the header file
>> <arm_neon.h>.
>>>
>>> 2. When compiling OvS with DPDK, OvS includes some DPDK headers, which
>>> sometimes includes <arm_neon.h>. You can see the details of the error
>>> in the report at: https://travis-ci.org/yzyuestc/ovs/jobs/615414391
>>> after line 2693
>>>
>>> For the first issue where OvS directly imported the arm_neon.h,  I can fix it in my patch set
>> v2. However, for the second issue that DPDK project has imported the arm neon intrinsics, it
>> seems that I am unable to fix this issue until DPDK solved it.
>>
>> Hi.
>>
>> Thanks for the information.
>> Could, you, please, check if the following patch fixes the issue:
>>     https://patchwork.ozlabs.org/patch/1199398/
>> ?
>>
>>>
>>>> store build cache
>>>> 0.02s5.41sInstalling md5deep
>>>> Reading package lists...
>>>> Building dependency tree...
>>>> Reading state information...
>>>> md5deep is already the newest version (4.4-2).
>>>> 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
>>>> /home/travis/.casher/bin/casher: line 230: md5deep: command not found
>>>> nothing changed ""
>>>>
>>> [Lance]
>>> Thanks for pointing out the issue. The upload cache on arm is not
>>> successful, that means arm jobs will always clone and build DPDK. I
>>> just posted this issue to Travis CI community. You can see:
>>> https://travis-ci.community/t/no-cache-support-on-arm64/5416/21
>>
>> Thanks!  Let's wait for their reply.
>>
>> Best regards, Ilya Maximets.
> [Lance]
> 
> Hi Ilya,
> 
> It seems that travis CI has fixed the md5deep: command not found issue. You can refer the link: https://travis-ci.community/t/no-cache-support-on-arm64/5416/23?u=yzyuestc. And if you check https://travis-ci.community/t/no-cache-support-on-arm64/5416/26?u=yzyuestc, you will find Travis has deployed it to production.
> 
> I triggered a build and found it works, the report on line 5093: https://travis-ci.org/yzyuestc/ovs/jobs/616991450#L5093 It shows the correct directory has been uploaded successfully.

Cool. Thank you.
Will you send a v2 of this series?

Best regards, Ilya maximets.
Lance Yang Nov. 29, 2019, 2:44 a.m. UTC | #11
> -----Original Message-----
> From: Ilya Maximets <i.maximets@ovn.org>
> Sent: Friday, November 29, 2019 3:06 AM
> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya Maximets
> <i.maximets@ovn.org>; ovs-dev@openvswitch.org
> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm Technology China)
> <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd <nd@arm.com>; Ruifeng Wang (Arm
> Technology China) <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
> <Yanqin.Wei@arm.com>
> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI for arm
>
> On 27.11.2019 8:11, Lance Yang (Arm Technology China) wrote:
> >
> >> -----Original Message-----
> >> From: Ilya Maximets <i.maximets@ovn.org>
> >> Sent: Friday, November 22, 2019 6:36 PM
> >> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; Ilya
> >> Maximets <i.maximets@ovn.org>; ovs-dev@openvswitch.org
> >> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
> >> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni (Arm
> >> Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com; nd
> >> <nd@arm.com>; Ruifeng Wang (Arm Technology China)
> >> <Ruifeng.Wang@arm.com>; Yanqin Wei (Arm Technology China)
> >> <Yanqin.Wei@arm.com>
> >> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
> >> for arm
> >>
> >> On 22.11.2019 10:35, Lance Yang (Arm Technology China) wrote:
> >>> Hi Ilya,
> >>>
> >>> Thanks for your reply. Please see the inline reply.
> >>>
> >>> Best regards,
> >>> Lance Yang
> >>>
> >>>> -----Original Message-----
> >>>> From: Ilya Maximets <i.maximets@ovn.org>
> >>>> Sent: Friday, November 22, 2019 3:47 AM
> >>>> To: Lance Yang (Arm Technology China) <Lance.Yang@arm.com>; ovs-
> >>>> dev@openvswitch.org
> >>>> Cc: Jieqiang Wang (Arm Technology China) <Jieqiang.Wang@arm.com>;
> >>>> Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; Jingzhao Ni
> >>>> (Arm Technology China) <Jingzhao.Ni@arm.com>; dwilder@us.ibm.com;
> >>>> nd <nd@arm.com>; Ruifeng Wang (Arm Technology China)
> >>>> <Ruifeng.Wang@arm.com>
> >>>> Subject: Re: [ovs-dev] [PATCH v1 4/4] travis: Enable OVS Travis CI
> >>>> for arm
> >>>>
> >>>> On 20.11.2019 9:15, Lance Yang wrote:
> >>>>> Enable part of travis jobs with gcc compiler for arm64
> >>>>> architecture
> >>>>>
> >>>>> 1. Add arm jobs into the matrix in .travis.yml and define dpdk
> >>>>> cache directory for arm64 architecture.
> >>>>> 2. Temporarily disable sparse checker because of static code
> >>>>> checking failure on arm64
> >>>>
> >>>> Could you provide the sparse error messages?
> >>>> Maybe we could fix them instead of disabling.
> >>>>
> >>>>>
> >>>>> Successful travis build jobs report:
> >>>>> https://travis-ci.org/yzyuestc/ovs/builds/614299933
> >>>>
> >>>> There are some issues in Travis in above build.  It seems that
> >>>> Travis fails to upload the resulted cache directory due to missing md5deep:
> >>>>
> >>>> ""
> >>> [Lance]
> >>> The issue occurred because sparse checker does not recognize some arm neon
> intrinsics:
> >>>
> >>> 1. Some components in Open vSwitch source code directly includes the
> >>> header file
> >> <arm_neon.h>.
> >>>
> >>> 2. When compiling OvS with DPDK, OvS includes some DPDK headers,
> >>> which sometimes includes <arm_neon.h>. You can see the details of
> >>> the error in the report at:
> >>> https://travis-ci.org/yzyuestc/ovs/jobs/615414391
> >>> after line 2693
> >>>
> >>> For the first issue where OvS directly imported the arm_neon.h,  I
> >>> can fix it in my patch set
> >> v2. However, for the second issue that DPDK project has imported the
> >> arm neon intrinsics, it seems that I am unable to fix this issue until DPDK solved it.
> >>
> >> Hi.
> >>
> >> Thanks for the information.
> >> Could, you, please, check if the following patch fixes the issue:
> >>     https://patchwork.ozlabs.org/patch/1199398/
> >> ?
> >>
> >>>
> >>>> store build cache
> >>>> 0.02s5.41sInstalling md5deep
> >>>> Reading package lists...
> >>>> Building dependency tree...
> >>>> Reading state information...
> >>>> md5deep is already the newest version (4.4-2).
> >>>> 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
> >>>> /home/travis/.casher/bin/casher: line 230: md5deep: command not
> >>>> found nothing changed ""
> >>>>
> >>> [Lance]
> >>> Thanks for pointing out the issue. The upload cache on arm is not
> >>> successful, that means arm jobs will always clone and build DPDK. I
> >>> just posted this issue to Travis CI community. You can see:
> >>> https://travis-ci.community/t/no-cache-support-on-arm64/5416/21
> >>
> >> Thanks!  Let's wait for their reply.
> >>
> >> Best regards, Ilya Maximets.
> > [Lance]
> >
> > Hi Ilya,
> >
> > It seems that travis CI has fixed the md5deep: command not found issue. You can refer
> the link: https://travis-ci.community/t/no-cache-support-on-arm64/5416/23?u=yzyuestc.
> And if you check https://travis-ci.community/t/no-cache-support-on-
> arm64/5416/26?u=yzyuestc, you will find Travis has deployed it to production.
> >
> > I triggered a build and found it works, the report on line 5093: https://travis-
> ci.org/yzyuestc/ovs/jobs/616991450#L5093 It shows the correct directory has been
> uploaded successfully.
>
> Cool. Thank you.
> Will you send a v2 of this series?
>
> Best regards, Ilya maximets.
[Lance]

Yes. Once we update for v2, we will send you the series.

All the best.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 2dc4d43..f82e484 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,6 +50,24 @@  matrix:
     - os: osx
       compiler: clang
       env: OPTS="--disable-ssl"
+    - arch: arm64
+      compiler: gcc
+      env: OPTS="--disable-ssl"
+    - arch: arm64
+      compiler: gcc
+      env: KERNEL_LIST="5.0 4.20 4.19 4.18 4.17 4.16"
+    - arch: arm64
+      compiler: gcc
+      env: KERNEL_LIST="4.15 4.14 4.9 4.4 3.16"
+    - arch: arm64
+      compiler: gcc
+      env: DPDK=1 OPTS="--enable-shared"
+    - arch: arm64
+      compiler: gcc
+      env: DPDK_SHARED=1
+    - arch: arm64
+      compiler: gcc
+      env: DPDK_SHARED=1 OPTS="--enable-shared"
 
 script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS
 
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 557f397..ab8c621 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -88,6 +88,8 @@  function install_dpdk()
     if [ -z "$TARGET" -a -z "$TRAVIS_ARCH" ] ||
        [ "$TRAVIS_ARCH" == "amd64" ]; then
         TARGET="x86_64-native-linuxapp-gcc"
+    elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
+        TARGET="arm64-armv8a-linuxapp-gcc"
     else
         echo "Target is unknown"
         exit 1
@@ -194,7 +196,9 @@  elif [ "$M32" ]; then
     # difference on 'configure' and 'make' stages.
     export CC="$CC -m32"
 else
-    OPTS="--enable-sparse"
+    if [ "$TRAVIS_ARCH" != "aarch64" ]; then
+        OPTS="--enable-sparse"
+    fi
     if [ "$AFXDP" ]; then
         # netdev-afxdp uses memset for 64M for umem initialization.
         SPARSE_FLAGS="${SPARSE_FLAGS} -Wno-memcpy-max-count"