diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-06-12 22:01:58 +0200 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-17 05:02:04 +0200 |
commit | 3c8def9776c3d4636291432522ea312f7a44be95 (patch) | |
tree | eec2cc837656dd9ee2a5e16dd7648d6a18e592d1 /drivers/net/benet/be.h | |
parent | netfilter: ipset: whitespace and coding fixes detected by checkpatch.pl (diff) | |
download | linux-3c8def9776c3d4636291432522ea312f7a44be95.tar.xz linux-3c8def9776c3d4636291432522ea312f7a44be95.zip |
be2net: support multiple TX queues
This patch provides support for multiple TX queues.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r-- | drivers/net/benet/be.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index a7db870d1641..a36f5a6a8462 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h @@ -87,6 +87,7 @@ static inline char *nic_name(struct pci_dev *pdev) #define MAX_RSS_QS 4 /* BE limit is 4 queues/port */ #define MAX_RX_QS (MAX_RSS_QS + 1) /* RSS qs + 1 def Rx */ +#define MAX_TX_QS 8 #define BE_MAX_MSIX_VECTORS (MAX_RX_QS + 1)/* RX + TX */ #define BE_NAPI_WEIGHT 64 #define MAX_RX_POST BE_NAPI_WEIGHT /* Frags posted at a time */ @@ -170,7 +171,6 @@ struct be_tx_stats { u32 be_tx_reqs; /* number of TX requests initiated */ u32 be_tx_stops; /* number of times TX Q was stopped */ u32 be_tx_wrbs; /* number of tx WRBs used */ - u32 be_tx_events; /* number of tx completion events */ u32 be_tx_compl; /* number of tx completion entries processed */ ulong be_tx_jiffies; u64 be_tx_bytes; @@ -184,6 +184,7 @@ struct be_tx_obj { struct be_queue_info cq; /* Remember the skbs that were transmitted */ struct sk_buff *sent_skb_list[TX_Q_LEN]; + struct be_tx_stats stats; }; /* Struct to remember the pages posted for rx frags */ @@ -319,8 +320,8 @@ struct be_adapter { /* TX Rings */ struct be_eq_obj tx_eq; - struct be_tx_obj tx_obj; - struct be_tx_stats tx_stats; + struct be_tx_obj tx_obj[MAX_TX_QS]; + u8 num_tx_qs; u32 cache_line_break[8]; @@ -391,7 +392,7 @@ struct be_adapter { extern const struct ethtool_ops be_ethtool_ops; #define msix_enabled(adapter) (adapter->num_msix_vec > 0) -#define tx_stats(adapter) (&adapter->tx_stats) +#define tx_stats(txo) (&txo->stats) #define rx_stats(rxo) (&rxo->stats) #define BE_SET_NETDEV_OPS(netdev, ops) (netdev->netdev_ops = ops) @@ -405,6 +406,10 @@ extern const struct ethtool_ops be_ethtool_ops; for (i = 0, rxo = &adapter->rx_obj[i+1]; i < (adapter->num_rx_qs - 1);\ i++, rxo++) +#define for_all_tx_queues(adapter, txo, i) \ + for (i = 0, txo = &adapter->tx_obj[i]; i < adapter->num_tx_qs; \ + i++, txo++) + #define PAGE_SHIFT_4K 12 #define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K) |