Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-03 Thread wenxu
在 2019/8/3 8:21, Jakub Kicinski 写道: > On Sat, 3 Aug 2019 07:19:31 +0800, wenxu wrote: >>> Or: >>> >>> device unregister: >>> - nft block destroy >>> - UNBIND cb >>> - free driver's block state >>> - driver notifier callback >>> - free driver's state >>> >>> No? >> For the seco

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread Jakub Kicinski
On Sat, 3 Aug 2019 07:19:31 +0800, wenxu wrote: > > Or: > > > > device unregister: > > - nft block destroy > > - UNBIND cb > > - free driver's block state > > - driver notifier callback > > - free driver's state > > > > No? > > For the second case maybe can't unbind cb? because

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread wenxu
在 2019/8/3 2:02, Jakub Kicinski 写道: > On Fri, 2 Aug 2019 21:09:03 +0800, wenxu wrote: We'd have something like the loop in flow_get_default_block(): for each (subsystem) subsystem->handle_new_indir_cb(indr_dev, cb); And then per-subsystem logic would ac

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread Jakub Kicinski
On Fri, 2 Aug 2019 21:09:03 +0800, wenxu wrote: > >> We'd have something like the loop in flow_get_default_block(): > >> > >>for each (subsystem) > >>subsystem->handle_new_indir_cb(indr_dev, cb); > >> > >> And then per-subsystem logic would actually call the cb. Or: > >> > >>for

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread wenxu
在 2019/8/2 18:45, wenxu 写道: > On 8/2/2019 7:11 AM, Jakub Kicinski wrote: >> On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: >>> From: wenxu >>> >>> The new flow-indr-block can't get the tcf_block >>> directly. It provide a callback list to find the flow_block immediately >>> when the

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread wenxu
On 8/2/2019 7:11 AM, Jakub Kicinski wrote: > On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: >> From: wenxu >> >> The new flow-indr-block can't get the tcf_block >> directly. It provide a callback list to find the flow_block immediately >> when the device register and contain a ingres

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-01 Thread Jakub Kicinski
On Fri, 2 Aug 2019 10:47:26 +0800, wenxu wrote: > > After all the same device may have both a TC block and a NFT block. > > Only one subsystem can be used for the same device for both indr-dev and > hw-dev > the flow_block_cb_is_busy avoid the situation you mentioned. AFAIU that's a temporary

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-01 Thread wenxu
On 8/2/2019 7:11 AM, Jakub Kicinski wrote: > On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: >> From: wenxu >> >> The new flow-indr-block can't get the tcf_block >> directly. It provide a callback list to find the flow_block immediately >> when the device register and contain a ingres

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-01 Thread Jakub Kicinski
On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: > From: wenxu > > The new flow-indr-block can't get the tcf_block > directly. It provide a callback list to find the flow_block immediately > when the device register and contain a ingress block. > > Signed-off-by: wenxu First of all t

[PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-07-31 Thread wenxu
From: wenxu The new flow-indr-block can't get the tcf_block directly. It provide a callback list to find the flow_block immediately when the device register and contain a ingress block. Signed-off-by: wenxu --- v5: add get_block_cb_list for both nft and tc include/net/flow_offload.h | 17