Intel Wired LAN Driver Updates 2022-11-09 (ice, iavf)
Subsystems (3)
Tony Nguyen
maintainerThis 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.
---
v2: Drop, previous, patch 2; type change for signedness.
The following are changes since commit 27c064ae14d1a80c790ce019759500c95a2a9551:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE
Michal Jaron (1):
iavf: Fix VF driver counting VLAN 0 filters
Norbert Zulinski (1):
ice: Fix spurious interrupt during removal of trusted VF
.../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 ++ drivers/net/ethernet/intel/ice/ice_base.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 25 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_lib.h | 1 + drivers/net/ethernet/intel/ice/ice_vf_lib.c | 5 +++- 5 files changed, 33 insertions(+), 2 deletions(-)
Signature · 1 line
2.35.1
Tony Nguyen
maintainerPATCH v2 1/2 ice: Fix spurious interrupt during removal of trusted VF
From: Norbert Zulinski <[email protected]>
Previously, during removal of trusted VF when VF is down there was number of spurious interrupt equal to number of queues on VF.
Add check if VF already has inactive queues. If VF is disabled and has inactive rx queues then do not disable rx queues. Add check in ice_vsi_stop_tx_ring if it's VF's vsi and if VF is disabled.
--- drivers/net/ethernet/intel/ice/ice_base.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 25 +++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_lib.h | 1 + drivers/net/ethernet/intel/ice/ice_vf_lib.c | 5 ++++- 4 files changed, 31 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_base.c +1 -1
@@ -958,7 +958,7 @@ ice_vsi_stop_tx_ring(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src,* associated to the queue to schedule NAPI handler */ q_vector = ring->q_vector; -if (q_vector) +if (q_vector && !(vsi->vf &&ice_is_vf_disabled (vsi->vf)))ice_trigger_sw_intr (hw, q_vector); status = ice_dis_vsi_txq(vsi->port_info, txq_meta->vsi_idx,
drivers/net/ethernet/intel/ice/ice_lib.c +25 -0
@@ -2239,6 +2239,31 @@ int ice_vsi_stop_xdp_tx_rings(struct ice_vsi *vsi)return ice_vsi_stop_tx_rings (vsi,ICE_NO_RESET ,0 , vsi->xdp_rings, vsi->num_xdp_txq); } +/** +* ice_vsi_is_rx_queue_active +* @vsi: the VSI being configured +* +* Return true if at least one queue is active. +*/ +bool ice_vsi_is_rx_queue_active (struct ice_vsi *vsi) +{ +struct ice_pf *pf = vsi->back; +struct ice_hw *hw = &pf->hw; +int i; + +ice_for_each_rxq (vsi, i) { +u32 rx_reg; +int pf_q; + + pf_q = vsi->rxq_map[i]; + rx_reg =rd32 (hw,QRX_CTRL (pf_q)); +if (rx_reg &QRX_CTRL_QENA_STAT_M ) +return true; + } + +return false; +} +/** * ice_vsi_is_vlan_pruning_ena - check if VLAN pruning is enabled or not * @vsi: VSI to check whether or not VLAN pruning is enabled.
drivers/net/ethernet/intel/ice/ice_lib.h +1 -0
@@ -129,4 +129,5 @@ u16 ice_vsi_num_non_zero_vlans(struct ice_vsi *vsi);bool ice_is_feature_supported (struct ice_pf *pf,enum ice_feature f);void ice_clear_feature_support (struct ice_pf *pf,enum ice_feature f);void ice_init_feature_support (struct ice_pf *pf); +bool ice_vsi_is_rx_queue_active (struct ice_vsi *vsi);#endif /* !_ICE_LIB_H_ */
drivers/net/ethernet/intel/ice/ice_vf_lib.c +4 -1
@@ -576,7 +576,10 @@ int ice_reset_vf(struct ice_vf *vf, u32 flags)return -EINVAL ; }ice_vsi_stop_lan_tx_rings (vsi,ICE_NO_RESET , vf->vf_id); -ice_vsi_stop_all_rx_rings (vsi); + +if (ice_vsi_is_rx_queue_active (vsi)) +ice_vsi_stop_all_rx_rings (vsi); +dev_dbg (dev,"VF is already disabled, there is no need for resetting it, telling VM, all is fine %d\n" , vf->vf_id);return 0 ;
Signature · 1 line
2.35.1
Tony Nguyen
maintainerPATCH v2 2/2 iavf: Fix VF driver counting VLAN 0 filters
In reply to Tony NguyenFrom: Michal Jaron <[email protected]>
VF driver mistakenly counts VLAN 0 filters, when no PF driver counts them.
Do not count VLAN 0 filters, when VLAN_V2 is engaged. Counting those filters in, will affect filters size by -1, when sending batched VLAN addition message.
--- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +2 -0
@@ -2438,6 +2438,8 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,list_for_each_entry (f, &adapter->vlan_filter_list, list) {if (f->is_new_vlan) { f->is_new_vlan = false; +if (!f->vlan.vid) +continue ;if (f->vlan.tpid ==ETH_P_8021Q )set_bit (f->vlan.vid, adapter->vsi.active_cvlans);
Signature · 1 line
2.35.1
This series was applied to netdev/net.git (master) by Tony Nguyen <[email protected]>:
Hello:
This series was applied to netdev/net.git (master) by Tony Nguyen <[email protected]>:
Quoted 8 lines · On Wed, 9 Nov 2022 16:37:42 -0800 you wrote:
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.
[...]
Here is the summary with links:
- [net,v2,1/2] ice: Fix spurious interrupt during removal of trusted VF
https://git.kernel.org/netdev/net/c/f23df5220d2b - [net,v2,2/2] iavf: Fix VF driver counting VLAN 0 filters https://git.kernel.org/netdev/net/c/0e710a3ffd0c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html