Re: [PATCH net-next v2 2/3] net: openvswitch: refactor flow free function

2020-08-24 Thread Tonghao Zhang
On Mon, Aug 24, 2020 at 9:09 PM David Miller wrote: > > From: xiangxia.m@gmail.com > Date: Mon, 24 Aug 2020 15:36:01 +0800 > > > To avoid a bug when deleting flows in the future, add > > BUG_ON in flush flows function. > > BUG_ON() is too severe, I think WARN_ON() or similar are sufficient > b

Re: [PATCH net-next v2 2/3] net: openvswitch: refactor flow free function

2020-08-24 Thread David Miller
From: xiangxia.m@gmail.com Date: Mon, 24 Aug 2020 15:36:01 +0800 > To avoid a bug when deleting flows in the future, add > BUG_ON in flush flows function. BUG_ON() is too severe, I think WARN_ON() or similar are sufficient because the kernel can try to continue operating if this condition is

[PATCH net-next v2 2/3] net: openvswitch: refactor flow free function

2020-08-24 Thread xiangxia . m . yue
From: Tonghao Zhang Decrease table->count and ufid_count unconditionally, because we only don't use count or ufid_count to count when flushing the flows. To simplify the codes, we remove the "count" argument of table_instance_flow_free. To avoid a bug when deleting flows in the future, add BUG_O