Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167268013
D59025.id184428.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D59025.id184428.diff
View Options
Index: sys/dev/ice/ice_iov.c
===================================================================
--- sys/dev/ice/ice_iov.c
+++ sys/dev/ice/ice_iov.c
@@ -275,6 +275,9 @@
struct ice_vsi *vsi = vf->vsi;
struct ice_hw *hw = &sc->hw;
bool enable;
+#ifdef DRIVER_FAILPOINTS
+ int error;
+#endif
int status;
enable = (atomic_load_acq_32(&vf->vf_flags) &
@@ -287,6 +290,8 @@
else
ctx.info.sec_flags &= ~ICE_AQ_VSI_SEC_FLAG_ENA_MAC_ANTI_SPOOF;
+ ICE_IOV_FAIL_POINT(sc, vf->vf_num, mac_anti_spoof_update, error,
+ fail);
status = ice_update_vsi(hw, vsi->idx, &ctx, NULL);
if (status != 0) {
device_printf(sc->dev,
@@ -299,6 +304,11 @@
vsi->info.sec_flags = ctx.info.sec_flags;
return (0);
+
+#ifdef DRIVER_FAILPOINTS
+fail:
+ return (error);
+#endif
}
/**
@@ -958,6 +968,11 @@
/* This zero-queue command is required to complete every VF reset. */
status = ice_dis_vsi_txq(hw->port_info, vf->vsi->idx, 0, 0,
NULL, NULL, NULL, ICE_VF_RESET, vf->vf_num, NULL);
+ ICE_FAIL_POINT_CODE_COND(sc, _debug_fail_point_ice_iov,
+ vf_reset_tx_disable, ice_iov_fail_vf_matches(vf->vf_num),
+ FAIL_POINT_NONSLEEPABLE, {
+ status = ICE_ERR_AQ_ERROR;
+ });
if (status) {
device_printf(sc->dev,
"%s: Failed to disable LAN Tx queues: err %s aq_err %s\n",
@@ -978,6 +993,11 @@
DELAY(ICE_VPGEN_VFRSTAT_WAIT_DELAY_US);
}
+ ICE_FAIL_POINT_CODE_COND(sc, _debug_fail_point_ice_iov,
+ vf_reset_vfr_timeout, ice_iov_fail_vf_matches(vf->vf_num),
+ FAIL_POINT_NONSLEEPABLE, {
+ reset_done = false;
+ });
if (!reset_done) {
device_printf(sc->dev,
"VF-%d Reset is stuck\n", vf->vf_num);
@@ -993,6 +1013,12 @@
/* Hardware resets Tx queues; the PF must disable every Rx. */
for (bit = 0; bit < vf->vsi->num_rx_queues; bit++) {
status = ice_control_rx_queue(vf->vsi, bit, false);
+ ICE_FAIL_POINT_CODE_COND(sc,
+ _debug_fail_point_ice_iov, vf_reset_rx_disable,
+ ice_iov_fail_vf_matches(vf->vf_num),
+ FAIL_POINT_NONSLEEPABLE, {
+ status = EIO;
+ });
if (status != 0) {
device_printf(sc->dev,
"Unable to disable VF-%d Rx queue %d: %s\n",
@@ -1012,6 +1038,11 @@
break;
DELAY(ICE_PCI_CIAD_WAIT_DELAY_US);
}
+ ICE_FAIL_POINT_CODE_COND(sc, _debug_fail_point_ice_iov,
+ vf_reset_pcie_pending, ice_iov_fail_vf_matches(vf->vf_num),
+ FAIL_POINT_NONSLEEPABLE, {
+ i = ICE_PCI_CIAD_WAIT_COUNT;
+ });
if (i == ICE_PCI_CIAD_WAIT_COUNT) {
device_printf(sc->dev,
"VF-%d PCI transactions remain after reset\n", vf->vf_num);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 21, 1:02 PM (3 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37030930
Default Alt Text
D59025.id184428.diff (2 KB)
Attached To
Mode
D59025: ice: Add VF reset and policy failure injection
Attached
Detach File
Event Timeline
Log In to Comment