[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220818223402.1294091-2-anthony.l.nguyen@intel.com>
Date: Thu, 18 Aug 2022 15:34:01 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com
Cc: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
netdev@...r.kernel.org, anthony.l.nguyen@...el.com,
Ira Weiny <ira.weiny@...el.com>,
Alexander Duyck <alexander.duyck@...il.com>,
Alexander Duyck <alexanderduyck@...com>,
Gurucharan <gurucharanx.g@...el.com>
Subject: [PATCH net-next 1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Pages allocated with GFP_ATOMIC cannot come from Highmem. This is why
there is no need to call kmap() on them.
Therefore, don't call kmap() on rx_buffer->page() and instead use a
plain page_address() to get the kernel address.
Suggested-by: Ira Weiny <ira.weiny@...el.com>
Suggested-by: Alexander Duyck <alexander.duyck@...il.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
Reviewed-by: Ira Weiny <ira.weiny@...el.com>
Reviewed-by: Alexander Duyck <alexanderduyck@...com>
Tested-by: Gurucharan <gurucharanx.g@...el.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 04f453eabef6..cb5c707538a5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -1964,15 +1964,13 @@ static bool ixgbe_check_lbtest_frame(struct ixgbe_rx_buffer *rx_buffer,
frame_size >>= 1;
- data = kmap(rx_buffer->page) + rx_buffer->page_offset;
+ data = page_address(rx_buffer->page) + rx_buffer->page_offset;
if (data[3] != 0xFF ||
data[frame_size + 10] != 0xBE ||
data[frame_size + 12] != 0xAF)
match = false;
- kunmap(rx_buffer->page);
-
return match;
}
--
2.35.1
Powered by blists - more mailing lists