On 12/19/2019 9:56 PM, Pablo Neira Ayuso wrote: > Call nf_flow_table_iterate_cleanup() to remove flowtable entries. > This patch is implicitly handling the NETDEV_UNREGISTER and the > flowtable removal cases (while there are still entries in place). Hi Pablo, I test the flowtable meeting the same problem with flowtable delete. For NETDEV_UNREGISTER case there is no necessary to do this. The flow_offload_netdev_event in the nft_flow_offload with NETDEV_DOWN( previous to UNREGISTER) will do nf_flow_table_cleanup(dev); For flowtable delete case, it will do cleanup things in nf_flow_table_free, but this is later than UNBIND. First it make UNBIND call after the free operation. But only UNBIND setup before flows cleanup can't guarantee the flows delete in the hardware. The real delete in nf_flow_offload_work handler. I fix it through adding a refcont for the flow_block to make sure the hardware flows clean before UNBIND setup. I test my patch with mellaonx card. This patch is http://patchwork.ozlabs.org/patch/1213936/ welcome some commends and other solution idea. Thx! BR wenxu