[ovs-dev] [branch-2.9 3/3] conntrack: Replace structure copy by memcpy().

Ilya Maximets i.maximets at samsung.com
Wed May 8 08:41:16 UTC 2019


> On Thu, May 02, 2019 at 05:29:16PM -0700, Darrell Ball wrote:
>> There are a few cases where structure copy can be replaced by
>> memcpy(), for possible portability benefit.  This is because
>> the structures involved have padding and elements of the
>> structure are used to generate hashes.
>> 
>> Signed-off-by: Darrell Ball <dlu998 at gmail.com>
> 
> Thanks for the backports.  I applied them to branch-2.9.

Hi. These patches broke the clang build on branch-2.9 and it looks
like not only the build:

lib/conntrack.c:2563:26: error: expecting mutex 'ctb->lock' to be held at start
      of each loop [-Werror,-Wthread-safety-analysis]
    for (unsigned i = 0; i < CONNTRACK_BUCKETS; i++) {
                         ^
lib/conntrack.c:2566:9: note: mutex acquired here
        ct_lock_lock(&ctb->lock);
        ^
lib/conntrack.c:2575:9: error: releasing mutex '->buckets[i].lock' that was not
      held [-Werror,-Wthread-safety-analysis]
        ct_lock_unlock(&ct->buckets[i].lock);
        ^
2 errors generated.
make[2]: *** [lib/conntrack.lo] Error 1

https://travis-ci.org/openvswitch/ovs/builds/528984734


Best regards, Ilya Maximets.


More information about the dev mailing list