summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-19 17:12:06 +0100
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-18 07:32:28 -0700
commitbf8440e6a6f5fabf7843dbfecb1745e49182fa1c (patch)
tree7c7e8168f65d4af3bf89617d7727264e81d4fc83 /drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
parent682e5f64de0ab5be3fb2de9f66a1da87de48ec09 (diff)
downloadop-kernel-dev-bf8440e6a6f5fabf7843dbfecb1745e49182fa1c.zip
op-kernel-dev-bf8440e6a6f5fabf7843dbfecb1745e49182fa1c.tar.gz
iwlwifi: improve TX cache footprint
Having cmd[], meta[] and skbs[] as separate arrays in the TX queue structure is cache inefficient as we need the data for a given entry together. To improve this, create an array with these three members (allocate meta as part of that struct) so we have the data we need together located together improving cache footprint. The downside is that we need to allocate a lot of memory in one chunk, about 10KiB (on 64-bit) which isn't very efficient. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
index 7caa875..c7f8f40 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
@@ -179,30 +179,33 @@ struct iwl_queue {
* space less than this */
};
+#define TFD_TX_CMD_SLOTS 256
+#define TFD_CMD_SLOTS 32
+
+struct iwl_pcie_tx_queue_entry {
+ struct iwl_device_cmd *cmd;
+ struct sk_buff *skb;
+ struct iwl_cmd_meta meta;
+};
+
/**
* struct iwl_tx_queue - Tx Queue for DMA
* @q: generic Rx/Tx queue descriptor
- * @bd: base of circular buffer of TFDs
- * @cmd: array of command/TX buffer pointers
- * @meta: array of meta data for each command/tx buffer
- * @dma_addr_cmd: physical address of cmd/tx buffer array
- * @txb: array of per-TFD driver data
- * lock: queue lock
- * @time_stamp: time (in jiffies) of last read_ptr change
+ * @tfds: transmit frame descriptors (DMA memory)
+ * @entries: transmit entries (driver state)
+ * @lock: queue lock
+ * @stuck_timer: timer that fires if queue gets stuck
+ * @trans_pcie: pointer back to transport (for timer)
* @need_update: indicates need to update read/write index
+ * @active: stores if queue is active
*
* A Tx queue consists of circular buffer of BDs (a.k.a. TFDs, transmit frame
* descriptors) and required locking structures.
*/
-#define TFD_TX_CMD_SLOTS 256
-#define TFD_CMD_SLOTS 32
-
struct iwl_tx_queue {
struct iwl_queue q;
struct iwl_tfd *tfds;
- struct iwl_device_cmd **cmd;
- struct iwl_cmd_meta *meta;
- struct sk_buff **skbs;
+ struct iwl_pcie_tx_queue_entry *entries;
spinlock_t lock;
struct timer_list stuck_timer;
struct iwl_trans_pcie *trans_pcie;
OpenPOWER on IntegriCloud