Re: [PATCH nf-next v4 4/4] netfilter: nf_offload: clean offload things when the device unregister

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/9/2019 12:21 AM, Pablo Neira Ayuso wrote:
> On Sun, Sep 08, 2019 at 10:18:56PM +0800, wenxu@xxxxxxxxx wrote:
>> +static int nft_offload_netdev_event(struct notifier_block *this,
>> +				    unsigned long event, void *ptr)
>> +{
>> +	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
>> +	struct net *net = dev_net(dev);
>> +	struct nft_chain *chain;
>> +
>> +	mutex_lock(&net->nft.commit_mutex);
>> +	chain = __nft_offload_get_chain(dev);
>> +	if (chain)
>> +		nft_offload_chain_clean(chain);
>> +	mutex_unlock(&net->nft.commit_mutex);
>> +
>> +	return NOTIFY_DONE;
>> +}
> Please, could you update nft_indr_block_cb() to use
> __nft_offload_get_chain() in this series?
Patch 3/4 in this series already  update nft_indr_block_cb() to use __nft_offload_get_chain()
>
> Like this, you fix all the problems already in the tree (missing
> mutex, missing check for offload hardware flag...) in one single go?
So you means drop the missing mutex and offload flags patches. And put all in the __nft_offload_get_chain patch?



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux