diff options
author | Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> | 2018-09-19 20:42:55 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-10-03 10:42:29 -0400 |
commit | ddf30f7ff840d4467ef45ec0b443575f9e95bec6 (patch) | |
tree | c9059b346847f2818907c2857ea2db3860e51419 /drivers/net/ethernet/intel/ice/ice_common.h | |
parent | 75d2b253026b8b1cb625f6ccdb9d54cdecae7935 (diff) |
ice: Add handler to configure SR-IOV
This patch implements parts of ice_sriov_configure and VF reset flow.
To create virtual functions (VFs), the user sets a value in num_vfs
through sysfs. This results in the kernel calling the handler for
.sriov_configure which is ice_sriov_configure.
VF setup first starts with a VF reset, followed by allocation of the VF
VSI using ice_vf_vsi_setup. Once the VF setup is complete a state bit
ICE_VF_STATE_INIT is set in the vf->states bitmap to indicate that
the VF is ready to go.
Also for VF reset to go into effect, it's necessary to issue a disable
queue command (ice_aqc_opc_dis_txqs). So this patch updates multiple
functions in the disable queue flow to take additional parameters that
distinguish if queues are being disabled due to VF reset.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.h')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h index 7b2a5bb2e550..1900681289a4 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.h +++ b/drivers/net/ethernet/intel/ice/ice_common.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "ice.h" | 7 | #include "ice.h" |
8 | #include "ice_type.h" | 8 | #include "ice_type.h" |
9 | #include "ice_switch.h" | 9 | #include "ice_switch.h" |
10 | #include <linux/avf/virtchnl.h> | ||
10 | 11 | ||
11 | void ice_debug_cq(struct ice_hw *hw, u32 mask, void *desc, void *buf, | 12 | void ice_debug_cq(struct ice_hw *hw, u32 mask, void *desc, void *buf, |
12 | u16 buf_len); | 13 | u16 buf_len); |
@@ -89,7 +90,8 @@ ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask, | |||
89 | struct ice_sq_cd *cd); | 90 | struct ice_sq_cd *cd); |
90 | enum ice_status | 91 | enum ice_status |
91 | ice_dis_vsi_txq(struct ice_port_info *pi, u8 num_queues, u16 *q_ids, | 92 | ice_dis_vsi_txq(struct ice_port_info *pi, u8 num_queues, u16 *q_ids, |
92 | u32 *q_teids, struct ice_sq_cd *cmd_details); | 93 | u32 *q_teids, enum ice_disq_rst_src rst_src, u16 vmvf_num, |
94 | struct ice_sq_cd *cmd_details); | ||
93 | enum ice_status | 95 | enum ice_status |
94 | ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap, | 96 | ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap, |
95 | u16 *max_lanqs); | 97 | u16 *max_lanqs); |