aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2012-12-05 02:24:41 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-23 17:32:57 -0500
commit6cb562d6681155190c52ef7603c559c284eef159 (patch)
tree183dd8ccb290d0e7697efabb97b2fec0409c1edb /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
parentf2f33387f999bd914938dc2da4a3408ea14ad878 (diff)
ixgbe: Use watchdog check in favor of BPF for detecting latched timestamp
This patch removes ixgbe_ptp_match, and the corresponding packet filtering from ixgbe driver. This code was previously causing some issues within the hotpath of the driver. However the code also provided a check against possible frozen Rx timestamp due to dropped packets when the Rx ring is full. This patch provides a replacement solution based on the watchdog. To this end, whenever a packet consumes the Rx timestamp it stores the jiffy value in the rx_ring structure. Watchdog updates its own jiffy timer whenever there is no valid timestamp in the registers. If watchdog detects a valid timestamp in the registers, (meaning that no Rx packet has consumed it yet) it will check which time is most recent, the last time in the watchdog, or any time in the rx_rings. If the most recent "event" was more than 5seconds ago, it will flush the Rx timestamp and print a warning message to the syslog. Reported-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e7109de2204a..ab4328842a66 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1441,7 +1441,7 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1441 1441
1442 ixgbe_rx_checksum(rx_ring, rx_desc, skb); 1442 ixgbe_rx_checksum(rx_ring, rx_desc, skb);
1443 1443
1444 ixgbe_ptp_rx_hwtstamp(rx_ring->q_vector, rx_desc, skb); 1444 ixgbe_ptp_rx_hwtstamp(rx_ring, rx_desc, skb);
1445 1445
1446 if ((dev->features & NETIF_F_HW_VLAN_RX) && 1446 if ((dev->features & NETIF_F_HW_VLAN_RX) &&
1447 ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) { 1447 ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) {
@@ -5534,6 +5534,8 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
5534 break; 5534 break;
5535 } 5535 }
5536 5536
5537 adapter->last_rx_ptp_check = jiffies;
5538
5537 if (adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED) 5539 if (adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED)
5538 ixgbe_ptp_start_cyclecounter(adapter); 5540 ixgbe_ptp_start_cyclecounter(adapter);
5539 5541
@@ -5887,6 +5889,7 @@ static void ixgbe_service_task(struct work_struct *work)
5887 ixgbe_fdir_reinit_subtask(adapter); 5889 ixgbe_fdir_reinit_subtask(adapter);
5888 ixgbe_check_hang_subtask(adapter); 5890 ixgbe_check_hang_subtask(adapter);
5889 ixgbe_ptp_overflow_check(adapter); 5891 ixgbe_ptp_overflow_check(adapter);
5892 ixgbe_ptp_rx_hang(adapter);
5890 5893
5891 ixgbe_service_event_complete(adapter); 5894 ixgbe_service_event_complete(adapter);
5892} 5895}