]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
gve: Fix GFP flags when allocing pages
authorCatherine Sullivan <csully@google.com>
Wed, 26 Jan 2022 00:38:43 +0000 (16:38 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 3 Feb 2022 09:28:54 +0000 (10:28 +0100)
commitdd07de572e411be2ec9ccf0f0573066839935804
tree32c5977c9e0f3f593c892963d4e38b2df05eb438
parentafd9df4fc230afbb1b6d5bb1c75402d2b979df68
gve: Fix GFP flags when allocing pages

BugLink: https://bugs.launchpad.net/bugs/1959879
[ Upstream commit a92f7a6feeb3884c69c1c7c1f13bccecb2228ad0 ]

Use GFP_ATOMIC when allocating pages out of the hotpath,
continue to use GFP_KERNEL when allocating pages during setup.

GFP_KERNEL will allow blocking which allows it to succeed
more often in a low memory enviornment but in the hotpath we do
not want to allow the allocation to block.

Fixes: f5cedc84a30d2 ("gve: Add transmit and receive support")
Signed-off-by: Catherine Sullivan <csully@google.com>
Signed-off-by: David Awogbemila <awogbemila@google.com>
Link: https://lore.kernel.org/r/20220126003843.3584521-1-awogbemila@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_rx.c
drivers/net/ethernet/google/gve/gve_rx_dqo.c