Message ID | 1587575340-6790-1-git-send-email-xiangxia.m.yue@gmail.com |
---|---|
Headers | show |
Series | expand meter tables and fix bug | expand |
From: xiangxia.m.yue@gmail.com Date: Thu, 23 Apr 2020 01:08:55 +0800 > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > The patch set expand or shrink the meter table when necessary. > and other patches fix bug or improve codes. Series applied, thanks.
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 +0800 > >> From: Tonghao Zhang <xiangxia.m.yue@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), ^~~
On Fri, Apr 24, 2020 at 3:49 AM David Miller <davem@davemloft.net> wrote: > > 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 +0800 > > > >> From: Tonghao Zhang <xiangxia.m.yue@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.
From: Tonghao Zhang <xiangxia.m.yue@gmail.com> The patch set expand or shrink the meter table when necessary. and other patches fix bug or improve codes. Tonghao Zhang (5): net: openvswitch: expand the meters supported number net: openvswitch: set max limitation to meters net: openvswitch: remove the unnecessary check net: openvswitch: make EINVAL return value more obvious net: openvswitch: use u64 for meter bucket net/openvswitch/datapath.h | 2 +- net/openvswitch/meter.c | 303 ++++++++++++++++++++++++++++--------- net/openvswitch/meter.h | 20 ++- 3 files changed, 247 insertions(+), 78 deletions(-)