[Devel] [PATCH RHEL COMMIT] net/drivers/i40e: suppress high order allocation warning
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Sep 30 16:04:07 MSK 2021
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit dba28ac16c741ec290a4e1b890dc8d5a7af34c75
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Thu Sep 30 16:04:06 2021 +0300
net/drivers/i40e: suppress high order allocation warning
If we use RDMA over Intel X722 NICs we get complains about 3rd order
allocation in i40e_setup_tx_descriptors().
bi_size = sizeof(struct i40e_tx_buffer) * tx_ring->count;
sizeof(struct i40e_tx_buffer) == 40 bytes and
tx_ring->count can easily be I40E_DEFAULT_NUM_DESCRIPTORS == 512,
so total allocation size is 20480 bytes.
tx_ring is used for DMA, so we cannot switch to kvmalloc() here,
allocation happens on interface UP and on some parameters
change via ethtool, so it's not an often case,
so let's just suppress the warning here.
https://pmc.acronis.com/browse/VSTOR-18622
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Merged two patches together during rebase to vz8
- 483f8f01c553 ("net/drivers/i40e: suppress high order allocation warning")
- 3dec55f2ccf6 ("net/drivers/i40e: suppress high order allocation warning - addon")
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
(cherry picked from vz8 commit d9b7967371434cac6e792ca715d791a76c79bb71)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 10a83e5385c7..74143f3480b5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1429,7 +1429,7 @@ int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring)
/* warn if we are about to overwrite the pointer */
WARN_ON(tx_ring->tx_bi);
bi_size = sizeof(struct i40e_tx_buffer) * tx_ring->count;
- tx_ring->tx_bi = kzalloc(bi_size, GFP_KERNEL);
+ tx_ring->tx_bi = kzalloc(bi_size, GFP_KERNEL | __GFP_ORDER_NOWARN);
if (!tx_ring->tx_bi)
goto err;
More information about the Devel
mailing list