From: Pablo Neira Ayuso <pablo@netfilter.org>
To: wenxu@ucloud.cn
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next v4 4/4] netfilter: nf_offload: clean offload things when the device unregister
Date: Sun, 8 Sep 2019 18:21:48 +0200 [thread overview]
Message-ID: <20190908162148.eble5o6zuo7k5zx4@salvia> (raw)
In-Reply-To: <1567952336-23669-5-git-send-email-wenxu@ucloud.cn>
On Sun, Sep 08, 2019 at 10:18:56PM +0800, wenxu@ucloud.cn 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.
next prev parent reply other threads:[~2019-09-08 16:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-08 14:18 [PATCH nf-next v4 0/4] netfilter: nf_tables_offload: clean offload things when the device unregister wenxu
2019-09-08 14:18 ` [PATCH nf-next v4 1/4] netfilter: nf_offload: refactor the nft_flow_offload_chain function wenxu
2019-09-08 14:18 ` [PATCH nf-next v4 2/4] netfilter: nf_offload: refactor the nft_flow_offload_rule function wenxu
2019-09-08 14:18 ` [PATCH nf-next v4 3/4] netfilter: nf_tables_offload: add __nft_offload_get_chain function wenxu
2019-09-08 14:18 ` [PATCH nf-next v4 4/4] netfilter: nf_offload: clean offload things when the device unregister wenxu
2019-09-08 16:21 ` Pablo Neira Ayuso [this message]
2019-09-09 3:52 ` wenxu
2019-09-09 11:35 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190908162148.eble5o6zuo7k5zx4@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=wenxu@ucloud.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).