Page MenuHomeFreeBSD

Hyper-V: hn: Enable vSwitch RSC support in hn netvsc driver
ClosedPublic

Authored by whu on Mar 5 2021, 9:55 AM.

Details

Summary

Receive Segment Coalescing (RSC) in the vSwitch is a feature available in
Windows Server 2019 hosts and later. It reduces the per packet processing
overhead by coalescing multiple TCP segments when possible. This happens
mostly when TCP traffics are among different guests on same host.
This patch adds netvsc driver support for this feature.

The patch also updates NVS version to 6.1 as needed for RSC
enablement.

Diff Detail

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

Event Timeline

whu requested review of this revision.Mar 5 2021, 9:55 AM
whu created this revision.
whu edited the summary of this revision. (Show Details)
whu added a reviewer: decui_microsoft.com.
This revision was not accepted when it landed; it landed in state Needs Review.Mar 12 2021, 4:44 AM
This revision was automatically updated to reflect the committed changes.

Hello @whu @lwhsu @decui_microsoft.com,

We have multiple reports that this causes throughput regressions when in use on 13-STABLE as opposed to 13.0-RELEASE where it is not present. We have had this commit reverted and speeds are back to normal for our OPNsense users. For more info see https://forum.opnsense.org/index.php?topic=26364.0

Cheers,
Franco

Hello @whu @lwhsu @decui_microsoft.com,

We have multiple reports that this causes throughput regressions when in use on 13-STABLE as opposed to 13.0-RELEASE where it is not present. We have had this commit reverted and speeds are back to normal for our OPNsense users. For more info see https://forum.opnsense.org/index.php?topic=26364.0

Cheers,
Franco

Franco,
Thanks for reporting this. I looked that the thread on the forum. But also please help answering a few questions below for me.

  1. Are you seeing the issue on on-prem Hyper-V or in Azure or both? If on Hyper-V, please provide the Windows version. If in Azure, please provide the VM size/type information.
  2. What kind of network traffic are you seeing the throughput issue, tcp or udp or both? What are the throughput numbers with and without this issue?
  3. Are the sender and receiver running on the same Hyper-V host? You probably can only tell this if the problem also presents in on-prem environment.
  4. When the problem presents, what are the outputs for "sysctl -a | grep rsc" on the VM? I am interested in the outputs of rsc_drop, rsc_pkts on each channel to see if there are anything wrong.
  5. It seems you are seeing it on OPNsense. Do you have a reproducible case on FreeBSD 13-stable? It will help me to further troubleshoot.

Please cc to weh@microsoft.com or whu@freebsd.org for further discussion on this case. This review board is not closely monitored.

Thanks,
Wei