aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/xgbe/xgbe.h
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2017-06-28 13:42:51 -0500
committerDavid S. Miller <davem@davemloft.net>2017-06-29 15:14:18 -0400
commit18f9f0ac55629b298b1e975c4ed1c86aa21eafb0 (patch)
tree7dbbf1400d5361f5a697b3777ee05adca07bb2a9 /drivers/net/ethernet/amd/xgbe/xgbe.h
parentamd-xgbe: Re-issue interrupt if interrupt status not cleared (diff)
downloadlinux-dev-18f9f0ac55629b298b1e975c4ed1c86aa21eafb0.tar.xz
linux-dev-18f9f0ac55629b298b1e975c4ed1c86aa21eafb0.zip
amd-xgbe: Add NUMA affinity support for memory allocations
Add support to perform memory allocations on the node of the device. The original allocation or the ring structure and Tx/Rx queues allocated all of the memory at once and then carved it up for each channel and queue. To best ensure that we get as much memory from the NUMA node as we can, break the channel and ring allocations into individual allocations. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe.h')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
index 2834961a9c25..ac3b5588b845 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
@@ -412,6 +412,7 @@ struct xgbe_ring {
/* Page allocation for RX buffers */
struct xgbe_page_alloc rx_hdr_pa;
struct xgbe_page_alloc rx_buf_pa;
+ int node;
/* Ring index values
* cur - Tx: index of descriptor to be used for current transfer
@@ -462,6 +463,8 @@ struct xgbe_channel {
struct xgbe_ring *tx_ring;
struct xgbe_ring *rx_ring;
+
+ int node;
} ____cacheline_aligned;
enum xgbe_state {
@@ -1012,7 +1015,7 @@ struct xgbe_prv_data {
struct timer_list service_timer;
/* Rings for Tx/Rx on a DMA channel */
- struct xgbe_channel *channel;
+ struct xgbe_channel *channel[XGBE_MAX_DMA_CHANNELS];
unsigned int tx_max_channel_count;
unsigned int rx_max_channel_count;
unsigned int channel_count;