Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony nguyen says: ==================== Intel Wired LAN Driver Updates 2023-05-16 This series contains updates to ice and iavf drivers. Ahmed adds setting of missed condition for statistics which caused incorrect reporting of values for ice. For iavf, he removes a call to set VLAN offloads during re-initialization which can cause incorrect values to be set. Dawid adds checks to ensure VF is ready to be reset before executing commands that will require it to be reset on ice. --- v2: Patch 2 - Redo commit message ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
5ad3bd8444
@ -2238,11 +2238,6 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
|
||||
iavf_process_config(adapter);
|
||||
adapter->flags |= IAVF_FLAG_SETUP_NETDEV_FEATURES;
|
||||
|
||||
/* Request VLAN offload settings */
|
||||
if (VLAN_V2_ALLOWED(adapter))
|
||||
iavf_set_vlan_offload_features(adapter, 0,
|
||||
netdev->features);
|
||||
|
||||
iavf_set_queue_vlan_tag_loc(adapter);
|
||||
|
||||
was_mac_changed = !ether_addr_equal(netdev->dev_addr,
|
||||
|
@ -2745,6 +2745,8 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
|
||||
goto unroll_vector_base;
|
||||
|
||||
ice_vsi_map_rings_to_vectors(vsi);
|
||||
vsi->stat_offsets_loaded = false;
|
||||
|
||||
if (ice_is_xdp_ena_vsi(vsi)) {
|
||||
ret = ice_vsi_determine_xdp_res(vsi);
|
||||
if (ret)
|
||||
@ -2793,6 +2795,9 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
|
||||
ret = ice_vsi_alloc_ring_stats(vsi);
|
||||
if (ret)
|
||||
goto unroll_vector_base;
|
||||
|
||||
vsi->stat_offsets_loaded = false;
|
||||
|
||||
/* Do not exit if configuring RSS had an issue, at least
|
||||
* receive traffic on first queue. Hence no need to capture
|
||||
* return value
|
||||
|
@ -1171,7 +1171,7 @@ int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena)
|
||||
if (!vf)
|
||||
return -EINVAL;
|
||||
|
||||
ret = ice_check_vf_ready_for_cfg(vf);
|
||||
ret = ice_check_vf_ready_for_reset(vf);
|
||||
if (ret)
|
||||
goto out_put_vf;
|
||||
|
||||
@ -1286,7 +1286,7 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
|
||||
goto out_put_vf;
|
||||
}
|
||||
|
||||
ret = ice_check_vf_ready_for_cfg(vf);
|
||||
ret = ice_check_vf_ready_for_reset(vf);
|
||||
if (ret)
|
||||
goto out_put_vf;
|
||||
|
||||
@ -1340,7 +1340,7 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ret = ice_check_vf_ready_for_cfg(vf);
|
||||
ret = ice_check_vf_ready_for_reset(vf);
|
||||
if (ret)
|
||||
goto out_put_vf;
|
||||
|
||||
@ -1653,7 +1653,7 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,
|
||||
if (!vf)
|
||||
return -EINVAL;
|
||||
|
||||
ret = ice_check_vf_ready_for_cfg(vf);
|
||||
ret = ice_check_vf_ready_for_reset(vf);
|
||||
if (ret)
|
||||
goto out_put_vf;
|
||||
|
||||
|
@ -185,6 +185,25 @@ int ice_check_vf_ready_for_cfg(struct ice_vf *vf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_check_vf_ready_for_reset - check if VF is ready to be reset
|
||||
* @vf: VF to check if it's ready to be reset
|
||||
*
|
||||
* The purpose of this function is to ensure that the VF is not in reset,
|
||||
* disabled, and is both initialized and active, thus enabling us to safely
|
||||
* initialize another reset.
|
||||
*/
|
||||
int ice_check_vf_ready_for_reset(struct ice_vf *vf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ice_check_vf_ready_for_cfg(vf);
|
||||
if (!ret && !test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states))
|
||||
ret = -EAGAIN;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_trigger_vf_reset - Reset a VF on HW
|
||||
* @vf: pointer to the VF structure
|
||||
|
@ -215,6 +215,7 @@ u16 ice_get_num_vfs(struct ice_pf *pf);
|
||||
struct ice_vsi *ice_get_vf_vsi(struct ice_vf *vf);
|
||||
bool ice_is_vf_disabled(struct ice_vf *vf);
|
||||
int ice_check_vf_ready_for_cfg(struct ice_vf *vf);
|
||||
int ice_check_vf_ready_for_reset(struct ice_vf *vf);
|
||||
void ice_set_vf_state_dis(struct ice_vf *vf);
|
||||
bool ice_is_any_vf_in_unicast_promisc(struct ice_pf *pf);
|
||||
void
|
||||
|
@ -3955,6 +3955,7 @@ error_handler:
|
||||
ice_vc_notify_vf_link_state(vf);
|
||||
break;
|
||||
case VIRTCHNL_OP_RESET_VF:
|
||||
clear_bit(ICE_VF_STATE_ACTIVE, vf->vf_states);
|
||||
ops->reset_vf(vf);
|
||||
break;
|
||||
case VIRTCHNL_OP_ADD_ETH_ADDR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user