Skip to content

Commit ed4cad3

Browse files
orospanguy11
authored andcommitted
iavf: add iavf_schedule_aq_request() helper
Add helper for set iavf aq request AVF_FLAG_AQ_* and immediately schedule watchdog_task. Helper will be used in cases where it is necessary to run aq requests asap Signed-off-by: Petr Oros <[email protected]> Co-developed-by: Michal Schmidt <[email protected]> Signed-off-by: Michal Schmidt <[email protected]> Co-developed-by: Ivan Vecera <[email protected]> Signed-off-by: Ivan Vecera <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent c8de44b commit ed4cad3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

drivers/net/ethernet/intel/iavf/iavf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ void iavf_down(struct iavf_adapter *adapter);
521521
int iavf_process_config(struct iavf_adapter *adapter);
522522
int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter);
523523
void iavf_schedule_reset(struct iavf_adapter *adapter, u64 flags);
524-
void iavf_schedule_request_stats(struct iavf_adapter *adapter);
524+
void iavf_schedule_aq_request(struct iavf_adapter *adapter, u64 flags);
525525
void iavf_schedule_finish_config(struct iavf_adapter *adapter);
526526
void iavf_reset(struct iavf_adapter *adapter);
527527
void iavf_set_ethtool_ops(struct net_device *netdev);

drivers/net/ethernet/intel/iavf/iavf_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static void iavf_get_ethtool_stats(struct net_device *netdev,
362362
unsigned int i;
363363

364364
/* Explicitly request stats refresh */
365-
iavf_schedule_request_stats(adapter);
365+
iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_REQUEST_STATS);
366366

367367
iavf_add_ethtool_stats(&data, adapter, iavf_gstrings_stats);
368368

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,13 @@ void iavf_schedule_reset(struct iavf_adapter *adapter, u64 flags)
314314
}
315315

316316
/**
317-
* iavf_schedule_request_stats - Set the flags and schedule statistics request
317+
* iavf_schedule_aq_request - Set the flags and schedule aq request
318318
* @adapter: board private structure
319-
*
320-
* Sets IAVF_FLAG_AQ_REQUEST_STATS flag so iavf_watchdog_task() will explicitly
321-
* request and refresh ethtool stats
319+
* @flags: requested aq flags
322320
**/
323-
void iavf_schedule_request_stats(struct iavf_adapter *adapter)
321+
void iavf_schedule_aq_request(struct iavf_adapter *adapter, u64 flags)
324322
{
325-
adapter->aq_required |= IAVF_FLAG_AQ_REQUEST_STATS;
323+
adapter->aq_required |= flags;
326324
mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0);
327325
}
328326

0 commit comments

Comments
 (0)