Page MenuHomeFreeBSD

Upstream Hyper-V Storage VSC Driver Fixes from NetApp
ClosedPublic

Authored by siderop1_netapp.com on Jul 21 2020, 8:38 PM.

Details

Summary
  • In hv_storvsc_io_request() when coring, prevent changing of the send channel from the base channel to another one. storvsc_poll always probes on the base channel.
  • Based upon conversations with Microsoft, changed the handling of srb_status codes. Most we should never get, others yes. All are treated as retry-able except for two. We should not get these statuses, but if we ever do, the I/O state is not known.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

#ifdef DIAGNOSTIC
Is this only for test purpose? When will this be defined? Thanks.

In D25756#572421, @whu wrote:

#ifdef DIAGNOSTIC
Is this only for test purpose? When will this be defined? Thanks.

Yes, to force set the srb_status value for testing. We use DIAGNOSTIC in all our internal debug (non-production) builds.

Looks good to me. Thanks for fixing this!

This revision is now accepted and ready to land.Jul 30 2020, 6:08 AM
allanjude added inline comments.
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2292 ↗(On Diff #74760)

This error message doesn't really read like an error message, maybe:

"The hypervisor's I/O adapter driver received an unexpected response code 0x%x for operation: %s"

But is there some way we can expand this message to inform the user what they are expected to do about this? Or what side effects this might cause?

Looks good, apart from the wording pointed out by Allan.

sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2292 ↗(On Diff #74760)

Yeah, that's a good idea. Below's what we are thinking. Comments on this before I update the diff?

The hypervisor's I/O adapter driver received an unexpected response code 0x%x for operation: %s. If this continues to occur, report the condition to your hypervisor vendor so they can rectify the issue.

With that change, looks good to me.

sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2292 ↗(On Diff #74760)

Yes, this is exactly what I had in mind.

update error message based on review feedback

This revision now requires review to proceed.Aug 6 2020, 5:18 PM
This revision is now accepted and ready to land.Aug 11 2020, 7:14 PM

@whu Will you commit this? Or would you like someone else to?

@whu Will you commit this? Or would you like someone else to?

@allanjude Sorry I was OOTO for a while for personal reason and just came back. Yes, I will commit this.

This revision was automatically updated to reflect the committed changes.