aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@intel.com>2014-10-25 06:35:25 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-11-11 08:52:46 -0500
commit215367171badcc3c82e28be56620b9123aa8b528 (patch)
treece480f80ba70eaedf105e6e8d84901be1dab0e56 /drivers/net/ethernet/intel
parent0db4e162e6617ed0d0cb34756b86ab3dc6ad4fbf (diff)
i40e: don't do link_status or stats collection on every ARQ
The ARQ events cause a service_task execution, and we do a link_status check and full stats gathering for each service_task. However, when there are a lot of ARQ events, such as when doing an NVM update, we end up doing 10's if not 100's of these per second, thereby heavily abusing the PCI bus and especially the Firmware. This patch adds a check to keep the service_task from running these periodic tasks more than once per second, while still allowing quick action to service the events. Change-ID: Iec7670c37bfae9791c43fec26df48aea7f70b33e Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Patrick Lu <patrick.lu@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c14
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index f1e33f896439..b7a807b380d7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -269,7 +269,8 @@ struct i40e_pf {
269 u16 msg_enable; 269 u16 msg_enable;
270 char misc_int_name[IFNAMSIZ + 9]; 270 char misc_int_name[IFNAMSIZ + 9];
271 u16 adminq_work_limit; /* num of admin receive queue desc to process */ 271 u16 adminq_work_limit; /* num of admin receive queue desc to process */
272 int service_timer_period; 272 unsigned long service_timer_period;
273 unsigned long service_timer_previous;
273 struct timer_list service_timer; 274 struct timer_list service_timer;
274 struct work_struct service_task; 275 struct work_struct service_task;
275 276
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 1a98e2384b3b..de664631c807 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5449,7 +5449,7 @@ static void i40e_check_hang_subtask(struct i40e_pf *pf)
5449} 5449}
5450 5450
5451/** 5451/**
5452 * i40e_watchdog_subtask - Check and bring link up 5452 * i40e_watchdog_subtask - periodic checks not using event driven response
5453 * @pf: board private structure 5453 * @pf: board private structure
5454 **/ 5454 **/
5455static void i40e_watchdog_subtask(struct i40e_pf *pf) 5455static void i40e_watchdog_subtask(struct i40e_pf *pf)
@@ -5461,6 +5461,15 @@ static void i40e_watchdog_subtask(struct i40e_pf *pf)
5461 test_bit(__I40E_CONFIG_BUSY, &pf->state)) 5461 test_bit(__I40E_CONFIG_BUSY, &pf->state))
5462 return; 5462 return;
5463 5463
5464 /* make sure we don't do these things too often */
5465 if (time_before(jiffies, (pf->service_timer_previous +
5466 pf->service_timer_period)))
5467 return;
5468 pf->service_timer_previous = jiffies;
5469
5470 i40e_check_hang_subtask(pf);
5471 i40e_link_event(pf);
5472
5464 /* Update the stats for active netdevs so the network stack 5473 /* Update the stats for active netdevs so the network stack
5465 * can look at updated numbers whenever it cares to 5474 * can look at updated numbers whenever it cares to
5466 */ 5475 */
@@ -6325,15 +6334,12 @@ static void i40e_service_task(struct work_struct *work)
6325 i40e_vc_process_vflr_event(pf); 6334 i40e_vc_process_vflr_event(pf);
6326 i40e_watchdog_subtask(pf); 6335 i40e_watchdog_subtask(pf);
6327 i40e_fdir_reinit_subtask(pf); 6336 i40e_fdir_reinit_subtask(pf);
6328 i40e_check_hang_subtask(pf);
6329 i40e_sync_filters_subtask(pf); 6337 i40e_sync_filters_subtask(pf);
6330#ifdef CONFIG_I40E_VXLAN 6338#ifdef CONFIG_I40E_VXLAN
6331 i40e_sync_vxlan_filters_subtask(pf); 6339 i40e_sync_vxlan_filters_subtask(pf);
6332#endif 6340#endif
6333 i40e_clean_adminq_subtask(pf); 6341 i40e_clean_adminq_subtask(pf);
6334 6342
6335 i40e_link_event(pf);
6336
6337 i40e_service_event_complete(pf); 6343 i40e_service_event_complete(pf);
6338 6344
6339 /* If the tasks have taken longer than one timer cycle or there 6345 /* If the tasks have taken longer than one timer cycle or there