On 9/12/24 15:47, Eelco Chaudron wrote:
> 
> 
> On 12 Sep 2024, at 14:58, Ilya Maximets wrote:
> 
>> On 9/3/24 11:37, Eelco Chaudron wrote:
>>> The odp_flow_format() function applies a wildcard mask when a
>>> mask for a given key was not present. However, in the context of
>>> installing flows in the datapath, the absence of a mask actually
>>> indicates that the key should be ignored, meaning it should not
>>> be masked at all.
>>>
>>> To address this inconsistency, odp_flow_format() now includes an
>>> option to skip formatting keys that are missing a mask.
>>>
>>> Signed-off-by: Eelco Chaudron <[email protected]>
>>> ---
>>>  lib/dpctl.c            |  4 ++--
>>>  lib/dpif-netdev.c      |  6 +++---
>>>  lib/dpif.c             |  4 ++--
>>>  lib/odp-util.c         | 31 ++++++++++++++++++-------------
>>>  lib/odp-util.h         |  2 +-
>>>  lib/tnl-ports.c        |  2 +-
>>>  ofproto/ofproto-dpif.c |  2 +-
>>>  tests/test-odp.c       |  6 ++++--
>>>  8 files changed, 32 insertions(+), 25 deletions(-)
>>
>>
>> Hi, Eelco.
>>
>> I got a notification from oss-fuzz that this change broke the build
>> of the fuzzing target:
>>  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=71524
>>
>> Step #3 - "compile-afl-address-x86_64": mv -f $depbase.Tpo $depbase.Po
>> Step #3 - "compile-afl-address-x86_64": tests/oss-fuzz/odp_target.c:84:72: 
>> error: too few arguments to function call, expected 8, have 7
>> Step #3 - "compile-afl-address-x86_64":    83 |         
>> odp_flow_format(odp_key.data, odp_key.size,
>> Step #3 - "compile-afl-address-x86_64":       |         ~~~~~~~~~~~~~~~
>> Step #3 - "compile-afl-address-x86_64":    84 |                         
>> odp_mask.data, odp_mask.size, NULL, &out, false);
>> Step #3 - "compile-afl-address-x86_64":       |                              
>>                                           ^
>> Step #3 - "compile-afl-address-x86_64": ./lib/odp-util.h:171:6: note: 
>> 'odp_flow_format' declared here
>> Step #3 - "compile-afl-address-x86_64":   171 | void odp_flow_format(const 
>> struct nlattr *key, size_t key_len,
>> Step #3 - "compile-afl-address-x86_64":       |      ^               
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Step #3 - "compile-afl-address-x86_64":   172 |                      const 
>> struct nlattr *mask, size_t mask_len,
>> Step #3 - "compile-afl-address-x86_64":       |                      
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Step #3 - "compile-afl-address-x86_64":   173 |                      const 
>> struct hmap *portno_names, struct ds *,
>> Step #3 - "compile-afl-address-x86_64":       |                      
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Step #3 - "compile-afl-address-x86_64":   174 |                      bool 
>> verbose, bool skip_no_mask);
>> Step #3 - "compile-afl-address-x86_64":       |                      
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Step #3 - "compile-afl-address-x86_64": 1 error generated.
>> Step #3 - "compile-afl-address-x86_64": make: *** [Makefile:4718: 
>> tests/oss-fuzz/odp_target.o] Error 1
>> Step #3 - "compile-afl-address-x86_64": 
>> ********************************************************************************
>> Step #3 - "compile-afl-address-x86_64": Failed to build.
>> Step #3 - "compile-afl-address-x86_64": To reproduce, run:
>> Step #3 - "compile-afl-address-x86_64": python infra/helper.py build_image 
>> openvswitch
>> Step #3 - "compile-afl-address-x86_64": python infra/helper.py build_fuzzers 
>> --sanitizer address --engine afl --architecture x86_64 openvswitch
>> Step #3 - "compile-afl-address-x86_64": 
>> ********************************************************************************
>> Finished Step #3 - "compile-afl-address-x86_64"
>> ERROR
>> ERROR: build step 3 "gcr.io/cloud-builders/docker" failed: step exited with 
>> non-zero status: 1
>>
>>
>> Could you, please, send a fix?
> 
> Sent a patch…

Thanks!

> I learned something new today, as I was not aware OVS was part of this 
> project.
> Should we do the build as part of the CI?

I don't remember how long does it take to build, but I remember it pulls
a pile of large container images that takes a while.  Not sure how that
will impact our CI times.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to