Skip to content

Commit 802496c

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-
queue Tony Nguyen says: ==================== This series contains updates to iavf and i40e drivers. Radoslaw prevents admin queue operations being added when the driver is being removed for iavf. Petr Oros immediately starts reconfiguration on changes to VLANs on iavf. Ivan Vecera moves reset of VF to occur after port VLAN values are set on i40e. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents f4f82c5 + d0d362f commit 802496c

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4475,9 +4475,7 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, int vf_id,
44754475
goto error_pvid;
44764476

44774477
i40e_vlan_stripping_enable(vsi);
4478-
i40e_vc_reset_vf(vf, true);
4479-
/* During reset the VF got a new VSI, so refresh a pointer. */
4480-
vsi = pf->vsi[vf->lan_vsi_idx];
4478+
44814479
/* Locked once because multiple functions below iterate list */
44824480
spin_lock_bh(&vsi->mac_filter_hash_lock);
44834481

@@ -4563,6 +4561,10 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, int vf_id,
45634561
*/
45644562
vf->port_vlan_id = le16_to_cpu(vsi->info.pvid);
45654563

4564+
i40e_vc_reset_vf(vf, true);
4565+
/* During reset the VF got a new VSI, so refresh a pointer. */
4566+
vsi = pf->vsi[vf->lan_vsi_idx];
4567+
45664568
ret = i40e_config_vf_promiscuous_mode(vf, vsi->id, allmulti, alluni);
45674569
if (ret) {
45684570
dev_err(&pf->pdev->dev, "Unable to config vf promiscuous mode\n");

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: 8 additions & 9 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

@@ -823,7 +821,7 @@ iavf_vlan_filter *iavf_add_vlan(struct iavf_adapter *adapter,
823821
list_add_tail(&f->list, &adapter->vlan_filter_list);
824822
f->state = IAVF_VLAN_ADD;
825823
adapter->num_vlan_filters++;
826-
adapter->aq_required |= IAVF_FLAG_AQ_ADD_VLAN_FILTER;
824+
iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_ADD_VLAN_FILTER);
827825
}
828826

829827
clearout:
@@ -845,7 +843,7 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, struct iavf_vlan vlan)
845843
f = iavf_find_vlan(adapter, vlan);
846844
if (f) {
847845
f->state = IAVF_VLAN_REMOVE;
848-
adapter->aq_required |= IAVF_FLAG_AQ_DEL_VLAN_FILTER;
846+
iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_DEL_VLAN_FILTER);
849847
}
850848

851849
spin_unlock_bh(&adapter->mac_vlan_list_lock);
@@ -1421,7 +1419,8 @@ void iavf_down(struct iavf_adapter *adapter)
14211419
iavf_clear_fdir_filters(adapter);
14221420
iavf_clear_adv_rss_conf(adapter);
14231421

1424-
if (!(adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)) {
1422+
if (!(adapter->flags & IAVF_FLAG_PF_COMMS_FAILED) &&
1423+
!(test_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section))) {
14251424
/* cancel any current operation */
14261425
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
14271426
/* Schedule operations to close down the HW. Don't wait

0 commit comments

Comments
 (0)