From 271e8b794700022fcd93d37967fa999ddee47698 Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Tue, 30 Aug 2011 15:27:40 +0000 Subject: bna: TX Path and RX Path Changes Change details: - Add bnad_pci_unmap_skb() API to unmap skb from transmit path and update the unmap index. Add more checks for illegal skbs in transmit path. Add tx_skb counters for dropped skbs. - The unmap_cons index used in bnad_free_txbufs() is incorrectly declared as u16. It quickly wraps around and accesses null sk_buff ptr. So using u32 to handle unmap_array. - Disable and enable interrupts from the same polling context to prevent reordering in Rx path. - Add Rx NAPI debug counters. - Make NAPI budget check more generic. - Modify dim timer stop logic to make it dependent on cfg and run flags - Handle reduced MSI-X vectors case in bnad_enable_msix. - Check for single frame TSO skbs and send them out as non-TSO. - Put memory barrier after bna_txq_prod_indx_doorbell(). Signed-off-by: Gurunatha Karaje Signed-off-by: Rasesh Mody Signed-off-by: David S. Miller --- drivers/net/ethernet/brocade/bna/bnad.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/brocade/bna/bnad.h') diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h index 60c2e9d534a7..cae33e1e3839 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.h +++ b/drivers/net/ethernet/brocade/bna/bnad.h @@ -56,6 +56,11 @@ struct bnad_rx_ctrl { struct bnad *bnad; unsigned long flags; struct napi_struct napi; + u64 rx_intr_ctr; + u64 rx_poll_ctr; + u64 rx_schedule; + u64 rx_keep_poll; + u64 rx_complete; }; #define BNAD_RXMODE_PROMISC_DEFAULT BNA_RXMODE_PROMISC @@ -148,6 +153,20 @@ struct bnad_drv_stats { u64 udpcsum_offload; u64 csum_help; u64 csum_help_err; + u64 tx_skb_too_short; + u64 tx_skb_stopping; + u64 tx_skb_max_vectors; + u64 tx_skb_mss_too_long; + u64 tx_skb_tso_too_short; + u64 tx_skb_tso_prepare; + u64 tx_skb_non_tso_too_long; + u64 tx_skb_tcp_hdr; + u64 tx_skb_udp_hdr; + u64 tx_skb_csum_err; + u64 tx_skb_headlen_too_long; + u64 tx_skb_headlen_zero; + u64 tx_skb_frag_zero; + u64 tx_skb_len_mismatch; u64 hw_stats_updates; u64 netif_rx_schedule; @@ -346,7 +365,7 @@ extern void bnad_netdev_hwstats_fill(struct bnad *bnad, #define bnad_enable_rx_irq_unsafe(_ccb) \ { \ - if (likely(test_bit(BNAD_RXQ_STARTED, &ccb->rcb[0]->flags))) {\ + if (likely(test_bit(BNAD_RXQ_STARTED, &(_ccb)->rcb[0]->flags))) {\ bna_ib_coalescing_timer_set((_ccb)->i_dbell, \ (_ccb)->rx_coalescing_timeo); \ bna_ib_ack((_ccb)->i_dbell, 0); \ -- cgit v1.2.3-55-g7522