[ovs-dev] [PATCH net-next v3 0/5] expand meter tables and fix bug

Tonghao Zhang xiangxia.m.yue at gmail.com
Thu Apr 23 22:56:39 UTC 2020


On Fri, Apr 24, 2020 at 3:49 AM David Miller <davem at davemloft.net> wrote:
>
> From: David Miller <davem at davemloft.net>
> Date: Thu, 23 Apr 2020 12:45:29 -0700 (PDT)
>
> > From: xiangxia.m.yue at gmail.com
> > Date: Thu, 23 Apr 2020 01:08:55 +0800
> >
> >> From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> >>
> >> The patch set expand or shrink the meter table when necessary.
> >> and other patches fix bug or improve codes.
> >
> > Series applied, thanks.
>
> Actually I had to revert, this adds build warnings:
>
> In file included from ./include/linux/uio.h:8,
>                  from ./include/linux/socket.h:8,
>                  from ./include/uapi/linux/if.h:25,
>                  from net/openvswitch/meter.c:8:
> net/openvswitch/meter.c: In function ‘ovs_meters_init’:
> ./include/linux/kernel.h:842:29: warning: comparison of distinct pointer types lacks a cast
>    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
>                              ^~
> ./include/linux/kernel.h:856:4: note: in expansion of macro ‘__typecheck’
>    (__typecheck(x, y) && __no_side_effects(x, y))
>     ^~~~~~~~~~~
> ./include/linux/kernel.h:866:24: note: in expansion of macro ‘__safe_cmp’
>   __builtin_choose_expr(__safe_cmp(x, y), \
>                         ^~~~~~~~~~
> ./include/linux/kernel.h:875:19: note: in expansion of macro ‘__careful_cmp’
>  #define min(x, y) __careful_cmp(x, y, <)
>                    ^~~~~~~~~~~~~
> net/openvswitch/meter.c:733:28: note: in expansion of macro ‘min’
>   tbl->max_meters_allowed = min(free_mem_bytes / sizeof(struct dp_meter),
>                             ^~~
The gcc compiler is tool old(4.8), and I did not found that building warning,
Then I use 9.3 gcc to build kernel and fix that warning. min function
checks the type of vars.
The patch 2 introduced that. v4 version will be sent, Thanks.
-- 
Best regards, Tonghao


More information about the dev mailing list