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 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?

Like this, you fix all the problems already in the tree (missing
mutex, missing check for offload hardware flag...) in one single go?

Thank you.



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

  Powered by Linux