aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasesh Mody <rmody@brocade.com>2013-12-17 20:07:36 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-18 00:30:33 -0500
commit66f9513a1213dfc5332b9675d206d47763b81761 (patch)
tree1b8aa8835fbe4e1d18ca436ac97430b83b62d888
parente29aa33912dd71b1446e01d6d7a1b95d0e81f996 (diff)
bna: RX Processing and Config Changes
Change Details: - Prefetch header in GRO path. This reduces napi_frags_skb time from 9% to 5%. - Changed the configurable limit of RxQ depth to 16384 (was 2048). - bnad_rx_unmap_q elements are cachealigned. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.c5
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 0e9f8f5b6009..3061dc5e7a64 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -536,6 +536,11 @@ bnad_cq_setup_skb_frags(struct bna_rcb *rcb, struct sk_buff *skb,
536 536
537 unmap_q = rcb->unmap_q; 537 unmap_q = rcb->unmap_q;
538 bnad = rcb->bnad; 538 bnad = rcb->bnad;
539
540 /* prefetch header */
541 prefetch(page_address(unmap_q->unmap[sop_ci].page) +
542 unmap_q->unmap[sop_ci].page_offset);
543
539 for (vec = 1, ci = sop_ci; vec <= nvecs; vec++) { 544 for (vec = 1, ci = sop_ci; vec <= nvecs; vec++) {
540 unmap = &unmap_q->unmap[ci]; 545 unmap = &unmap_q->unmap[ci];
541 BNA_QE_INDX_INC(ci, rcb->q_depth); 546 BNA_QE_INDX_INC(ci, rcb->q_depth);
diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
index 2e6b943262a2..5816a6e7a238 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.h
+++ b/drivers/net/ethernet/brocade/bna/bnad.h
@@ -84,7 +84,7 @@ struct bnad_rx_ctrl {
84#define BNAD_IOCETH_TIMEOUT 10000 84#define BNAD_IOCETH_TIMEOUT 10000
85 85
86#define BNAD_MIN_Q_DEPTH 512 86#define BNAD_MIN_Q_DEPTH 512
87#define BNAD_MAX_RXQ_DEPTH 2048 87#define BNAD_MAX_RXQ_DEPTH 16384
88#define BNAD_MAX_TXQ_DEPTH 2048 88#define BNAD_MAX_TXQ_DEPTH 2048
89 89
90#define BNAD_JUMBO_MTU 9000 90#define BNAD_JUMBO_MTU 9000
@@ -237,9 +237,9 @@ struct bnad_rx_vector {
237 237
238struct bnad_rx_unmap { 238struct bnad_rx_unmap {
239 struct page *page; 239 struct page *page;
240 u32 page_offset;
241 struct sk_buff *skb; 240 struct sk_buff *skb;
242 struct bnad_rx_vector vector; 241 struct bnad_rx_vector vector;
242 u32 page_offset;
243}; 243};
244 244
245enum bnad_rxbuf_type { 245enum bnad_rxbuf_type {
@@ -257,7 +257,7 @@ struct bnad_rx_unmap_q {
257 int alloc_order; 257 int alloc_order;
258 u32 map_size; 258 u32 map_size;
259 enum bnad_rxbuf_type type; 259 enum bnad_rxbuf_type type;
260 struct bnad_rx_unmap unmap[0]; 260 struct bnad_rx_unmap unmap[0] ____cacheline_aligned;
261}; 261};
262 262
263#define BNAD_PCI_DEV_IS_CAT2(_bnad) \ 263#define BNAD_PCI_DEV_IS_CAT2(_bnad) \