Skip to content

Commit b3bbeba

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-11-09 (ice, iavf) This series contains updates to ice and iavf drivers. Norbert stops disabling VF queues that are not enabled for ice driver. Michal stops accounting of VLAN 0 filter to match expectations of PF driver for iavf. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: Fix VF driver counting VLAN 0 filters ice: Fix spurious interrupt during removal of trusted VF ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents de91b31 + 0e710a3 commit b3bbeba

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,6 +2438,8 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
24382438
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
24392439
if (f->is_new_vlan) {
24402440
f->is_new_vlan = false;
2441+
if (!f->vlan.vid)
2442+
continue;
24412443
if (f->vlan.tpid == ETH_P_8021Q)
24422444
set_bit(f->vlan.vid,
24432445
adapter->vsi.active_cvlans);

drivers/net/ethernet/intel/ice/ice_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ ice_vsi_stop_tx_ring(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src,
958958
* associated to the queue to schedule NAPI handler
959959
*/
960960
q_vector = ring->q_vector;
961-
if (q_vector)
961+
if (q_vector && !(vsi->vf && ice_is_vf_disabled(vsi->vf)))
962962
ice_trigger_sw_intr(hw, q_vector);
963963

964964
status = ice_dis_vsi_txq(vsi->port_info, txq_meta->vsi_idx,

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,6 +2239,31 @@ int ice_vsi_stop_xdp_tx_rings(struct ice_vsi *vsi)
22392239
return ice_vsi_stop_tx_rings(vsi, ICE_NO_RESET, 0, vsi->xdp_rings, vsi->num_xdp_txq);
22402240
}
22412241

2242+
/**
2243+
* ice_vsi_is_rx_queue_active
2244+
* @vsi: the VSI being configured
2245+
*
2246+
* Return true if at least one queue is active.
2247+
*/
2248+
bool ice_vsi_is_rx_queue_active(struct ice_vsi *vsi)
2249+
{
2250+
struct ice_pf *pf = vsi->back;
2251+
struct ice_hw *hw = &pf->hw;
2252+
int i;
2253+
2254+
ice_for_each_rxq(vsi, i) {
2255+
u32 rx_reg;
2256+
int pf_q;
2257+
2258+
pf_q = vsi->rxq_map[i];
2259+
rx_reg = rd32(hw, QRX_CTRL(pf_q));
2260+
if (rx_reg & QRX_CTRL_QENA_STAT_M)
2261+
return true;
2262+
}
2263+
2264+
return false;
2265+
}
2266+
22422267
/**
22432268
* ice_vsi_is_vlan_pruning_ena - check if VLAN pruning is enabled or not
22442269
* @vsi: VSI to check whether or not VLAN pruning is enabled.

drivers/net/ethernet/intel/ice/ice_lib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,5 @@ u16 ice_vsi_num_non_zero_vlans(struct ice_vsi *vsi);
129129
bool ice_is_feature_supported(struct ice_pf *pf, enum ice_feature f);
130130
void ice_clear_feature_support(struct ice_pf *pf, enum ice_feature f);
131131
void ice_init_feature_support(struct ice_pf *pf);
132+
bool ice_vsi_is_rx_queue_active(struct ice_vsi *vsi);
132133
#endif /* !_ICE_LIB_H_ */

drivers/net/ethernet/intel/ice/ice_vf_lib.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,10 @@ int ice_reset_vf(struct ice_vf *vf, u32 flags)
576576
return -EINVAL;
577577
}
578578
ice_vsi_stop_lan_tx_rings(vsi, ICE_NO_RESET, vf->vf_id);
579-
ice_vsi_stop_all_rx_rings(vsi);
579+
580+
if (ice_vsi_is_rx_queue_active(vsi))
581+
ice_vsi_stop_all_rx_rings(vsi);
582+
580583
dev_dbg(dev, "VF is already disabled, there is no need for resetting it, telling VM, all is fine %d\n",
581584
vf->vf_id);
582585
return 0;

0 commit comments

Comments
 (0)