lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Jan 2013 03:44:36 -0800
From:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To:	davem@...emloft.net
Cc:	Alexander Duyck <alexander.h.duyck@...el.com>,
	netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: [net-next 03/13] ixgbe: Add debug counters for Tx Encap CSUM

From: Alexander Duyck <alexander.h.duyck@...el.com>

This patch adds counters for debugging the vxlan Tx offloading implementation.

Signed-off-by: Alexander Duyck <alexander.h.duyck@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe.h         | 4 ++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 7 +++++++
 3 files changed, 13 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 8371ae4..5d178ea 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -190,6 +190,8 @@ struct ixgbe_tx_queue_stats {
 	u64 restart_queue;
 	u64 tx_busy;
 	u64 tx_done_old;
+	u64 csum_encap_good;
+	u64 csum_good;
 };
 
 struct ixgbe_rx_queue_stats {
@@ -548,6 +550,8 @@ struct ixgbe_adapter {
 	struct ixgbe_hw_stats stats;
 
 	u64 tx_busy;
+	u64 tx_csum_encap_good;
+	u64 tx_csum_good;
 	unsigned int tx_ring_count;
 	unsigned int rx_ring_count;
 
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 1513b10..036c0a5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -101,6 +101,8 @@ static const struct ixgbe_stats ixgbe_gstrings_stats[] = {
 	{"rx_flow_control_xon", IXGBE_STAT(stats.lxonrxc)},
 	{"tx_flow_control_xoff", IXGBE_STAT(stats.lxofftxc)},
 	{"rx_flow_control_xoff", IXGBE_STAT(stats.lxoffrxc)},
+	{"tx_csum_encap_good", IXGBE_STAT(tx_csum_encap_good)},
+	{"tx_csum_good", IXGBE_STAT(tx_csum_good)},
 	{"rx_csum_offload_errors", IXGBE_STAT(hw_csum_rx_error)},
 	{"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)},
 	{"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)},
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 3719f32..c6cf1a6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -5150,6 +5150,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
 	u64 non_eop_descs = 0, restart_queue = 0, tx_busy = 0;
 	u64 alloc_rx_page_failed = 0, alloc_rx_buff_failed = 0;
 	u64 bytes = 0, packets = 0, hw_csum_rx_error = 0;
+	u64 tx_csum_good = 0, tx_csum_encap_good = 0;
 
 	if (test_bit(__IXGBE_DOWN, &adapter->state) ||
 	    test_bit(__IXGBE_RESETTING, &adapter->state))
@@ -5191,9 +5192,13 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
 		tx_busy += tx_ring->tx_stats.tx_busy;
 		bytes += tx_ring->stats.bytes;
 		packets += tx_ring->stats.packets;
+		tx_csum_encap_good += tx_ring->tx_stats.csum_encap_good;
+		tx_csum_good += tx_ring->tx_stats.csum_good;
 	}
 	adapter->restart_queue = restart_queue;
 	adapter->tx_busy = tx_busy;
+	adapter->tx_csum_encap_good = tx_csum_encap_good;
+	adapter->tx_csum_good = tx_csum_good;
 	netdev->stats.tx_bytes = bytes;
 	netdev->stats.tx_packets = packets;
 
@@ -5994,11 +5999,13 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
 			transport_hdr.raw = skb_inner_transport_header(skb);
 			vlan_macip_lens |= skb_inner_network_offset(skb) <<
 					   IXGBE_ADVTXD_MACLEN_SHIFT;
+			tx_ring->tx_stats.csum_encap_good++;
 		} else {
 			network_hdr.raw = skb_network_header(skb);
 			transport_hdr.raw = skb_transport_header(skb);
 			vlan_macip_lens |= skb_network_offset(skb) <<
 					   IXGBE_ADVTXD_MACLEN_SHIFT;
+			tx_ring->tx_stats.csum_good++;
 		}
 
 		/* use first 4 bits to determine IP version */
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ