gve: Fix GFP flags when allocing pages
authorCatherine Sullivan <csully@google.com>
Wed, 26 Jan 2022 00:38:43 +0000 (16:38 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Jan 2022 02:45:01 +0000 (18:45 -0800)
commita92f7a6feeb3884c69c1c7c1f13bccecb2228ad0
treee4a4d0446b0e81dd2892478b99326e64db6f9872
parent2f6513284347432d137ce54e30baae2aa5d5f55c
gve: Fix GFP flags when allocing pages

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>
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