On Sun, Sep 08, 2019 at 10:18:56PM +0800, [email protected] 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.

Reply via email to