Re: [PATCH net-next v3 0/5] expand meter tables and fix bug
From: David Miller <davem@davemloft.net>
Date: 2020-04-23 19:49:58
From: David Miller <davem@davemloft.net> Date: Thu, 23 Apr 2020 12:45:29 -0700 (PDT)
From: xiangxia.m.yue@gmail.com Date: Thu, 23 Apr 2020 01:08:55 +0800quoted
From: Tonghao Zhang <redacted> 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),
^~~