* Re: [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
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
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2023-08-22 7:30 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, pabeni, edumazet, razor, mlxsw
On Mon, Aug 21, 2023 at 05:19:23PM +0300, 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>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
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
2023-08-22 18:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Kalesh Anakkur Purayil @ 2023-08-22 7:56 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, pabeni, edumazet, razor, mlxsw
[-- Attachment #1.1: Type: text/plain, Size: 1250 bytes --]
On Mon, Aug 21, 2023 at 7:51 PM Ido Schimmel <idosch@nvidia.com> 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>
>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.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);
> --
> 2.40.1
>
>
>
--
Regards,
Kalesh A P
[-- Attachment #1.2: Type: text/html, Size: 2078 bytes --]
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
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
2023-08-22 18:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Nikolay Aleksandrov @ 2023-08-22 10:12 UTC (permalink / raw)
To: Ido Schimmel, netdev; +Cc: davem, kuba, pabeni, edumazet, mlxsw
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>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
2023-08-21 14:19 [PATCH net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC Ido Schimmel
` (2 preceding siblings ...)
2023-08-22 10:12 ` Nikolay Aleksandrov
@ 2023-08-22 18:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-22 18:10 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, pabeni, edumazet, razor, mlxsw
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 21 Aug 2023 17:19:23 +0300 you 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>
>
> [...]
Here is the summary with links:
- [net-next] vxlan: vnifilter: Use GFP_KERNEL instead of GFP_ATOMIC
https://git.kernel.org/netdev/net-next/c/63c11dc2ca8b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread