From: Nikolay Aleksandrov <razor@blackwall.org>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, mlxsw@nvidia.com
Subject: Re: [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
Date: Tue, 22 Aug 2023 13:12:49 +0300 [thread overview]
Message-ID: <6cf46180-689d-d6bd-ff39-4c20ff2bf9e4@blackwall.org> (raw)
In-Reply-To: <20230821141923.1889776-1-idosch@nvidia.com>
On 8/21/23 17:19, Ido Schimmel wrote:
> The function is not called from an atomic context so use GFP_KERNEL
> instead of GFP_ATOMIC. The allocation of the per-CPU stats is already
> performed with GFP_KERNEL.
>
> Tested using test_vxlan_vnifiltering.sh with CONFIG_DEBUG_ATOMIC_SLEEP.
>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
> drivers/net/vxlan/vxlan_vnifilter.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/vxlan/vxlan_vnifilter.c b/drivers/net/vxlan/vxlan_vnifilter.c
> index c3ff30ab782e..9c59d0bf8c3d 100644
> --- a/drivers/net/vxlan/vxlan_vnifilter.c
> +++ b/drivers/net/vxlan/vxlan_vnifilter.c
> @@ -696,7 +696,7 @@ static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan,
> {
> struct vxlan_vni_node *vninode;
>
> - vninode = kzalloc(sizeof(*vninode), GFP_ATOMIC);
> + vninode = kzalloc(sizeof(*vninode), GFP_KERNEL);
> if (!vninode)
> return NULL;
> vninode->stats = netdev_alloc_pcpu_stats(struct vxlan_vni_stats_pcpu);
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
next prev parent reply other threads:[~2023-08-22 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 14:19 [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC Ido Schimmel
2023-08-22 7:30 ` Simon Horman
2023-08-22 7:56 ` Kalesh Anakkur Purayil
2023-08-22 10:12 ` Nikolay Aleksandrov [this message]
2023-08-22 18:10 ` patchwork-bot+netdevbpf
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=6cf46180-689d-d6bd-ff39-4c20ff2bf9e4@blackwall.org \
--to=razor@blackwall.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).