Skip to content

netvsp: gdma driver advertises eqe 135 capabilities to the soc#2933

Open
erfrimod wants to merge 7 commits intomicrosoft:mainfrom
erfrimod:erfrimod/eqe-135-capabilities
Open

netvsp: gdma driver advertises eqe 135 capabilities to the soc#2933
erfrimod wants to merge 7 commits intomicrosoft:mainfrom
erfrimod:erfrimod/eqe-135-capabilities

Conversation

@erfrimod
Copy link
Contributor

Now that OpenHCL handles the EQE 135, the Gdma driver should let the SoC know that it has that capability.

  • Adding consts for the flags, matching those in Gdma Driver.
  • Gdma driver now advertises support for SELF_RESET_ON_EQE_NOTIFICATION (EQE 135 handler)
  • Gdma driver now advertises support for VTL2_REVOKE_SUB_ON_RESET_EQE (default behavior of EQE 135)
    • In a follow-up PR, the EQE 135 handler may decide whether to revoke VTL0 VF based on additional context.
  • PF Capabilities are logged for a possible benefit to future investigations.
  • EQE 135 handler sets HWC timeout to 0, matching Linux mana driver behavior. The HWC is gone, so no point waiting for responses.
  • Unit test of EQE handler enhanced to validate the timeout improvement.

@erfrimod erfrimod requested a review from a team as a code owner March 11, 2026 00:16
Copilot AI review requested due to automatic review settings March 11, 2026 00:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the MANA GDMA VF driver to advertise EQE 135-related capabilities to the SoC/PF and adjusts teardown behavior after VF reconfiguration events (EQE 135), with accompanying test coverage updates.

Changes:

  • Advertise additional GDMA driver capability flags (SELF_RESET_ON_EQE_NOTIFICATION, VTL2_REVOKE_SUB_ON_RESET_EQE).
  • Log PF capability flags returned by VERIFY_VF_DRIVER_VERSION.
  • Treat EQE 135 as “HWC no longer responsive” by setting the HWC timeout to 0 and extending the unit test to validate the new behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
vm/devices/net/mana_driver/src/tests.rs Enhances the EQE 135 test to assert timeout changes and HWC failure behavior during teardown.
vm/devices/net/mana_driver/src/gdma_driver.rs Advertises new caps, logs PF caps, sets HWC timeout to 0 on EQE 135, and tweaks deregister timeout handling; adds test-only getters.
vm/devices/net/gdma_defs/src/lib.rs Adds missing capability flag constants used by the driver and for PF capability logging.

@erfrimod
Copy link
Contributor Author

erfrimod commented Mar 11, 2026

Tested on a lab machine, these are the socmana logs which show the SoC sees the updated capabilities falgs:

GetVFDriverCapabilities gfid=2 cap1=0x14068

[260310 23:52:19.441057-001,002;0f22] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0006 msg=0x20001 err=0x0 ms=0 vm=ErikUhVm] QueryClientConfiguration for GfId:2 Driver Version:1.0.0 CapabilityFlags1:0x0 Flags2:0x0 Flags3:0x0 Flags4:0x0 IsGdmaRequest 0
[260310 23:52:19.441061-001,002;0f23] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0006 msg=0x20001 err=0x0 ms=0 vm=ErikUhVm] QueryClientConfiguration response for GfId=2 MaxNumVports=1 BareMetalHostModeEnabled=0 MaxNumEQs=4294967295 AdapterMTU=0 AdapterLinkSpeedMbps=0 ManaDirect=0 RecoveryRetryIntervalMs=0 PFCapabilityFlags1=0xf PFFlags2=0x0 PFFlags3=0x0 PFFlags4=0x0
[260310 23:52:19.441066-001,002;0f24] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0006 msg=0x20001 err=0x0 ms=0 vm=ErikUhVm] [hwc_response_complete] msg_type=0x20001 BnicQueryClientConfiguration status=0x0 msg_status=0x0 resp_len=0x48
[260310 23:52:19.441448-001,002;0f25] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0007 msg=0x20008 err=0x0 ms=0 vm=ErikUhVm] QueryVportConfiguration. Details. AttachingGfId:2 CreatingGfId:1 KeyInCreatingGf:1 KeyInAttachingGf:0  gfHwVport MacAddress:02-04-22-0f-3b-e1 GfBlocks MacAddress:02-04-22-0f-3b-e1
[260310 23:52:19.441454-001,002;0f26] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0007 msg=0x20008 err=0x0 ms=0 vm=ErikUhVm] VportSetIndirectionTableSize(1123) GetVFDriverCapabilities gfid=2 cap1=0x14068
[260310 23:52:19.441458-001,002;0f27] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0007 msg=0x20008 err=0x0 ms=0 vm=ErikUhVm] VportSetIndirectionTableSize(1140) Vtl2 indirection table setting vtl2=1 vtl2var=1 init=0 change=0 (entries-entrieslog2 from 8-3 to 8-3): vnic=1 vport=0 gfid=2 vcpus=4
[260310 23:52:19.441462-001,002;0f28] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0007 msg=0x20008 err=0x0 ms=0 vm=ErikUhVm] QueryVportConfiguration for GfId:2 VportIndex:0 MaxNumSendWQs:32 MaxNumReceiveWQs:32 VportHandle:0 NumberOfIndirectionEntries:8 MacAddress:02-04-22-0f-3b-e1
[260310 23:52:19.441467-001,002;0f29] [bnic v=f1e024 h=0451] [INFO] [vf=3-2 vtl=2 cl=2 act=0x4eee0007 msg=0x20008 err=0x0 ms=0 vm=ErikUhVm] [hwc_response_complete] msg_type=0x20008 BnicQueryVportConfiguration status=0x0 msg_status=0x0 resp_len=0x40

0x14068 = 0x08 | 0x20 | 0x40 | 0x4000 | 0x10000

3 | 0x08 | HWC_TIMEOUT_RECONFIG
5 | 0x20 | VARIABLE_INDIRECTION_TABLE_SUPPORT
6 | 0x40 | HW_VPORT_LINK_AWARE
14 | 0x4000 | SELF_RESET_ON_EQE_NOTIFICATION
16 | 0x10000 | VTL2_REVOKE_SUB_ON_RESET_EQE

                gd_drv_cap_flags1: DRIVER_CAP_FLAG_1_VARIABLE_INDIRECTION_TABLE_SUPPORT
                    | DRIVER_CAP_FLAG_1_HW_VPORT_LINK_AWARE
                    | DRIVER_CAP_FLAG_1_HWC_TIMEOUT_RECONFIG
                    | DRIVER_CAP_FLAG_1_SELF_RESET_ON_EQE_NOTIFICATION
                    | DRIVER_CAP_FLAG_1_VTL2_REVOKE_SUB_ON_RESET_EQE,

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

erfrimod and others added 2 commits March 11, 2026 11:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants