356411 |
06-Jan-2020 |
hselasky |
MFC r356201: Fix spelling.
PR: 242891 Sponsored by: Mellanox Technologies |
356013 |
22-Dec-2019 |
kevans |
MFC r355796-r355797, r355799: kbd: defaults for get_fkeystr/diag
The genkbd version of these remains exposed for stable branches, but keyboard drivers that just want to use the defaults can simply not provide their own. There shouldn't be any unset in the wild.
r355796: kbd: provide default implementations of get_fkeystr/diag
Most keyboard drivers are using the genkbd implementations as it is; formally use them for any that aren't set.
r355797: chrome_kb: remove default get_fkeystr/diag implementations
This file was missed in r355796, but no harm would have come from this.
r355799: kbd: patch linker set methods, too
This is needed after r355796. Some double-registration of kbd drivers needs to be sorted out, then this sysinit will simply add these drivers into the normal list and kill off any other bits in the driver that are aware of the linker set, for simplicity. |
356012 |
22-Dec-2019 |
kevans |
MFC r355793: kbd drivers: use kbdd_* indirection for diag invocation |
356007 |
22-Dec-2019 |
kevans |
MFC r355794: keyboard switch definitions: standardize on c99 initializers |
350804 |
08-Aug-2019 |
mav |
MFC r326645 (by imp): Define xpt_path_inq.
This provides a nice wrarpper around the XPT_PATH_INQ ccb creation and calling. |
339863 |
29-Oct-2018 |
whu |
MFC: 339585
r339585: Do not drop UDP traffic when TXCSUM_IPV6 flag is on
PR: 231797 Submitted by: whu Reviewed by: dexuan Obtained from: Kevin Morse Sponsored by: Microsoft Differential Revision: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=198333&action=diff |
337959 |
17-Aug-2018 |
dim |
MFC r337322:
Fix build of hyperv with base gcc on i386
Summary: Base gcc fails to compile `sys/dev/hyperv/pcib/vmbus_pcib.c` for i386, with the following -Werror warnings:
cc1: warnings being treated as errors /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'new_pcichild_device': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:567: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'vmbus_pcib_on_channel_callback': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:940: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_pci_protocol_negotiation': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1012: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_pci_enter_d0': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1073: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_send_resources_allocated': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1125: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'vmbus_pcib_map_msi': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1730: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
This is because on i386, several casts from `uint64_t` to a pointer reduce the value from 64 bit to 32 bit.
For gcc, this can be fixed by an intermediate cast to uintptr_t. Note that I am assuming the incoming values will always fit into 32 bit!
Differential Revision: https://reviews.freebsd.org/D15753 |
336643 |
23-Jul-2018 |
dexuan |
MFC: 336426
r336426 hyperv/hn: Fix panic in hypervisor code upon device detach event
Submitted by: hselasky Reviewed by: dexuan Differential Revision: https://reviews.freebsd.org/D16139 |
332903 |
24-Apr-2018 |
dexuan |
MFC: 332385
r332385: hyperv/storvsc: storvsc_io_done(): do not use CAM_SEL_TIMEOUT
CAM_SEL_TIMEOUT was introduced in https://reviews.freebsd.org/D7521 (r304251), which claimed:
"VM shall response to CAM layer with CAM_SEL_TIMEOUT to filter those invalid LUNs. Never use CAM_DEV_NOT_THERE which will block LUN scan for LUN number higher than 7."
But it turns out this is not correct:
I think what really filters the invalid LUNs in r304251 is that: before r304251, we could set the CAM_REQ_CMP without checking vm_srb->srb_status at all: ccb->ccb_h.status |= CAM_REQ_CMP.
r304251 checks vm_srb->srb_status and sets ccb->ccb_h.status properly, so the invalid LUNs are filtered.
I changed my code version to r304251 but replaced the CAM_SEL_TIMEOUT with CAM_DEV_NOT_THERE, and I confirmed the invalid LUNs can also be filtered, and I successfully hot-added and hot-removed 8 disks to/from the VM without any issue.
CAM_SEL_TIMEOUT has an unwanted side effect -- see cam_periph_error(): For a selection timeout, we consider all of the LUNs on the target to be gone. If the status is CAM_DEV_NOT_THERE, then we only get rid of the device(s) specified by the path in the original CCB.
This means: for a VM with a valid LUN on 3:0:0:0, when the VM inquires 3:0:0:1 and the host reports 3:0:0:1 doesn't exist and storvsc returns CAM_SEL_TIMEOUT to the CAM layer, CAM will detech 3:0:0:0 as well: this is the bug I reported recently: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226583
PR: 226583 Reviewed by: mav Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D14690 |
332068 |
05-Apr-2018 |
emaste |
MFC r331757: Correct comment typo in Hyper-V
PR: 226665 Submitted by: Ryo ONODERA |
331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
329462 |
17-Feb-2018 |
kib |
MFC r328083,328096,328116,328119,328120,328128,328135,328153,328157, 328166,328177,328199,328202,328205,328468,328470,328624,328625,328627, 328628,329214,329297,329365:
Meltdown mitigation by PTI, PCID optimization of PTI, and kernel use of IBRS for some mitigations of Spectre.
Tested by: emaste, Arshan Khanifar <arshankhanifar@gmail.com> Discussed with: jkim Sponsored by: The FreeBSD Foundation |
324579 |
13-Oct-2017 |
sephe |
MFC 324517
hyperv/hn: Enable transparent VF by default.
Sponsored by: Microsoft |
324578 |
13-Oct-2017 |
sephe |
MFC 324489,324516
324489 hyperv/hn: Workaround erroneous hash type observed on WS2016.
Background: - UDP 4-tuple hash type is unconditionally enabled in Hyper-V on WS2016, which is _not_ affected by NDIS_OBJTYPE_RSS_PARAMS. - Non-fragment UDP/IPv4 datagrams' hash type is delivered to VM as TCP_IPV4.
Currently this erroneous behavior only applies to WS2016/Windows10.
Force l3/l4 protocol check, if the RXed packet's hash type is TCP_IPV4, and the Hyper-V is running on WS2016/Windows10. If the RXed packet is UDP datagram, adjust mbuf hash type to UDP_IPV4.
Sponsored by: Microsoft
324516 hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF.
The background was described in r324489.
Sponsored by: Microsoft |
324577 |
13-Oct-2017 |
sephe |
MFC 324488
hyperv/vmbus: Expose Hyper-V major version.
Sponsored by: Microsoft |
324576 |
13-Oct-2017 |
sephe |
MFC 324487
hyperv/vmbus: Add tunable to pin/unpin event tasks.
Event tasks are pinned to their respective CPU by default, in the same fashion as they were.
Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain CPUs serve special purpose.
Sponsored by: Microsoft |
324480 |
10-Oct-2017 |
sephe |
MFC 324049,324077
324049 hyperv/hn: Fix UDP checksum offload issue in Azure.
UDP checksum offload does not work in Azure if following conditions are met: - sizeof(IP hdr + UDP hdr + payload) > 1420. - IP_DF is not set in IP hdr
Use software checksum for UDP datagrams falling into this category.
Add two tunables to disable UDP/IPv4 and UDP/IPv6 checksum offload, in case something unexpected happened.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12429
324077 hyperv/hn: Unbreak i386 building.
Reported by: cy Sponsored by: Microsoft |
324479 |
10-Oct-2017 |
sephe |
MFC 324048
hyperv/hn: Set tcp header offset for CSUM/LSO offloading.
No observable effect; better safe than sorry.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12417 |
324477 |
10-Oct-2017 |
sephe |
MFC 323728,323729
323728 hyperv/hn: Fix MTU setting
- Add size of an ethernet header to the value configured to NVS. This does not seem to have any effects if MTU is 1500, but fix hypervisor side's setting if MTU > 1500. - Override the MTU setting according to the view from the hypervisor side.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12352
323729 hyperv/hn: Incease max supported MTU
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12365 |
324475 |
10-Oct-2017 |
sephe |
MFC 323727,324316
323727 hyperv/hn: Apply VF's RSS setting
Since in Azure SYN and SYN|ACK go through the synthetic parts while the rest of the same TCP flow goes through the VF, apply VF's RSS settings to synthetic parts to have a consistent hash value/type for the same TCP flow.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12333
324316 hyperv/hn: Fix options RSS building
Reported by: np Sponsored by: Microsoft |
324474 |
10-Oct-2017 |
sephe |
MFC 323176
hyperv/hn: Log RSS capabilities mask.
This helps to detect when UDP hash types can be supported.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12177 |
324473 |
10-Oct-2017 |
sephe |
MFC 323175
hyperv/hn: Implement SIOCGIFRSS{KEY,HASH}.
The conditional compiling in the review request is removed, since these IOCTLs will be available in stable/10 and stable/11.
Reviewed by: gallatin Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12175 |
322612 |
17-Aug-2017 |
sephe |
MFC 322488 hyperv: Update copyright for the files changed in 2017
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11982 |
322605 |
17-Aug-2017 |
sephe |
MFC 322483,322485-322487
322483 hyperv/hn: Update VF's ibytes properly under transparent VF mode.
While, I'm here add comment about why updating VF's imcast stat is not necessary.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11948
322485 hyperv/hn: Fix/enhance receiving path when VF is activated.
- Update hn(4)'s stats properly for non-transparent mode VF. - Allow BPF tapping to hn(4) for non-transparent mode VF. - Don't setup mbuf hash, if 'options RSS' is set. In Azure, when VF is activated, TCP SYN and SYN|ACK go through hn(4) while the rest of segments and ACKs belonging to the same TCP 4-tuple go through the VF. So don't setup mbuf hash, if a VF is activated and 'options RSS' is not enabled. hn(4) and the VF may use neither the same RSS hash key nor the same RSS hash function, so the hash value for packets belonging to the same flow could be different! - Disable LRO. hn(4) will only receive broadcast packets, multicast packets, TCP SYN and SYN|ACK (in Azure), LRO is useless for these packet types. For non-transparent, we definitely _cannot_ enable LRO at all, since the LRO flush will use hn(4) as the receiving interface; i.e. hn_ifp->if_input(hn_ifp, m).
While I'm here, remove unapplied comment and minor style change.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11978
322486 hyperv/hn: Minor cleanup
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11979
322487 hyperv/hn: Re-set datapath after synthetic parts reattached.
Do this even for non-transparent mode VF. Better safe than sorry.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11981 |
322489 |
14-Aug-2017 |
sephe |
MFC 322299
hyperv/hn: Implement transparent mode network VF.
How network VF works with hn(4) on Hyper-V in transparent mode:
- Each network VF has a cooresponding hn(4). - The network VF and the it's cooresponding hn(4) have the same hardware address. - Once the network VF is attached, the cooresponding hn(4) waits several seconds to make sure that the network VF attach routing completes, then: o Set the intersection of the network VF's if_capabilities and the cooresponding hn(4)'s if_capabilities to the cooresponding hn(4)'s if_capabilities. And adjust the cooresponding hn(4) if_capable and if_hwassist accordingly. (*) o Make sure that the cooresponding hn(4)'s TSO parameters meet the constraints posed by both the network VF and the cooresponding hn(4). (*) o The network VF's if_input is overridden. The overriding if_input changes the input packet's rcvif to the cooreponding hn(4). The network layers are tricked into thinking that all packets are neceived by the cooresponding hn(4). o If the cooresponding hn(4) was brought up, bring up the network VF. The transmission dispatched to the cooresponding hn(4) are redispatched to the network VF. o Bringing down the cooresponding hn(4) also brings down the network VF. o All IOCTLs issued to the cooresponding hn(4) are pass-through'ed to the network VF; the cooresponding hn(4) changes its internal state if necessary. o The media status of the cooresponding hn(4) solely relies on the network VF. o If there are multicast filters on the cooresponding hn(4), allmulti will be enabled on the network VF. (**) - Once the network VF is detached. Undo all damages did to the cooresponding hn(4) in the above item.
NOTE: No operation should be issued directly to the network VF, if the network VF transparent mode is enabled. The network VF transparent mode can be enabled by setting tunable hw.hn.vf_transparent to 1. The network VF transparent mode is _not_ enabled by default, as of this commit.
The benefit of the network VF transparent mode is that the network VF attachment and detachment are transparent to all network layers; e.g. live migration detaches and reattaches the network VF.
The major drawbacks of the network VF transparent mode: - The netmap(4) support is lost, even if the VF supports it. - ALTQ does not work, since if_start method cannot be properly supported.
(*) These decisions were made so that things will not be messed up too much during the transition period.
(**) This does _not_ need to go through the fancy multicast filter management stuffs like what vlan(4) has, at least currently: - As of this write, multicast does not work in Azure. - As of this write, multicast packets go through the cooresponding hn(4).
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11803 |
322136 |
07-Aug-2017 |
sephe |
MFC 321965 hyperv/kvp: Use proper size macro for adapter id.
Submitted by: Christopher Ertl <Christopher.Ertl microsoft com> Sponsored by: Microsoft |
322135 |
07-Aug-2017 |
sephe |
MFC 321836,321837
321836 hyperv/hn: Renaming and minor cleanup
This prepares for the upcoming transparent VF support.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11708
321837 hyperv/hn: Add comment about ether_ifattach event subscription.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11710 |
321750 |
31-Jul-2017 |
sephe |
MFC 321409
hyperv/hn: Ignore LINK_SPEED_CHANGE status.
This status will be reported if the backend NIC is wireless; it's not useful. Due to the high frequency of the reporting, this could be pretty annoying; ignore it.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11651 |
321748 |
31-Jul-2017 |
sephe |
MFC 321407
hyperv/hn: Export VF list and VF-HN mapping
The VF-HN map will be used later on to implement "transparent VF".
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11618 |
321404 |
24-Jul-2017 |
sephe |
MFC 321286
hyperv/storvsc: Force SPC3 for CDROM attached.
This unbreaks the CDROM attaching on GEN2 VMs. On GEN1 VMs, CDROM is attached to emulated ATA controller.
PR: 220790 Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11634 |
320765 |
07-Jul-2017 |
sephe |
MFC 320490
hyperv/input: Remove unnecessary inclusion.
The unbreaks gcc compilation.
Submitted by: Ryan Libby Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11415 |
320351 |
26-Jun-2017 |
sephe |
MFC 320184
hyperv/storvsc: Reduce log verbosity
On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors.
Approved by: re (delphij) PR: 219973 Submitted by: Hongjiang Zhang <hongzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11271 |
319943 |
14-Jun-2017 |
dexuan |
MFC: 319690
Approved by: re (marius)
r319690 hyperv/pcib: use the device serial number as PCI domain
Currently the PCI domain is initialized with the instance GUID in vmbus_pcib_attach(). It turns out the GUID can change across VM reboot, while some users want a persistent value for PCI domain. The solution is that we can change to use the device serial number, which starts with 1 and is unique within a VM.
Obtained from: Haiyang Zhang Sponsored by: Microsoft |
318392 |
17-May-2017 |
sephe |
MFC 318136
hyperv/vmbus: Reorganize vmbus device tree
For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the resources for PCI passthrough and SR-IOV. There is no acpi_syscontainer0 on GEN1 Hyper-V.
For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which contains the resources for PCI passthrough and SR-IOV. There is no pcib0 on GEN2 Hyper-V.
The ACPI VMBUS device now only holds its _CRS, which is empty as of this commit; its existence is mainly for upward compatibility.
Device tree structure is suggested by jhb@.
Tested-by: dexuan@ Collabrated-wth: dexuan@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10565 |
317822 |
05-May-2017 |
sephe |
MFC 317821 hyperv/kbd: Channel read expects non-NULL channel argument.
Sponsored by: Microsoft |
317664 |
02-May-2017 |
sephe |
hyperv/hn: Enable sorted LRO (direct commit).
This is a direct commit. Sorted LRO is much better than plain (linked list LRO), which hash LRO is not available on this branch.
Sponsored by: Microsoft |
317481 |
27-Apr-2017 |
sephe |
MFC 317353
hyperv/hn: Use channel0, i.e. TX ring0, for TCP SYN/SYN|ACK.
Hyper-V hot channel effect: Operation latency on hot channel is only _half_ of the operation latency on cold channels.
This commit takes the advantage of the above Hyper-V host channel effect, and can reduce more than 75% latency and more than 50% latency stdev, i.e. lower and more stable/predictable latency, for various types of web server workloads.
Sponsored by: Microsoft |
317121 |
19-Apr-2017 |
sephe |
MFC 316813,316815
316813 hyperv/storvsc: Use ULL for 64bits value shift.
Reported by: PVS Sponsored by: Microsoft
316815 hyperv/kvp: Remove always false condition.
Reported by: PVS Sponsored by: Microsoft |
317119 |
19-Apr-2017 |
sephe |
MFC 316515,316812
316515 hyperv/kbd: Add support for synthetic keyboard.
Synthetic keyboard is the only supported keyboard on GEN2 Hyper-V.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10196
316812 hyperv/kbd: Remove unnecessary assignment.
Reported by: PVS Sponsored by: Microsoft |
317108 |
19-Apr-2017 |
sephe |
MFC 317107 hyperv: Use kmem_malloc for hypercall memory due to NX bit change.
Reported by: dexuan@ Sponsored by: Microsoft |
316674 |
10-Apr-2017 |
sephe |
MFC 316520
hyperv/hn: Fixat RNDIS rxfilter after the successful RNDIS init.
Under certain conditions on certain versions of Hyper-V, the RNDIS rxfilter is _not_ zero on the hypervisor side after the successful RNDIS initialization, which breaks the assumption of any following code (well, it breaks the RNDIS API contract actually). Clear the RNDIS rxfilter explicitly, drain packets sneaking through, and drain the interrupt taskqueues scheduled due to the stealth packets.
Reported by: dexuan@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10230 |
316673 |
10-Apr-2017 |
sephe |
MFC 316519
hyperv/storvsc: Fixup SRB status.
This unbreaks GEN2 Hyper-V cd support.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: dexuan@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10212 |
315812 |
23-Mar-2017 |
mav |
MFC r311305 (by asomers): Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v".
This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field.
PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 |
315436 |
17-Mar-2017 |
sephe |
MFC: 314382-314485
314382 hyperv/hn: Simplify RNDIS packet data offset calculation.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9699
314483 hyperv/hn: Simplify RNDIS packet total length calculation.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9712
314484 hyperv/hn: Make sure that RNDIS packet message is at least 4B aligned.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9713
314485 hyperv/hn: Misaligned chimney sending buffers should not be used
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9714 |
314092 |
22-Feb-2017 |
dexuan |
MFC 312689, 312690
Approved by: sephe (mentor)
r312689 hyperv/hn: add a sysctl name for the VF interface
This makes it easier for the userland script to find the releated VF interface.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9101
r312690 hyperv/hn: add devctl_notify for VF_UP/DOWN events
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9102 |
314091 |
22-Feb-2017 |
dexuan |
MFC 312688
Approved by: sephe (mentor)
r312688 hyperv/hn: add the support for VF drivers (SR-IOV)
Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together (both NICs have the same MAC address), mainly to support seamless live migration.
When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite).
Note: multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface (if the VF is UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP).
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8964 |
314084 |
22-Feb-2017 |
dexuan |
MFC: 312686
Approved by: sephe (mentor)
r312686 hyperv/hn: remove the MTU and IFF_DRV_RUNNING checking in hn_rxpkt()
It's unnecessary because the upper nework stack does the same checking.
In the case of Hyper-V SR-IOV, we need to remove the checking because 1) multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface; 2) we must inject the packets even if the synthetic NIC is down, or has a different MTU from the VF device.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8962 |
314083 |
22-Feb-2017 |
dexuan |
MFC: 312685
Approved by: sephe(mentor)
r312685 hyperv/hn: remember the channel pointer in struct hn_rx_ring
This will be used by the coming NIC SR-IOV patch.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8909 |
314003 |
21-Feb-2017 |
sephe |
MFC 311743
hyperv: Add method to read 64bit Hyper-V specific time value.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9057 |
311391 |
05-Jan-2017 |
sephe |
MFC 310652,310657,310658
310652 hyperv/hn: Consolidate hn_{suspend,resume}
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8907
310657 hyperv/hn: Function renaming; no functional changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8908
310658 hyperv/hn: Factor out function to set rxfilter.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8928 |
311389 |
05-Jan-2017 |
sephe |
MFC 310651
hyperv/vmbus: Nuke unnecessary critical sections.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8906 |
311388 |
05-Jan-2017 |
sephe |
MFC 310462,310465
310462 hyperv/ic: Fix version4 timesync message format.
It is not compat w/ the old timesync message format, which the message type stays the same as the old timesync message.
Sponsored by: Microsoft
310465 hyperv/ic: Allow applying the samples from hypervisor unconditionally.
Sponsored by: Microsoft |
311387 |
05-Jan-2017 |
sephe |
MFC 310347
hyperv/storvsc: The max channel in PDU actually means the max sub-chans.
Use proper name for local variables. PDU fields' name was not changed yet. While I'm here, make # of usable channels tunable. This eases further testing.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8851 |
311386 |
05-Jan-2017 |
sephe |
MFC 310324
hyperv/ic: Rename cleaned up files.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8850 |
311385 |
05-Jan-2017 |
sephe |
MFC 310318
hyperv/ic: Cleanup driver glue.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8849 |
311383 |
05-Jan-2017 |
sephe |
MFC 310317
hyperv/ic: Rname cleaned up file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8848 |
311380 |
05-Jan-2017 |
sephe |
MFC 310315
hyperv/ic: Inclusion cleanup
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8847 |
311379 |
05-Jan-2017 |
sephe |
MFC 310312-310314
310312 hyperv/ic: Factor out function to send IC response
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8844
310313 hyperv/ic: Cleanup common struct and functions.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8845
310314 hyperv/ic: Rename cleaned up header file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8846 |
311376 |
05-Jan-2017 |
sephe |
MFC 310048,310101,310239
310048 hyperv: Implement "enlightened" time counter, which is rdtsc based.
Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8763
310101 hyperv: Allow userland to ro-mmap reference TSC page
This paves way to implement VDSO for the enlightened time counter.
Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8768
310239 hyperv: Implement userspace gettimeofday(2) with Hyper-V reference TSC
This 6 times gettimeofday performance, as measured by tools/tools/syscall_timing
Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8789 |
311375 |
05-Jan-2017 |
sephe |
MFC 309874,309875
309874 hyperv/vmbus: Add channel polling support.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8738
309875 hyperv/hn: Add polling support
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8739 |
311374 |
05-Jan-2017 |
sephe |
MFC 309726,309728
309726
hyperv/storvsc: Fix the SCSI disk attachment issue.
On pre-WS2016 Hyper-V, if the only LUNs > 7 are used, then all disks fails to attach. Mainly because those versions of Hyper-V do not set SRB_STATUS properly and deliver junky INQUERY responses.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reported by: Hongxiong Xian <v-hoxian microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8724
309728 hyperv/storvsc: Minor style changes; no functional changes.
Reported by: rpokala Sponsored by: Microsoft |
311373 |
05-Jan-2017 |
sephe |
MFC 309705
hyperv/timesync: Support "sent TC" to improve accuracy.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8723 |
311372 |
05-Jan-2017 |
sephe |
MFC 309704
hyperv/vmbus: Utilize vmbus_chan_run_task()
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8686 |
311371 |
05-Jan-2017 |
sephe |
MFC 309346,309348,309353
309346 hyperv/hn: Add HN_DEBUG kernel option.
If bufring is used for per-TX ring descs, don't update "available" counter, which is only used to help debugging.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8674
309348 hyperv/hn: Don't hold txdesc, if no BPFs are attached.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8675
309353 hyperv/hn: Add 'options RSS' support.
Reviewed by: adrian Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8676 |
311370 |
05-Jan-2017 |
sephe |
MFC 309320
hyperv/storvsc: Don't use timedwait.
The timeout is unnecessary.
Reviewed by: jhb Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8656 |
311369 |
05-Jan-2017 |
sephe |
MFC 309319
hypver/vmbus: Remove extra assertion.
It is asserted by vmbus_chan_gpadl_connect() now.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8660 |
311368 |
05-Jan-2017 |
sephe |
MFC 309310,309311,309316,309318
309310 hyperv/hn: Nuke the unused TX taskqueue CPU binding tunable.
It was an experimental tunable, and is now deemed to be road blocker for further changes. Time to retire it.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8654
309311 hyperv/hn: Allow multiple TX taskqueues.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8655
309316 hyperv/vmbus: Add DEVMETHOD to map cpu to event taskq.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8658
309318 hyperv/hn: Allow TX to share event taskqueues.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8659 |
311367 |
05-Jan-2017 |
sephe |
MFC 309240,309242,309244,309245,309670
309240 hyperv/vmbus: Add result polling support for xact API.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8633
309242 hyperv/vmbus: Add result polling support for message Hypercall API.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8634
309244 hyperv/vmbus: Add exec cancel support for message Hypercall API.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8635
309245 hyperv/vmbus: Use poll/cancel APIs to wait for the CHOPEN response.
Since hypervisor does not respond CHOPEN to a revoked channel.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8636
309670 hyperv/vmbus: Use pause if possible.
This makes booting on Hyper-V w/ small # of vCPUs work properly.
Reported by: Hongxiong Xian <v-hoxian microsoft com>, Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft |
311366 |
05-Jan-2017 |
sephe |
MFC 309236,309237
309236 hyperv/vmbus: Make sure that the allocated GPADL is not zero.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8631
309237 hyperv/vmbus: Stringent GPADL parameter assertion.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8632 |
311365 |
05-Jan-2017 |
sephe |
MFC 309226-309231,309235
309226 hyperv/hn: Utilize vmbus_chan_xact_wait
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8612
309227 hyperv/hn: Fix detach error handling.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8613
309228 hyperv/hn: Fix multi-packet RNDIS message aggregation size setting.
Just in case that no chimney sending buffer can be used.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8619
309229 hyperv/hn: Fix attach error handling
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8620
309230 hyperv/hn: Enable multi-packet RNDIS message support by default.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8621
309231 hyperv/hn: Fix vmbus_chan_subidx usage.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8629
309235 hyperv/hn: Simplify RSS indirect table fixup API
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8630 |
311364 |
05-Jan-2017 |
sephe |
MFC 309128,309129,309131-309136,309138-309140,309224,309225
309128 hyperv/vmbus: Commit the GPADL id only after the connection succeeds.
Minor style change.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8563
309129 hyperv/vmbus: Minor style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8564
309131 hyperv/vmbus: Fix sysctl tree leakage, if channel open fails.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8565
309132 hyperv/vmbus: Don't close unopened channels.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8566
309133 hyperv/vmbus: GPADL disconnect error on a revoked channel is benign.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8567
309134 hyperv/vmbus: No stranded bufring GPADL is allowed.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8568
309135 hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.
So that the callers of vmbus_chan_open_br() could handle the passed in bufring memory properly.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8569
309136 hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8570
309138 hyperv/vmbus: Always try disconnect/free bufring memory upon channel close
While I'm here, minor wording and style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8598
309139 hyperv/vmbus: Propagate close error.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8599
309140 hyperv/vmbus: Add a simplified version of channel close.
So that the caller can know the channel close error and react accordingly.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8600
309224 hyperv/vmbus: Zero out GPADL if error happens.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8601
309225 hyperv/vmbus: Add supportive transaction wait function.
This function supports channel revocation properly.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8611 |
311362 |
05-Jan-2017 |
sephe |
MFC 309085
hyperv/hn: Fix primary channel revocation
Since hypervisor will not drain the TX bufring, once the channels are revoked: - Setup vmbus orphan handler properly. - Make sure that suspension will not wait the TX bufring draining forever. - GC the pending TX descs on detach path, before freeing the busdma stuffs.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8559 |
311359 |
05-Jan-2017 |
sephe |
MFC 309030,309039,309080,309081,309083
309030 hyperv/vmbus: Set a mark on the revoked channel.
This will be used to fix device detach DEVMETHOD for revoked primary channel.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8522
309039 hyperv/vmbus: Merge free/active locks.
These functions are only used by management stuffs, so there are no needs to introduce extra complexity.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8524
309080 hyperv/vmbus: Implement orphan support for transaction API
It will be used to fix the primary channel revocation support.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8525
309081 hyperv/vmbus: Fix the primary channel revoking on vmbus side.
Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked primary channels.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8545
309083 hyperv/vmbus: Fix the multi-channel revoking on vmbus side.
- Reference count the sub-channel when channel offer message is processed, so that immediate rescind message on the same channel will not race sub-channel open on driver side. - Drop the above reference when sub-channel is closed, this closely mimics the hypervisor's reaction when primary channel is closed on the VM side. No drivers use sub-channel after primary channel is closed.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8546 |
311358 |
05-Jan-2017 |
sephe |
MFC 308908,308909
308908 hyperv/hn: Allow enabling IPv6 TX checksum offloading and IPv6 TSO.
They are still disabled by default.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8490
308909 hyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse.
Just in case, the # of TX/RX rings is changed upon synthetic parts re-attach.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8520 |
311357 |
05-Jan-2017 |
sephe |
MFC 308907
hyperv/hn: Fix WITNESS warnings
And re-enable SIOCADDMULTI/SIOCDELMULTI, after WITNESS warning is fixed.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8489 |
311356 |
05-Jan-2017 |
sephe |
MFC 308906
hyperv/vmbus: Support transction result busy-wait.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8488 |
311355 |
05-Jan-2017 |
sephe |
MFC 308905
hyperv/hn: Implement RNDIS multi-packet message support.
Currently, it is only applied to packet sent through chimney sending buffers. Not enabled by default yet.
This one gives 20%~30% performance boost for non-TSO usage in both bit/packet rate tests and nginx performance test.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8560 |
311353 |
05-Jan-2017 |
sephe |
MFC 308664,308742,308743
308664 hyperv/vss: Add driver and tools for VSS
VSS stands for "Volume Shadow Copy Service". Unlike virtual machine snapshot, it only takes snapshot for the virtual disks, so both filesystem and applications have to aware of it, and cooperate the whole VSS process.
This driver exposes two device files to the userland:
/dev/hv_fsvss_dev
Normally userland programs should _not_ mess with this device file. It is currently used by the hv_vss_daemon(8), which freezes and thaws the filesystem. NOTE: currently only UFS is supported, if the system mounts _any_ other filesystems, the hv_vss_daemon(8) will veto the VSS process.
If hv_vss_daemon(8) was disabled, then this device file must be opened, and proper ioctls must be issued to keep the VSS working.
/dev/hv_appvss_dev
Userland application can opened this device file to receive the VSS freeze notification, hold the VSS for a while (mainly to flush application data to filesystem), release the VSS process, and receive the VSS thaw notification i.e. applications can run again.
The VSS will still work, even if this device file is not opened. However, only filesystem consistency is promised, if this device file is not opened or is not operated properly.
hv_vss_daemon(8) is started by devd(8) by default. It can be disabled by editting /etc/devd/hyperv.conf.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: kib, mckusick Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8224
308742 hyperv/vss: Nuke unused variables.
Submitted by: markj Reported by: markj Sponsored by: Microsoft
308743 hyperv/vss: Install the userland daemon to /usr/sbin instead of /
Submitted by: markj Reported by: markj Sponsored by: Microsoft |
310573 |
26-Dec-2016 |
sephe |
r310348
hyperv: Unbreak EARLY_AP_STARUP Hyper-V bootstrap by using intrhook
Properly working pause and friends are required.
Sponsored by: Microsoft |
309312 |
30-Nov-2016 |
dexuan |
MFC: 308723-308725,308793-308795,309127
Approved by: sephe (mentor)
r308723 hyperv/vmbus: add a new method to get vcpu_id
vcpu_id is host's representation of guest CPU. We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus driver is loaded. Later, when a driver, like the coming pcib driver, talks to the host and needs to refer to a guest CPU, the driver must use the vcpu_id.
Reviewed by: jhb, sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8410
r308724 hyperv/vmbus: add new vmbus methods to support PCIe pass-through
The new methods will be used by the coming pcib driver.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8409
r308725 hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)
The feature enables us to pass through physical PCIe devices to FreeBSD VM running on Hyper-V (Windows Server 2016) to get near-native performance with low CPU utilization.
The patch implements a PCI bridge driver to support the feature:
1) The pcib driver talks to the host to discover device(s) and presents the device(s) to FreeBSD's pci driver via PCI configuration space (note: to access the configuration space, we don't use the standard I/O port 0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V, which is very similar to the 0xCF8/CFC method).
2) The pcib driver allocates resources for the device(s) and initialize the related BARs, when the device driver's attach method is invoked;
3) The pcib driver talks to the host to create MSI/MSI-X interrupt remapping between the guest and the host;
4) The pcib driver supports device hot add/remove.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8332
r308793 hyperv/pcib: Fix the build for some kernel configs
Add the dependency on pci explicitly for the pcib and vmbus drivers. The related Makefiles are updated accordingly too.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft
r308794 hyperv/vmbus,pcib: Add MODULE_DEPEND on pci
We'd better add this dependency explicitly, though usually the pci driver is built into the kernel by default.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft
r308795 hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c
This makes the file name and the variable naming in the file consistent.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft
r309127 hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined
vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at least shouldn't break build.
Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft |
308635 |
14-Nov-2016 |
sephe |
MFC 308201
hyperv/kvp: Don't mix message status codes and function return values.
While I'm here, move message status codes to hv_utilreg.h, since they will be used by the upcoming VSS stuffs.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8391 |
308634 |
14-Nov-2016 |
sephe |
MFC 308194
hyperv: GC unused functions.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8406 |
308633 |
14-Nov-2016 |
sephe |
MFC 308168
hyperv/vmbus: Avoid extra header copy.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8395 |
308632 |
14-Nov-2016 |
sephe |
MFC 308166,308167
308166 hyperv/hn: Move TSO packet fixup to an earlier place for if_transmit.
While TSO packet header may be still cache-hot.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8393
308167 hyperv/hn: Directly fill chimney sending buffer for small packets.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8394 |
308631 |
14-Nov-2016 |
sephe |
MFC 308164
hyperv/hn: Regroup if_start related functions.
And put them under HN_IFSTART_SUPPORT, which is by default on until we whack the if_start related bits from base system.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8392 |
308630 |
14-Nov-2016 |
sephe |
MFC 308163
hyperv/hn: Rename cleaned up file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8390 |
308629 |
14-Nov-2016 |
sephe |
MFC 308162
hyperv/hn: Cosmetic cleanup; no functional changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8389 |
308628 |
14-Nov-2016 |
sephe |
MFC 308117-308120
308117 hyperv/hn: Rework temporary channel packet buffer expanding.
And use large default temporary channel packer buffer; we really don't want it to be expanded at run time.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8367
308118 hyperv/hn: Cleanup RXBUF ack processing.
- Increase the # of retries. - Add comment. - Log error, if RXBUF ack fails. - Add stat for RXBUF ack failures.
RXBUF ack really should _not_ fail...
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8368
308119 hyperv/hn: Reset do_lro, if the hash types are not TCP related.
Mainly because the host side only set TCPCS and IPCS even for UDP datagrams.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8369
308120 hyperv/hn: Don't start shared TX taskq, if the hypervisor is not Hyper-V.
- Move the SYSINIT to DRIVER/SECOND, i.e. after the vm_guest becomes determistic. - Minor style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8370 |
308627 |
14-Nov-2016 |
sephe |
MFC 308018,308116
308018 hyeprv/hn: Rename cleaned up RNDIS header file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8360
308116 hyperv/hn: Rename cleaned up RNDIS source file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8361 |
308626 |
14-Nov-2016 |
sephe |
MFC 308013-308017
308013 hyperv/hn: Nuke unnecessary indirection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8355
308014 hyperv/hn: Reorganize RX path; mainly pull non-control code path up
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8356
308015 hyperv/hn: Pull data path code up.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8357
308016 hyperv/hn: Cleanup RNDIS related files.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8358
308017 hyperv/hn: Change header guardian; in preparation for the upcoming rename.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8359 |
308625 |
14-Nov-2016 |
sephe |
MFC 308011,308012
308011 hyperv/hn: Rename cleaned up NVS header file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8353
308012 hyperv/hn: Rename cleaned up NVS source file.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8354 |
308624 |
14-Nov-2016 |
sephe |
MFC 307989-307991,308010
307989 hyperv/hn: Move hn_softc to if_hnvar.h
While I'm here, use consistent macro names.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8345
307990 hyperv/hn: Move send context to NVS domain.
Since all sends are encapsulated in NVS messages.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8346
307991 hyperv/hn: NVS inclusion cleanup and forward declare functions.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8347
308010 hyperv/hn: Change header guardian; in preparation for the upcoming rename.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8352 |
308623 |
14-Nov-2016 |
sephe |
MFC 307985-307988
307985 hyperv/hn: Nuke unnecessary M_NETVSC
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8340
307986 hyperv/hn: Move %b format string for capabilities near their definition.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8341
307987 hyperv/hn: Define empty packet filter.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8342
307988 hyperv/hn: Shuffle chimney sending buffer alloc/free around.
This paves way for more chimney sending buffer reorganization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8343 |
308622 |
14-Nov-2016 |
sephe |
MFC 307983
hyperv/hn: Properly configure RSS according to RSS capabilities
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8338 |
308621 |
14-Nov-2016 |
sephe |
MFC 307952,307953,308278
307952 hyperv/vmbus: Add missing white space.
Submitted by: QianYue You <t-youqi microsoft com> Sponsored by: Microsoft
307953 hyperv/vmbus: Implement vmbus_chan_printf.
And use it for vmbus channel logging, which can log the channel owner's name properly, instead of vmbus0.
Submitted by: QianYue You <t-youqi microsoft com> Sponsored by: Microsoft
308278 hyperv/vmbus: Reset ch_dev, once the child is deleted.
So it will not be mis-used later on, e.g. in vmbus_chan_printf().
Submitted by: dexuan Reported by: dexuan Sponsored by: Microsoft |
308620 |
14-Nov-2016 |
sephe |
MFC 307893
hyperv/hn: Set baudrate properly
PR: 208931 Submitted by: Eugene Grosbein <ports grosbein net> Reported by: Eugene Grosbein <ports grosbein net> Sponsored by: Microsoft |
308523 |
11-Nov-2016 |
sephe |
MFC 307845
hyperv/ic: Rework framework/message version negotiation.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Modified by: sephe Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8280 |
308522 |
11-Nov-2016 |
sephe |
MFC 307844
hyperv/hn: Nuke unused forward declaration.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8314 |
308521 |
11-Nov-2016 |
sephe |
MFC 307843
hyperv/hn: Fix RX filter settings.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8313 |
308520 |
11-Nov-2016 |
sephe |
MFC 307840,307842
307840 hyperv/hn: Properly handle synthetic parts reattach failure.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8310
307842 hyperv/hn: Start link status check, if no network changes were pending.
Link status check is much more lightweight than network change detection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8311 |
308519 |
11-Nov-2016 |
sephe |
MFC 307838,307839
307838 hyperv/hn: Move chimney buffer index and size to txdesc.
All RNDIS control messages have used SG list for a while. This makes the send context suitable for further refactoring.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8308
307839 hyperv/hn: Fix chimney sending buffer leakage upon NVS sending failure.
This will not happen in real world, since TX consumption of the vmbus TX bufring is limitted. Better safe than sorry.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8309 |
308518 |
11-Nov-2016 |
sephe |
MFC 307710-307712,307714
307710 hyperv/hn: Always query RSS capabilities.
- This avoid distributing NDIS version check. - Only NDIS 6.20 required (earlier NDIS uses different indirect table format).
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8291
307711 hyperv/hn: Check NVS version for HASHVAL pktinfo on sending path.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8293
307712 hyperv/hn: Add network change support.
Currently the network change is simulated by link status changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8295
307714 hyperv/hn: Function renaming; consistent w/ hardware capabilities query.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8296 |
308517 |
11-Nov-2016 |
sephe |
MFC 307624
hyperv/vmbus: Expose channel management taskqueue for driver to use.
MFC after: 3 days Sponsored by: Microsoft |
307618 |
19-Oct-2016 |
sephe |
MFC 307263
hyperv/vmbus: Add __FBSDID
Sponsored by: Microsoft |
307617 |
19-Oct-2016 |
sephe |
MFC 307261
hyperv/stor: Fix off-by-one bug; this brings back TRIM support.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reported by: Lili Deng <v-lide microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8238 |
307614 |
19-Oct-2016 |
sephe |
MFC 307012,307013,307262
307012 hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8208
307013 hyperv/hn: Rework link status support.
This is the preamble for network device SR-IOV and NDIS_STATUS_NETWORK_CHANGE handling.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8209
307262 hyperv/hn: Management parts always need suspend and resume.
Sponsored by: Microsoft |
307613 |
19-Oct-2016 |
sephe |
MFC 306936-306939
306936 hyperv/hn: Fix checksum offload settings
The _correct_ way to identify the supported checksum offloading and TSO parameters is to query OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8088
306937 hyperv/hn: Fix if_hw_tsomax setup.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8089
306938 hyperv/hn: Generalize RSS capabilities query.
- Support NDIS < 6.30. - Stringent response checks.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8090
306939 hyperv/hn: Suffix NDIS offload size with NDIS version.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8091 |
307612 |
19-Oct-2016 |
sephe |
MFC 306484,306485
306484 hyperv/vmbus: Add missing vmbus_if.c to module build.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8067
306485 hyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8068 |
307611 |
19-Oct-2016 |
sephe |
MFC 306482,306483
306482 hyperv/hn: If synthetic parts are detached, don't touch them.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8065
306483 hyperv/hn: Fix detach and attach error handling.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8066 |
307609 |
19-Oct-2016 |
sephe |
MFC 306433
hyperv/hn: Don't set HASHVAL pktinfo for NDIS < 6.30
This unbreaks packet sending on WS2008R2.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8057 |
307608 |
19-Oct-2016 |
sephe |
MFC 306431,306432
306431 hyperv/hn: Move TX tasks' draining into hn_suspend().
This prepares to consolidate hn_stop() and netvsc_detach().
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8055
306432 hyperv/hn: Consolidate hn_init() and hn_stop()
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8056 |
307607 |
19-Oct-2016 |
sephe |
MFC 306426
hyperv/storvsc: Fix the blkvsc disk attachment issues.
- The original 'disengage' ATA controller model does not work properly for all possible disk configurations. Use the newly added ATA disk veto eventhandler to fit into all possible disk configuration. - If the 'invalid LUN' happens on blkvsc controllers, return CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under the blkvsc controllers.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Discussed with: mav Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7693 |
307604 |
19-Oct-2016 |
sephe |
MFC 306393
hyperv/hn: Flatten RX filter configuration.
This paves way for more fixes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8049 |
307603 |
19-Oct-2016 |
sephe |
MFC 306390-306392
306390 hyperv/hn: Suspend and resume the backend properly upon MTU change.
Suspend: - Prevent the backend from being touched on TX path. - Clear the RNDIS RX filter, and wait for RX to drain. - Make sure that NVS see the chimney sending buffer and RXBUF disconnection, before unlink these buffers from the channel.
Resume: - Reconfigure the RNDIS filter. - Allow TX path to work on the backend. - Kick start the TX eof task, in case the OACTIVE is set.
This fixes various panics, when the interface has traffic and MTU is being changed.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8046
306391 hyperv/hn: Reorganize the synthetic parts detach.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8047
306392 hyperv/hn: Reorder the comment a little bit.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8048 |
307599 |
19-Oct-2016 |
sephe |
MFC 306360,306387,306389
306360 hyperv/vmbus: Add dynamic device add and remove support
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8008
306387 hyperv/vmbus: Add functions to test RX/TX bufring emptiness
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8044
306389 hyperv/vmbus: Add function to drain channel interrupt task.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8045 |
307595 |
19-Oct-2016 |
sephe |
MFC 306072-306074,306076
306072 hyperv/vmbus: Allow bufrings preallocation.
The assumption that the channel is only opened upon synthetic device attach time no longer holds, e.g. Hyper-V network device MTU changes. We have to allow device drivers to preallocate bufrings, e.g. in attach DEVMETHOD, to prevent bufring allocation failure once the system memory is fragmented after running for a while.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7960
306073 hyperv/hn: Allocate bufrings in attach DEVMETHOD.
So that reinitialization, e.g. MTU change, will not fail when the system memory is excessively fragmented.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7961
306074 hyperv/vmbus: Assert that the bufring address is page aligned.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7962
306076 hyperv/hn: Put debug messages under bootverbose
While I'm here, strip blank line.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7963 |
307594 |
19-Oct-2016 |
sephe |
MFC 306013,306014
306013 hyperv/hn: Fix ifnet hwassist setup.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7948
306014 hyperv/hn: Let the caller of hn_nvs_doinit() do the error logging.
So that NVS version probing failure does not look too scary.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7950 |
307591 |
19-Oct-2016 |
sephe |
MFC 305962,305964-305967
305962 hyperv/hn: Don't allow NVS and NDIS version change upon reinitailization
NVS and NDIS version change would break too much assumption and static configuration.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7919
305964 hyperv/hn: Save capabilities for later use.
And don't allow capability changes during reinitialization, which breaks too much static configuration.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7922
305965 hyperv/hn: Don't allow MTU change, if it is not supported by the NVS.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7923
305966 hyperv/hn: Stringent RSS sysctl checks
- Don't change RNDIS RSS configuration for RSS key sysctl, if the interface is not capable of RSS yet. - Don't change RSS indirect table (both cached one and RNDIS RSS configuration), if the interface is not capable of RSS yet.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7924
305967 hyperv/hn: Allow RSS capability flipping upon attach/reinit.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7927 |
307516 |
17-Oct-2016 |
sephe |
MFC 305925,305926,305960
305925 hyperv/hn: Don't mess up RSS key and indirect table after attachment.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7889
305926 hyperv/hn: Add sysctls to dynamic adjust RSS key and indirect table
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7890
305960 hyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7916 |
307514 |
17-Oct-2016 |
sephe |
MFC 305801,305923,305924
305801 hyperv/hn: Fix some ifnet settings
- ifnet.if_mtu does not require explicit setting. - ifnet.if_hdrlen must be set after ether_ifattach().
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7873
305923 hyperv/hn: Regroup ifnet setup code.
While I'm here, add comment along the attach DEVMETHOD.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7874
305924 hyperv/hn: Put debug message under bootverbose
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7875 |
307513 |
17-Oct-2016 |
sephe |
MFC 305795,305796
305795 hyperv/hn: Bring in shims from stable/10
This eases future MFCs to stable/10.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7871
305796 hyperv/hn: Remove the FreeBSD_version check for TSO configuration
It is available on both stable/10 and stable/11. This eases future MFCs to stable/10.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7872 |
307512 |
17-Oct-2016 |
sephe |
MFC 305794
hyperv/hn: Use sx for the main lock.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7870 |
307511 |
17-Oct-2016 |
sephe |
MFC 305790-305793
305790 hyperv/hn: Remove unused softc field
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7866
305791 hyperv/hn: Deprecate hn_softc_t
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7867
305792 hyperv/hn: Function renaming: hn_ifinit -> hn_init
No functional changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7868
305793 hyperv/hn: Cleanup hn_ioctl.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7869 |
307510 |
17-Oct-2016 |
sephe |
MFC 305789
hyperv/vmbus: Make sure that the sub-channel count is valid.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7865 |
307508 |
17-Oct-2016 |
sephe |
MFC 305724,305725,305727-305730,305760,305761,305763,305788
305724 hyperv/hn: Rename RXBUF connect/disconnect functions.
Minor cleanup and wording in error messages.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7823
305725 hyperv/hn: Rename chimney sending buffer connect/disconnect functions.
Minor cleanup and wording in error messages.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7825
305727 hyperv/hn: Function rename.
- Minor style changes. - Nuke unnecessary indirection. - Nuke unapplied comment.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7827
305728 hyperv/hn: Reorganize sub-channel allocation.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7829
305729 hyperv/hn: Reorganize RNDIS attach
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7830
305730 hyperv/hn: Pull ether address and link status extraction up.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7831
305760 hyperv/hn: Reorganize channel attach/detach code.
This paves the way for further attach/detach code reorganization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7858
305761 hyperv/hn: Regroup synthetic parts attach code.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7859
305763 hyperv/hn: Reorganize synthetic parts attach code.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7860
305788 hyperv/hn: Pull RSS key and indirect table setup up.
This paves the way for the dynamic RSS key and indirect table setting.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7864 |
307504 |
17-Oct-2016 |
sephe |
MFC 305586,305587
305586 hyperv/hn: Function renaming.
While I'm here, remove obvious comment.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7810
305587 hyperv/hn: Factor out NVS NDIS initialization
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7811 |
307503 |
17-Oct-2016 |
sephe |
MFC 305585
hyperv/kvp: Fix IPv4/IPv6 address injection support.
The GUID string provided by hypervisor has leading and trailing braces, while our GUID string does not have braces at all. Both braces should be ignored, when the GUID strings are compared.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Modified by: sephe Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7809 |
307502 |
17-Oct-2016 |
sephe |
MFC 305578-305581
305578 hyperv/hn: Pull vmbus channel open up.
While I'm here, pull up the channel callback related code too.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7805
305579 hyperv/hn: Push RXBUF size adjustment down.
It is not used in other places.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7806
305580 hyperv/hn: Factor out function to do NVS initialization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7807
305581 hyperv/hn: Pass MTU around.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7808 |
307500 |
17-Oct-2016 |
sephe |
MFC 305454,305455,305521,305524-305526
305454 hyperv/hn: Fix VLAN tag setup for outgoing VLAN packets.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7785
305455 hyperv/hn: Avoid bit fields for LSOv2 setup.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7786
305521 hyperv/hn: Avoid bit fields for TXCSUM setup.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7792
305524 hyperv/hn: Cleanup RNDIS packet message encapsulation.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7793
305525 hyperv/hn: Simplify per-packet-info construction.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7794
305526 hyperv/hn: Nuke unused bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7795 |
307498 |
17-Oct-2016 |
sephe |
MFC 305405,305407,305408,305410,305411,305453
305405 hyperv/vmbus: Stringent header length and total length check.
While I'm here, minor style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7752
305407 hyperv/hn: Stringent NVS notification length check.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7753
305408 hyperv/hn: Stringent NVS RNDIS packets length checks.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7755
305410 net/rndis: Define RNDIS status message, which could be sent by device.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7757
305411 hyperv/hn: Stringent RNDIS control message length check.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7758
305453 hyperv/hn: Stringent RNDIS packet message length/offset check.
While I'm here, use definition in net/rndis.h
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7782 |
307497 |
17-Oct-2016 |
sephe |
MFC 305279-305281
305279 hyperv/ic: Minor style fix.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7743
305280 hyperv/ic: Cleanup shutdown channel callback.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7744
305281 hyperv/ic: Cleanup timesync channel callback.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7745 |
307495 |
17-Oct-2016 |
sephe |
MFC 305175,305176,305179,305182,305268,305270,305276
305175 net/rndis: Define per-packet-info for RNDIS packet message
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7708
305176 hyperv/hn: Stringent per-packet-info verification.
While I'm here, minor style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7709
305179 hyperv/hn: Fix VLAN tag construction.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7716
305182 net/rndis: Define types for RNDIS pktinfo rm_type field.
They are defined by NDIS spec, so the NDIS prefix.
Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7717
305268 hyperv/hn: Rework RXCSUM related bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7735
305270 hyperv/hn: Simplify RX hash related bits.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7736
305276 hyperv/hn: Use the per-packet-info types defined by net/rndis.h
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7737 |
307494 |
17-Oct-2016 |
sephe |
MFC 305173,305174
305173 net/rndis: Add comment for rndis_set_parameter
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7705
305174 hyperv/hn: Remove unused function
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7706 |
307493 |
17-Oct-2016 |
sephe |
MFC 305111
hyperv/timesync: Rework time adjustment policy
- By default, adjust time upon SYNC request. It can be disabled through hw.hvtimesync.ignore_sync_req. SYNC request will be sent by hypervisor the host is resumed, rebooted, etc. - By default, adjust time upon SAMPLE request, if there is 100ms difference between VM time and hypervisor time. This can be disabled through hw.hvtimesync.sample_drift.
And nuke the unnecessary task, since channel callback is running in a Hyper-V taskqueue nowadays.
Submitted by: YanZhe Chen <t-yachen microsoft com> Discussed with: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>, sephe Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7707 |
307492 |
17-Oct-2016 |
sephe |
MFC 305052-305054,305110
305052 hyperv/hn: Remove the useless rndis_device and related bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7687
305053 hyperv/hn: Log packet message alignment.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7689
305054 hyperv/hn: Remove unnecessary NULL check.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7690
305110 hyperv/hn: Consolidate NVS transaction execution.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7704 |
307491 |
17-Oct-2016 |
sephe |
MFC 305049,305050
305049 hyperv/hn: Factor out func to exec RNDIS transaction w/o checking result
It will be used by RNDIS HALT and RESET.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7685
305050 hyperv/hn: Switch to new RNDIS transaction execution for halt.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7686 |
307490 |
17-Oct-2016 |
sephe |
MFC 304973,304975,304976,304979,305044-305048
304973 hyperv/hn: Switch to new RNDIS query for link status extraction.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7654
304975 hyperv/hn: Switch to new RNDIS query for RSS capabilities extraction.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7656
304976 hyperv/hn: Fix # of channels setting, if RSS is not available.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7657
304979 hyperv/hn: Switch to new RNDIS set for RSS parameters.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7658
305044 hyperv/hn: Move OIDs to net/rndis.h; they are standard NDIS OIDs.
Actually all OIDs defined in net/rndis.h are standard NDIS OIDs. While I'm here, use the verbose macro name as in NDIS spec.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7679
305045 hyperv/hn: Indentation and field comment fixup for ndis.h.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7680
305046 net/rndis: Packet types are defined by NDIS; not RNDIS specific.
Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7681
305047 hyperv/hn: Switch to new RNDIS set for RX filters.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7683
305048 hyperv/hn: Remove unused function
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7684 |
307487 |
17-Oct-2016 |
sephe |
MFC 304832-304834,304972
304832 hyperv/hn: Use vmbus xact for RNDIS query.
And switch MAC address query to use new RNDIS query function.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7639
304833 hyperv/hn: Save the adopted NDIS version for RNDIS to use later.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7640
304834 hyperv/hn: Use vmbus xact for RNDIS set.
And use new RNDIS set to configure NDIS offloading parameters.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7641
304972 hyperv/hn: Add definition for NDIS media state.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7652 |
307486 |
17-Oct-2016 |
sephe |
MFC 304790,304791
304790 hyperv/vmbus: Add function to calculate max # of elements in a bufring.
Sponsored by: Microsoft
304791 hyperv/storvsc: Increase queue depth and rework channel selection.
- Increasing queue depth gives ~100% performance improvement for randwrite fio test in Azure. - New channel selection, which takes LUN id and the current cpuid into consideration, gives additional ~20% performance improvement for ranwrite fio test in Azure.
Submitted by: Hongzhang Jiang <honzhan microsoft com> Modified by: sephe Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7622 |
307485 |
17-Oct-2016 |
sephe |
MFC 304786,304788
304786 hyperv/ic: Cleanup heartbeat channel callback.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7626
304788 hyperv/ic: Update total message size if negotiate message size grows.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7627 |
307484 |
17-Oct-2016 |
sephe |
MFC 304783-304785
304783 hyperv/hn: Use definition in net/rndis.h for message type and status code.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7620
304784 hyperv/hn: Add compat code for RNDIS reorganization phase.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7621
304785 hyperv/hn: Use vmbus xact for RNDIS initialize.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7624 |
307483 |
17-Oct-2016 |
sephe |
MFC 304730
hyperv/ic: Redefine IC version negotiate message.
And stringent input IC version negotiate message checks.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7614 |
307482 |
17-Oct-2016 |
sephe |
MFC 304724,304728
304724 hyperv/hn: Remove the redundant rid setting for RNDIS HALT.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7595
304728 hyperv/hn: Log a warning for RESET_CMPLT.
RESET is not used by the hn(4) at all, and RESET_CMPLT does not even have a rid to match with the pending requests. So, let's put it onto an independent switch branch and log a warning about it.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7602 |
307480 |
17-Oct-2016 |
sephe |
MFC 304441,304444,304446,304447,304591,304593-304595
304441 hyperv/hn: Move NVS version to softc
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7553
304444 hyperv/hn: Remove assign-only struct field
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7554
304446 hyperv/hn: Remove the useless num_channel
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7555
304447 hyperv/hn: Move RXBUF to hn_softc
And don't recreate RXBUF for each primary channel open, it is now created in device_attach DEVMETHOD and destroyed in device_detach DEVMETHOD.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7556
304591 hyperv/hn: Move chimney sending buffer to hn_softc
And don't recreate chimney sending buffer for each primary channel open, it is now created in device_attach DEVMETHOD and destroyed in device_detach DEVMETHOD.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7574
304593 hyperv/hn: Get rid of netvsc_dev
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7575
304594 hyperv/hn: Factor out function to execute NVS transactions.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7577
304595 hyperv/hn: Factor out function to simplify NVS request sending
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7578 |
307479 |
17-Oct-2016 |
sephe |
MFC 304331
hyperv/kvp: Remove unnecessary function parameter.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7550 |
307478 |
17-Oct-2016 |
sephe |
MFC 304327,304329,304330
304327 hyperv/hn: Pass RX packet info to netvsc_recv.
This paves to nuke netvsc_packet, which does not serves much purpose now.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7541
304329 hyperv/hn: Constify RNDIS messages on RX path.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7542
304330 hyperv/hn: Get rid of the useless netvsc_packet
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7544 |
307477 |
17-Oct-2016 |
sephe |
MFC 304270,304273
304270 hyperv/util: Don't reference hn_softc in KVP
hn_softc is private data struct.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7519
304273 hyperv/util: Factor out helper for IC device_probe DEVMETHOD
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7530 |
307476 |
17-Oct-2016 |
sephe |
MFC 304204-304206,304252-304256
304204 hyperv/hn: Factor out hn_nvs_send/hn_nvs_send_sglist
Avoid unnecessary message type setting and centralize the send context to transaction id cast.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7500
304205 hyperv/hn: Simplify RNDIS NVS message sending.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7501
304206 hyperv/hn: Simplify RNDIS message checks on RX path.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7502
304252 hyperv/hn: Ignore the useless TX table.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7514
304253 hyperv/hn: Simplify RNDIS RX packets acknowledgement.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7515
304254 hyperv/hn: Remove reference to nvsp_msg
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7516
304255 hyperv/hn: Remove reference to nvsp_status
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7517
304256 hyperv/hn: Get rid of unused bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7518 |
307475 |
17-Oct-2016 |
sephe |
MFC 303945,303947-303949,303989,303992,303998,304001,304002,304109,304111
303945 hyperv/vmbus: Add macro to get channel packet data length.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7455
303947 hyperv/vmbus: Add APIs for various types of transactions.
Reviewed by: Jun Su <junsu microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7456
303948 hyperv/hn: Switch to vmbus xact APIs for NVS initialization
Reviewed by: Jun Su <junsu microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7457
303949 hyperv/vmbus: Use xact APIs to implement post message Hypercall APIs
Avoid code duplication.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7458
303989 hyperv/hn: Simplify NDIS configuration.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7466
303992 hyperv/hn: Simplify NDIS initialization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7467
303998 hyperv/hn: Switch to vmbus xact APIs for NVS RXBUF connection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7469
304001 hyperv/hn: Switch to vmbus xact APIs for NVS chimney buffer connection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7470
304002 hyperv/hn: Simplify RXBUF disconnection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7472
304109 hyperv/hn: Simplify chimney sending buffer disconnection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7479
304111 hyperv/hn: Switch to vmbus xact APIs for sub-channel alloc request.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7480 |
307473 |
17-Oct-2016 |
sephe |
MFC 303867,303901
303867 hyperv/hn: Move gpa array out of netvsc_packet.
Prepare to deprecate the netvsc_packet.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7436
303901 hyperv/hn: Reorganize send done callback.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7450 |
307472 |
17-Oct-2016 |
sephe |
MFC 303822-303824
303822 hyperv/ic: Remove never used second parameter of hv_negotiate_version()
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7422
303823 hyperv/ic: Expose the receive buffer length for callers to use.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7423
303824 hyperv/ic: Pass the channel callback to hv_util_attach()
The saved channel callback in util softc is actually never used.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7424 |
307471 |
17-Oct-2016 |
sephe |
MFC 303603-303605,303764
303603 hyperv/vmbus: Remove the artificial entry limit of SG and PRP list.
Just make sure that the total channel packet size does not exceed 1/2 data size of the TX bufring.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7359
303604 hyperv/storvsc: Set maxio to 128KB.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7360
303605 hyperv/storvsc: Stringent PRP list assertions
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7361
303764 hyperv/vmbus: Only make sure the TX bufring will not be closed.
KVP can write data, whose size is > 1/2 TX bufring size.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7414 |
307467 |
17-Oct-2016 |
sephe |
MFC 303474
hyperv/storvsc: Use busdma(9) and enable PIM_UNMAPPED by default.
The UNMAPPED I/O greatly improves userland direct disk I/O performance by 35% ~ 135%.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7195 |
307466 |
17-Oct-2016 |
sephe |
MFC 303421,303422,303470-303473
303421 hyperv/vmbus: Avoid unnecessary mb()
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7333
303422 hyperv/vmbus: Inclusion cleanup
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7334
303470 hyperv/vmbus: Reindent function declarations.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7344
303471 hyperv/vmbus: Forward declare static functions
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7346
303472 hyperv/vmbus: Move driver glue to the beginning of the files
Just as most of other drivers do. And move sysinit function close to its SYSINIT.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7347
303473 hyperv/vmbus: Revoke unnecessary exposure of vmbus softc
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7348 |
307465 |
17-Oct-2016 |
sephe |
MFC 303379
hyperv/vmbus: Rename cleaned up bufring code
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7318 |
307464 |
17-Oct-2016 |
sephe |
MFC 303284,303329,303361,303362,303366,303368-303370
303284 hyperv/vmbus: Move bufring info definition to vmbus_brvar.h
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7282
303329 hyperv/vmbus: Nuke unnecessary accessor functions.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7303
303361 hyperv/vmbus: Initialize RX/TX bufring mutex at channel creation time
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7312
303362 hyperv/vmbus: Use different struct for RX/TX bufring.
So that they can use suitable MP synchronization mechanism.
While I'm here change the bufring init/read/write function names.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7313
303366 hyperv/vmbus: Update comment for bufring
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7314
303368 hyperv/vmbus: Cleanup TX bufring write process.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7315
303369 hyperv/vmbus: Stringent RX bufring data length checks.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7316
303370 hyperv/vmbus: Cleanup RX bufring read process.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7317 |
307463 |
17-Oct-2016 |
sephe |
MFC 303283
hyperv/vmbus: Rename hv_vmbus_priv.h to vmbus_brvar.h
It only contains bufring related bits for a while.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7281 |
307462 |
17-Oct-2016 |
sephe |
MFC 303178,303180,303182
303178 hyperv/vmbus: Cosmetic bufring cleanup.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7267
303180 hyperv/vmbus: Cleanup and augment bufring sysctl tree creation
Binary state node is added, so that userland programs do not have to parse human readable state string.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7268
303182 hyperv/vmbus: Move vmbus bufring definition to vmbus_reg.h
And add more comment about its fields.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7269 |
307461 |
17-Oct-2016 |
sephe |
MFC 303066-303072,303127-303129,303131
303066 hyperv/vmbus: Get rid of unnecessary definition.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7240
303067 hyperv/vmbus: Move IC register definition to Hyper-V utilities
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7241
303068 hyperv/vmbus: Channel struct field rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7242
303069 hyperv/vmbus: Pass channel as the first argument for channel callback
The prepares to kill device private fields in channel struct, which are not flexible and extensible.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7243
303070 hyperv/vmbus: Deprecate the device private data in channel struct
They are neither flexible nor extensible.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7244
303071 hyperv/vmbus: Hide channel struct definition.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7245
303072 hyperv/vmbus: Save MNF trigger location instead of MNF trigger index.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7246
303127 hyperv/vmbus: Save event flag location and evet flag mask.
This avoids unnecessary access to the vmbus_softc struct on sending path.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7257
303128 hyperv/vmbus: Reorder channel fields.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7258
303129 hyperv/vmbus: Shuffle function declaration and macro definition.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7259
303131 hyperv: hv_vmbus_channel -> vmbus_channel
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7260 |
307460 |
17-Oct-2016 |
sephe |
MFC 303023
hyperv/vmbus: Rename laundered vmbus channel code
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7232 |
307459 |
17-Oct-2016 |
sephe |
MFC 302888-302892,302986,303020-303022
302888 hyperv/hn: Busdma-fy rxbuf and chimney sending buffer
Nuke unused channel GPADL API.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7211
302889 hyperv/vmbus: Back out r302888 temporarily
Committed by accident w/ duplicated commit log
Sponsored by: Microsoft OSTC
302890 hyperv/vmbus: Function rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7212
302891 hyperv/vmbus: Cosmetic vmbus channel close cleanup
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7213
302892 hyperv/vmbus: Cleanup channel sysctl tree creation
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7214
302986 hyperv/vmbus: Cosmetic vmbus channel open cleanup
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7217
303020 hyperv/vmbus: Cleanup cpu based channel selection.
And create cpu to channel map at device attach time for storvsc(4).
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7229
303021 hyperv/vmbus: Function rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7230
303022 hyperv/vmbus: Temp/internal variable/function rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7231 |
307458 |
17-Oct-2016 |
sephe |
MFC 302887
hyperv/hn: Busdma-fy rxbuf and chimney sending buffer
Nuke unused channel GPADL API.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7211 |
307457 |
17-Oct-2016 |
sephe |
MFC 302885,302886
302885 hyperv/vmbus: Cleanup channel receiving.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7202
302886 hyperv/vmbus: Cleanup channel packet receiving.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7204 |
307456 |
17-Oct-2016 |
sephe |
MFC 302882-302884
302882 hyperv/vmbus: Function rename
And reorder the error prone parameters list.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7191
302883 hyperv/vmbus: Field rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7193
302884 hyperv/vmbus: Factor out macros to do channel packet length conversion.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7194 |
307455 |
17-Oct-2016 |
sephe |
MFC 302875,302876,302878-302881
302875 hyperv/vmbus: Redefine channel packet.
The channel packet header will be shared w/ PRP (physical region page) list channel packet and SG (scatter gather) list channel packet.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7155
302876 hyperv/vmbus: Rework sglist sending.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7156
302878 hyeprv/vmbus: Rework prplist sending.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7175
302879 hyperv/vmbus: Move channel packet flags definition to vmbus.h
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7176
302880 hyperv/vmbus: Move channel packet types definition to vmbus.h
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7177
302881 hyperv/vmbus: Cleanup channel sending
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7178 |
307454 |
17-Oct-2016 |
sephe |
MFC 302873,302874
302873 hyperv/vmbus: Set vcpuid to 0, if MSR_HV_VP_INDEX does not exist.
Mainly for compatibility. While I'm here, rename cpuid related fields in hv_vmbus_channel.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7141
302874 hyperv/vmbus: Field rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7146 |
307453 |
17-Oct-2016 |
sephe |
MFC 302871,302872
302871 hyperv/vmbus: Add vmbus_chan_gpadl_connect, which takes GPA physaddr
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7139
302872 hyperv/vmbus: Busdma-fy channel bufring.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7140 |
307452 |
17-Oct-2016 |
sephe |
MFC 302867-302870
302867 hyperv/vmbus: Remove unused struct
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7127
302868 hyperv/vmbus: Function rename
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7129
302869 hyperv/vmbus: Remove unused function definition/declaration.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7131
302870 hyperv/vmbus: Use iovec for bufring scatter/gather list.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7134 |
307451 |
17-Oct-2016 |
sephe |
MFC 302864
hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7126 |
307450 |
17-Oct-2016 |
sephe |
MFC 302816-302818
302816 hyperv/vmbus: Release vmbus channel lock before detach devices
Device detach method may sleep.
While I'm here, rename the function, fix indentation and function comment.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7110
302817 hyperv/vmbus: Field renaming to reflect reality
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7111
302818 hyperv/vmbus: Fix the racy channel close.
It is not safe to iterate the sub-channel list w/o lock on the close path, while it's even more difficult to hold the lock and iterate the sub-channel list. We leverage the vmbua_{get,rel}_subchan() functions to solve this dilemma.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7112 |
307449 |
17-Oct-2016 |
sephe |
MFC 302808-302815
302808 hyperv/vmbus: Alloc/Free monitor param in vmbus channel alloc/free.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7101
302809 hyperv/vmbus: Move device register and channel free to the caller.
This paves the way for more cleanup/disentangle.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7102
302810 hyperv/vmbus: Move new channel scan notification to device register
And nuke now unnecessary function indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7103
302811 hyperv/vmbus: Cleanup vmbus_chan_msgproc_choffer
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7104
302812 hyperv/vmbus: Nuke the channel open state.
Channel is either opened or not-opened.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7105
302813 hyperv/vmbus: Cleanup vmbus_chan_add()
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7106
302814 hyperv/vmbus: Use sub-channel index to detect primary channel
In case that VMBUS_CHAN_ISPRIMARY is needed in the early place of channel setup.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7108
302815 hyperv/vmbus: Only add primary channels to vmbus channel list
- Make the vmbus_chan_add more straightforward. - Partially fix the hv_vmbus_release_unattached_channels().
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7109 |
307448 |
17-Oct-2016 |
sephe |
MFC 302733,302737,302801-302806
302733 hyperv/vmbus: Remove unused code
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7089
302737 hyperv/vmbus: Cleanup channel rescind
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7090
302801 hyperv/vmbus: Remove unused bits
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7091
302802 hyperv: hv_guid -> struct hyperv_guid.
This paves way for the further cleanup/disentangle.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7092
302803 hyperv/vmbus: Move channel offer message definition to vmbus_reg.h
- Avoid bit fields. - Avoid unnecessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7093
302804 hyperv/vmbus: Switch to vmbus channel message macros
Prepare for more cleanup.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7094
302805 hyperv/vmbus: Remove unused bits
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7095
302806 hyperv/vmbus: Get rid of rel{_id,id}, use channel id consistently.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7100 |
307310 |
14-Oct-2016 |
sephe |
MFC 302723,302726,302731
302723 hyperv: All Hypercall parameters have same alignment requirement.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7086
302726 hyperv: Signal event input parameter is shared w/ MNF
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7087
302731 hyperv/vmbus: Reorganize MNF event sending.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7088 |
307309 |
14-Oct-2016 |
sephe |
MFC 302710,302713
302710 hyperv/vmbus: Remove unnecessary callback check.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7046
302713 hyperv/vmbus: Install different task function for batch/non-batch channels
This avoids bunch of unnecessary checks on hot path and simplifies the channel processing.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7085 |
307308 |
14-Oct-2016 |
sephe |
MFC 302707-302709
302707 hyperv/vmbus: Nuke unused field from hv_vmbus_channel.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7036
302708 hyperv/bufring: Remove unused fields
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7037
302709 hyperv/vmbus: Pack bool field into flags field
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7038 |
307307 |
14-Oct-2016 |
sephe |
MFC 302698-302704,302706
302698 hyperv/vmbus: Add vmbus method for GUID base device probing.
Reduce the exposure of hv_device.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7024
302699 hyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7025
302700 hyperv/vmbus: Add channel ivar accessor.
This makes life easier during the transition period to nuke the hv_device.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7026
302701 hyperv/stor: Avoid the hv_device and nuke the broken get_stor_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7027
302702 hyperv/util: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7028
302703 hyperv/vmbus: Deprecate the usage of hv_device.
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7032
302704 hyperv/hn: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7033
302706 hyperv: Get rid of hv_device, which is unnecessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7034 |
307306 |
14-Oct-2016 |
sephe |
MFC 302693-302697
302693 hyperv/vmbus: Make channel id a field of hv_vmbus_channel.
This prepares to remove the unnecessary offer message embedding in hv_vmbus_channel.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7014
302694 hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.
This prepares to remove the unnecessary offer message embedding in hv_vmbus_channel.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7015
302695 hyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication
This prepares to remove the unnecessary offer message embedding in hv_vmbus_channel.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7019
302696 hyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel
This prepares to remove the unnecessary offer message embedding in hv_vmbus_channel.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7020
302697 hyperv/vmbus: Remove the embedded offer message from hv_vmbus_channel
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7021 |
307305 |
14-Oct-2016 |
sephe |
MFC 302692
hyperv/vmbus: Merge hv_connection.c into hv_channel.c
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7004 |
307304 |
14-Oct-2016 |
sephe |
MFC 302636-302638
302636 hyperv/vmbus: Move channel map to vmbus_softc
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6982
302637 hyperv/vmbus: Remove needed bits
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7002
302638 hyperv/vmbus: Destroy channel list lock upon attach failure and detach.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7003 |
307303 |
14-Oct-2016 |
sephe |
MFC 302632-302634
302632 hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}
Reviewed by: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6976
302633 hyperv/vmbus: Free sysctl properly upon channel close.
Prepare for sub-channel re-open.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6977
302634 hyperv/vmbus: Fix sub-channel re-open support.
For multi-channel devices, once the primary channel is closed, a set of 'rescind' messages for sub-channels will be delivered by Hypervisor. Sub-channel MUST be freed according to these 'rescind' messages; directly re-openning sub-channels in the same fashion as the primary channel's re-opening does NOT work at all.
After the primary channel is re-opened, requested # of sub- channels will be delivered though 'channel offer' messages, and this set of newly offered channels can be opened along side with the primary channel.
This unbreaks the MTU setting for hn(4), which requires re- openning all existsing channels upon MTU change.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6978 |
307302 |
14-Oct-2016 |
sephe |
MFC 302617-302621,302623,302629-302631
302617 hyperv/vmbus: Flatten channel message response processing.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6914
302618 hyperv/vmbus: Avoid tx_evtflags setting code duplication.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6915
302619 hyperv/vmbus: Busdma-fy Hypercall signal event input parameter.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6916
302620 hyperv: Nuke unused stuffs
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6917
302621 hyperv/vmbus: Don't be oversmart in default cpu selection.
Pin the channel to cpu0 by default. Drivers having special channel-cpu mapping requirement should call vmbus_channel_cpu_{set,rr}() themselves.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6918
302623 hyperv/vmbus: Minor renaming
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6919
302629 hyperv/vmbus: Rework vmbus version accessing.
Instead of global variable, vmbus version is accessed through a vmbus DEVMETHOD now.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6953
302630 hyperv/vmbus: Move GPADL index into vmbus_softc
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6954
302631 hyperv/vmbus: Move channel list to vmbus_softc
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6956 |
307301 |
14-Oct-2016 |
sephe |
MFC 302607-302612
302607 hyperv/vmbus: Use post message Hypercall APIs for channel open
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6876
302608 hyperv/vmbus: Remove unnecessary check and unapplied comment
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6877
302609 hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.
This also fixes memory leakge if sub-connect messages are needed.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6878
302610 hyperv/vmbus: Use post message Hypercall APIs for channel close
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6906
302611 hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6912
302612 hyperv: Nuke unused stuffs
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6913 |
307291 |
14-Oct-2016 |
sephe |
MFC 302543-302545,302547,302549,302554,302556,302557,302559,302606
302543 hyperv/vmbus: Use post message Hypercall APIs for channel request
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6831
302544 hyperv/hn: Add tunable to allow tcp_lro_queue_mbuf()
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6841
302545 hyperv/vmbus: Function renaming.
And pass vmbus_softc to vmbus_doattach()
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6842
302547 hyperv/vmbus: Explicitly assign channel message process array.
While I'm here, remove the useless message type from message process array, which is not used and serves no purposes at all.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6858
302549 hyperv/vmbus: Add sysctl to expose vmbus version.
Requested by: Hongxiong Xian <v-hoxian microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6860
302554 hyperv/vmbus: Use post message Hypercall APIs for unload
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6861
302556 hyperv/vmbus: Create channel synchronously.
The device probe/attach has been move to a different thread, so the reasons to create the channel asynchronously are no longer valid.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6862
302557 hyperv/vmbus: Save vmbus softc to channels.
So that we don't need to access the global vmbus softc.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6863
302559 hyperv/vmbus: Embed channel detach task in channel itself.
GC work queue stuffs.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6864
302606 hyperv/vmbus: Reorganize vmbus scan process.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6875 |
307278 |
14-Oct-2016 |
sephe |
MFC 302540
hyperv/vmbus: Implement a new set of APIs for post message Hypercall
And use this new APIs for Initial Contact post message Hypercall. More post message Hypercalls will be converted.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6830 |
306223 |
23-Sep-2016 |
sephe |
MFC 306015
hyperv/storvsc: Fix SRB length setting.
This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued us since 10.2-release.
Reported by: many Sponsored by: Microsoft |
304582 |
22-Aug-2016 |
sephe |
MFC 304251
hyperv/storvsc: Deliver CAM_SEL_TIMEOUT upon SRB status error.
SRB status is set to 0x20 by the hypervisor, if the specified LUN is unaccessible, and even worse the INQUIRY response will not be set by the hypervisor at all under this situation. Additionally, SRB status is 0x20 too, for TUR on an unaccessible LUN.
Deliver CAM_SEL_TIMEOUT to CAM upon SRB status errors as suggested by Scott Long, other values seems improper.
This commit fixes the Hyper-V disk hotplug support.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7521 |
303828 |
08-Aug-2016 |
sephe |
MFC 303737
hyperv/storvsc: Claim SPC-3 conformance, thus enable UNMAP support
The Hyper-V on pre-win10 systems will only report SPC-2 conformance, but it actually conforms to SPC-3. The INQUIRY response is adjusted to propagate the SPC-3 version information to CAM.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7405
Approved by: re (delphij) |
302862 |
15-Jul-2016 |
sephe |
MFC 302541,302605
302541 hyperv/stor: Fix the INQUIRY checks
Don't check the area that the host has not filled.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425 Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6955
302605 hyperv/stor: Save the response status and xfer length properly.
The current command response handling discards status and xfer length unconditionally, so that all of the commands would be considered successful, even if errors happened. When errors really happens, this causes all kinds of wiredness, since the buffer will not be filled on the host side and sense data will be ignored.
Most of the time, errors do not happen, however, error does happen for the request sent immediately after the disk resizing. Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense data (capacity changes) prevents the disk resizing from working properly.
This commit saves the response status and xfer length properly for later use.
Submitted by: Dexuan Cui <decui microsoft com> Noticed by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7181
Approved by: re (gjb) |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
301588 |
08-Jun-2016 |
sephe |
hyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6745
|
301583 |
08-Jun-2016 |
sephe |
hyperv/vmbus: Busdma-fy MNF and event flags.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6744
|
301538 |
07-Jun-2016 |
sephe |
net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by: hps, erj, tuexen Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6688
|
301488 |
06-Jun-2016 |
sephe |
hyperv/vmbus: Constify channel message
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6708
|
301487 |
06-Jun-2016 |
sephe |
hyperv/vmbus: Factor out channel message processing
This paves the way for further cleanup.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6707
|
301484 |
06-Jun-2016 |
sephe |
hyperv/vmbus: Define type for channel messages.
And fix message processing; only channel messages are supported.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6706
|
301483 |
06-Jun-2016 |
sephe |
hyperv: Move machine dependent bits into machine dependent files.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6701
|
301113 |
01-Jun-2016 |
sephe |
hyperv: Rename some cleaned up/almost cleaned up files
MFC after: 1 week Sponsored by: Microsoft OSTC
|
301109 |
01-Jun-2016 |
sephe |
hyperv/channel: Only cpu0 is supported as channel target cpu on WIN7
MFC after: 1 week Sponsored by: Microsoft OSTC
|
301106 |
01-Jun-2016 |
sephe |
hyperv/vmbus: Redefine event flags.
- Nuke unnecessary union. - Avoid convoluted macro indirection.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6671
|
301022 |
31-May-2016 |
sephe |
hyperv/kvp: Use if_xname.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6641
|
301021 |
31-May-2016 |
sephe |
hyperv: Move guid2str from vmbus file to hyperv file
- Use uint8_t for GUID byte array. - Define GUID string length. - Break long lines. - Nuke unnecessary stack variable.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6640
|
301020 |
31-May-2016 |
sephe |
hyperv/vmbus: White space cleanup
No functional changes
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6637
|
301019 |
31-May-2016 |
sephe |
hyperv/vmbus: Redefine SynIC message.
- Avoid unnecessary indirection. - Avoid bit fields. - Use __packed.
Reviewed by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6636
|
301018 |
31-May-2016 |
sephe |
hyperv/vmbus: Move global vmbus id array to stack.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6603
|
301017 |
31-May-2016 |
sephe |
hyperv/vmbus: Indentation cleanup
No functional changes.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6602
|
301015 |
31-May-2016 |
sephe |
hyperv/vmbus: Rename ISR functions
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6601
|
301009 |
31-May-2016 |
sephe |
hyperv/vmbus: Process event timer before checking events
And update comment.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6600
|
300994 |
30-May-2016 |
sephe |
hyperv/et: Allow Hyper-V event timer be disabled
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6599
|
300993 |
30-May-2016 |
sephe |
hyperv/et: Device renaming; consistent w/ other Hyper-V utils
While I'm here, prefix function names w/ vmbus, since unlike Hyper-V timecounter, Hyper-V event timer will not work w/o vmbus.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6598
|
300992 |
30-May-2016 |
sephe |
hyperv: Move timer frequency definition to common place.
And cleanup event timer period settings.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6597
|
300989 |
30-May-2016 |
sephe |
hyperv/et: Make sure only one event timer will be registered
This nullifies the need to use softc.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6591
|
300988 |
30-May-2016 |
sephe |
hyperv/vmbus: Move SINT settings to vmbus_var.h
While I'm here remove the event timer's dependency on hv_vmbus_priv.h
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6574
|
300987 |
30-May-2016 |
sephe |
hyperv/et: Fix STIMER0 operations.
- Make sure that STIMER0 is disabled before writting to it, since writing to an enabled STIMER will result in undefined behaviour. - It is unnecessary to reconfigure STIMER0 upon each et_start(). - Make sure that MSR_HV_REF_TIME_COUNT will not return 0, since writing 0 to STIMER_COUNT will disable the target STIMER.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6573
|
300834 |
27-May-2016 |
sephe |
hyperv: Test features before enabling optional functionalities
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6571
|
300832 |
27-May-2016 |
sephe |
hyperv: Clean up Hyper-V timecounter a bit.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6569
|
300831 |
27-May-2016 |
sephe |
hyperv: GC unneeded bits
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6568
|
300830 |
27-May-2016 |
sephe |
hyperv/vmbus: Move MSR EOM to hyperv_reg.h
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6567
|
300827 |
27-May-2016 |
sephe |
hyperv: Move timer related MSRs into hyperv_reg.h
And avoid bit fields for event timer.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6566
|
300825 |
27-May-2016 |
sephe |
hyperv: Move CPUID related bits to hyperv_reg.h and give them clean name
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6565
|
300708 |
26-May-2016 |
sephe |
hyperv: Rework guest id settings according to Hyper-V spec
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6553
|
300655 |
25-May-2016 |
sephe |
hyperv: Preserve required bits when disable Hypercall
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6530
|
300654 |
25-May-2016 |
sephe |
hyperv/vmbus: Rework SynIC setup and teardown
- Avoid bit fields. - Fix SINT setup (preserve required bits).
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6529
|
300653 |
25-May-2016 |
sephe |
hyperv/vmbus: Nuke unnecessary MSR read
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6528
|
300652 |
25-May-2016 |
sephe |
hyperv/vmbus: Pass vmbus softc to vmbus_synic_setup
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6527
|
300651 |
25-May-2016 |
sephe |
hyperv/vmbus: Minor style and white space cleanup
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6523
|
300650 |
25-May-2016 |
sephe |
hyperv/vmbus: Move two global flags into vmbus softc
And pack them into one flag field.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6522
|
300647 |
25-May-2016 |
sephe |
hyperv/vmbus: Move vcpuid into vmbus softc per-cpu data
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6521
|
300646 |
25-May-2016 |
sephe |
hyperv/vmbus: Move event/message taskqueue/task to vmbus softc
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6520
|
300645 |
25-May-2016 |
sephe |
hyperv/vmbus: Allocate/setup IDT vector after all ISR resources are ready
And release IDT vector before releasing ISR resources on interrupt teardown path. We still have some work to do on the interrupt tearing down path.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6519
|
300644 |
25-May-2016 |
sephe |
hyperv/vmbus: Check hyperv_dmamem_alloc return value
Though it is highly unlikely this function would fail w/ BUS_DMA_WAITOK, we had better to check its return value; better safe then sorry here.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6518
|
300576 |
24-May-2016 |
sephe |
hyperv/vmbus: Free message taskqueue during interrupt teardown
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6506
|
300574 |
24-May-2016 |
sephe |
hyperv/vmbus: Factor out functions for vmbus interrupt set/teardown
This paves way for further cleanup and fix.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6505
|
300573 |
24-May-2016 |
sephe |
hyperv/vmbus: Git rid of sc version of pcpu data extraction macro
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6503
|
300572 |
24-May-2016 |
sephe |
hyperv/vmbus: Use busdma(9) for messages and event flags
And - Move message and event flags to vmbus_softc per-cpu data. - Get rid of hv_setup_arg, which serves no purpose now.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6502
|
300571 |
24-May-2016 |
sephe |
hyperv/vmbus: Move SynIC setup/teardown from hyperv file to vmbus file
Avoid unnecessary exposure.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6501
|
300570 |
24-May-2016 |
sephe |
hyperv/vmbus: Rename local variable and break long lines
No functional changes.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6500
|
300568 |
24-May-2016 |
sephe |
hyperv/busdma: Take BUS_DMA_ZERO into account
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6499
|
300567 |
24-May-2016 |
sephe |
hyperv/vmbus: Pass vmbus_softc and curcpu to hv_vmbus_isr()
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6498
|
300565 |
24-May-2016 |
sephe |
hyperv/vmbus: Move vmbus interrupt counter into vmbus softc
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6497
|
300487 |
23-May-2016 |
sephe |
hyperv/vmbus: Move IDT vector to vmbus_softc
Prepare to get rid of the hv_setup_arg.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6449
|
300486 |
23-May-2016 |
sephe |
hyperv/vmbus: Get rid of vmbus_devp
While I'm here, nuke useless print in vmbus_attach().
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6447
|
300481 |
23-May-2016 |
sephe |
hyperv/vmbus: Declare Synic message and event w/ proper types
Avoid ugly casts.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6446
|
300480 |
23-May-2016 |
sephe |
hyperv: Move Hypercall setup to an early place.
It does not belong to the vmbus.
While I'm here rework the Hypercall setup, e.g. use busdma(9) and avoid bit fields.
Discussed with: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6445
|
300479 |
23-May-2016 |
sephe |
hyperv/hn: Use hyperv busdma(9) helper.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6444
|
300478 |
23-May-2016 |
sephe |
hyperv: Add helpers for busdma(9) operation
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6443
|
300455 |
23-May-2016 |
sephe |
hyperv: Move guest id setup to early place
And - Rework the guest id composition. - Nuke useless saved guest_id.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6430
|
300129 |
18-May-2016 |
sephe |
hyperv/vmbus: Use consistent device description as other devices
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6418
|
300127 |
18-May-2016 |
sephe |
hyperv/vmbus: Minor function definition style fixup
Reviewed by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6417
|
300126 |
18-May-2016 |
sephe |
hyperv/vmbus: Fix SYSINIT function prototype and usage.
Reviewed by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6416
|
300124 |
18-May-2016 |
sephe |
hyperv/vmbus: Reindent and cleanup devmethods.
While I'm here, use DEVMETHOD_END.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6415
|
300123 |
18-May-2016 |
sephe |
hyperv/vmbus: Staticize vmbus_devclass
Reviewed by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6414
|
300122 |
18-May-2016 |
sephe |
hyperv: Set vm_guest to VM_GUEST_VM, if hypervisor is not Hyper-V
Reviewed by: kib MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6412
|
300121 |
18-May-2016 |
sephe |
hyperv/vmbus: Nuke unnecessary function indirection
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6411
|
300120 |
18-May-2016 |
sephe |
hyperv/vmbus: Remove useless modevent handler
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6410
|
300112 |
18-May-2016 |
sephe |
hyperv/vmbus: Function renaming vmbus_msg_swintr -> vmbus_msg_task
It is not an SWI handler for a long time.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6409
|
300111 |
18-May-2016 |
sephe |
hyperv/vmbus: Utilize curcpu
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6408
|
300108 |
18-May-2016 |
sephe |
hyperv/vmbus: Minor white space and style cleanup
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6407
|
300107 |
18-May-2016 |
sephe |
hyperv/vmbus: Avoid two unnecessary protocol checks on isr handling path
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6405
|
300105 |
18-May-2016 |
sephe |
hyperv/vmbus: Use atomic swap and flsl to process event flags
Greatly reduce the locked instructions and reduce number of inner loops.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6404
|
300102 |
18-May-2016 |
sephe |
hyperv/vmbus: Reduce the # of event loops by recording event flag count
Use vmbus softc to save vmbus per-cpu data. More stuffs will be moved into vmbus softc.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6403
|
300101 |
18-May-2016 |
sephe |
hyperv/vmbus: Use unsigned long for event bits.
And move base channel id calculation out of inner loop. This prepares for more event processing optimization.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6384
|
300050 |
17-May-2016 |
eadler |
Don't repeat the the word 'the'
(one manual change to fix grammar)
Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
|
299927 |
16-May-2016 |
sephe |
hyperv/vmbus: Use atomic_testandclear
Prepare to use unsigned long for event channel bit array.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6382
|
299892 |
16-May-2016 |
sephe |
hyperv/vmbus: Fix event processing loop indentation.
No functional changes.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6334
|
299890 |
16-May-2016 |
sephe |
hyperv/vmbus: Simplify event processing
For channel0, it will never be processed on event handling path, so there is no need to install it. After skipping in the channel0 installation, we could discard the channel0 check on event handling hot code path.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6333
|
299889 |
16-May-2016 |
sephe |
hyperv/vmbus: Simplify event processing
While I'm here, remove useless comment and unnecessary return.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6332
|
299888 |
16-May-2016 |
sephe |
hyperv/hn: Combine per-packet-information parsing.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
299746 |
14-May-2016 |
jhb |
Add an EARLY_AP_STARTUP option to start APs earlier during boot.
Currently, Application Processors (non-boot CPUs) are started by MD code at SI_SUB_CPU, but they are kept waiting in a "pen" until SI_SUB_SMP at which point they are released to run kernel threads. SI_SUB_SMP is one of the last SYSINIT levels, so APs don't enter the scheduler and start running threads until fairly late in the boot.
This change moves SI_SUB_SMP up to just before software interrupt threads are created allowing the APs to start executing kernel threads much sooner (before any devices are probed). This allows several initialization routines that need to perform initialization on all CPUs to now perform that initialization in one step rather than having to defer the AP initialization to a second SYSINIT run at SI_SUB_SMP. It also permits all CPUs to be available for handling interrupts before any devices are probed.
This last feature fixes a problem on with interrupt vector exhaustion. Specifically, in the old model all device interrupts were routed onto the boot CPU during boot. Later after the APs were released at SI_SUB_SMP, interrupts were redistributed across all CPUs.
However, several drivers for multiqueue hardware allocate N interrupts per CPU in the system. In a system with many CPUs, just a few drivers doing this could exhaust the available pool of interrupt vectors on the boot CPU as each driver was allocating N * mp_ncpu vectors on the boot CPU. Now, drivers will allocate interrupts on their desired CPUs during boot meaning that only N interrupts are allocated from the boot CPU instead of N * mp_ncpu.
Some other bits of code can also be simplified as smp_started is now true much earlier and will now always be true for these bits of code. This removes the need to treat the single-CPU boot environment as a special case.
As a transition aid, the new behavior is available under a new kernel option (EARLY_AP_STARTUP). This will allow the option to be turned off if need be during initial testing. I plan to enable this on x86 by default in a followup commit in the next few days and to have all platforms moved over before 11.0. Once the transition is complete, the option will be removed along with the !EARLY_AP_STARTUP code.
These changes have only been tested on x86. Other platform maintainers are encouraged to port their architectures over as well. The main things to check for are any uses of smp_started in MD code that can be simplified and SI_SUB_SMP SYSINITs in MD code that can be removed in the EARLY_AP_STARTUP case (e.g. the interrupt shuffling).
PR: kern/199321 Reviewed by: markj, gnn, kib Sponsored by: Netflix
|
299505 |
12-May-2016 |
sephe |
hyperv/stor: Enable INQUIRY result check only on WIN10 like host systems
On WIN8 like host systems, when rescan happens, the already installed disks seem to return random invalid results for INQUIRY.
More investigation is under way to figure out why random invalid INQUIRY results are delivered to VM on WIN8 like host systems.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6316
|
299401 |
11-May-2016 |
sephe |
hyperv/hn: Extract RSS hash value and type.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6287
|
298955 |
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
298694 |
27-Apr-2016 |
sephe |
hyperv/hn: Add stat for # of chimney sending tries
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298693 |
27-Apr-2016 |
sephe |
hyperv/vmbus: Mark sysctls MPSAFE
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298690 |
27-Apr-2016 |
sephe |
hyperv/hn: Mark sysctls MPSAFE
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298689 |
27-Apr-2016 |
sephe |
hyperv/hn: Remove unapplied comment.
Chimney sending buffers are shared across channels.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298688 |
27-Apr-2016 |
sephe |
hyperv/hn: Restart sending earlier once we gathered some free TX descs
This greatly reduces the oqdrops under heavy workload.
For TCP send/recv test (10K concurrent connections): oqdrops is reduced by 17% on sending side, and 57% on receiving side.
For nginx-1.8/wrk-4 1KB object test (10K concurrent connections, 4 requests/connection): oqdrops is reduced by 44% on nginx side, and 10% on wrk side.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298620 |
26-Apr-2016 |
sephe |
hyperv/hn: Change description to "Hyper-V Network Interface"
This is consistent w/ other Hyper-V devices.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298618 |
26-Apr-2016 |
sephe |
hyperv/stor: Set description properly in probe devmethod
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298617 |
26-Apr-2016 |
sephe |
hyperv/channel: Git rid of the sub-channel creation callback
It is no longer used.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298616 |
26-Apr-2016 |
sephe |
hyperv/stor: Avoid sub-channel creation callback.
Since the sub-channel offers are synchronized, we can do our own channel setup without using the sub-channel creation callback.
This paves the way to whack the sub-channel creation callback.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298615 |
26-Apr-2016 |
sephe |
hyperv/hn: Avoid sub-channel creation callback.
Since the sub-channel offers are synchronized, we can do our own channel setup without using the sub-channel creation callback.
This paves the way to whack the sub-channel creation callback.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298614 |
26-Apr-2016 |
sephe |
hyperv/stor: Synchronize sub-channel offers
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298613 |
26-Apr-2016 |
sephe |
hyperv/stor: Remove the useless hs_open_multi_channel
This fixes the sub-channel offer race after Hyper-V device probe/attach is moved to vmbus SYSINIT/attach.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298575 |
25-Apr-2016 |
sephe |
hyperv/hn: Synchronize sub-channel offers
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298574 |
25-Apr-2016 |
sephe |
hyperv/channel: Add functions to synchronize sub-channel offers
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298572 |
25-Apr-2016 |
sephe |
hyperv/channel: Log a warning about duplicated primary channel offer
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298571 |
25-Apr-2016 |
sephe |
hyperv/channel: Remove unapplied comment
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298570 |
25-Apr-2016 |
sephe |
hyperv/channel: Minor style changes; no functional changes.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298569 |
25-Apr-2016 |
sephe |
hyperv/channel: Remove the unnecessary 'new' flag
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298568 |
25-Apr-2016 |
sephe |
hyperv/et: Strip extra white space in function name
Reported by: Sascha Wildner <saw online de> MFC after: 1 week Sponsored by: Microsoft OSTC
|
298563 |
25-Apr-2016 |
sephe |
hyperv/hn: Allow users to configure ifq or bufring depth.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298561 |
25-Apr-2016 |
sephe |
hn: Increase odrops for if_transmit method if drbr_enqueue fails.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298449 |
22-Apr-2016 |
sephe |
hyperv/et: Make Hyper-V event timer a device.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5957
|
298446 |
22-Apr-2016 |
sephe |
hyperv: Update copyright to 2016 for the files Microsoft changed in 2016
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6039
|
298260 |
19-Apr-2016 |
sephe |
hyperv/vmbus: Make device probe/attach synchronous w/ vmbus attach/SYSINIT
Discussed with: Jun Su <junsu microsoft com>, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
298259 |
19-Apr-2016 |
sephe |
hyperv: Remove two assign-only local variables
Submitted by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
298096 |
16-Apr-2016 |
gjb |
Prune bogus svn:mergeinfo from directores on which it should not ever be present.
Sponsored by: The FreeBSD Foundation
|
298042 |
15-Apr-2016 |
sephe |
hyperv/hn: Hide ring to channel linkage message under bootverbose
Suggested by: Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
298041 |
15-Apr-2016 |
sephe |
hyperv: No need to zero out softc
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298040 |
15-Apr-2016 |
sephe |
hyperv/stor: Use xpt_done_direct() upon I/O completion
Reviewed by: mav MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5955
|
298039 |
15-Apr-2016 |
sephe |
hyperv/vmbus: Put multi-channel offer logging under bootverbose
Suggested by: Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
298038 |
15-Apr-2016 |
sephe |
hyperv/stor: Temporary disable the wrongly done command timeout.
It will be reenabled once the request processing is corrected.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
298022 |
15-Apr-2016 |
sephe |
hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus
Submitted by: Jun Su <junsu microsoft com> Reviewed by: jhb, kib, sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5910
|
297913 |
13-Apr-2016 |
sephe |
hyperv: device_get_softc does not return NULL
MFC after: 1 week Sponsored by: Microsoft OSTC
|
297908 |
13-Apr-2016 |
sephe |
hyperv/vmbus: Merge duplicated version check for events
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5911
|
297841 |
12-Apr-2016 |
sephe |
hyperv: Replace 0 w/ NULL
Submitted by: pfg MFC after: 1 week Sponsored by: Microsoft OSTC
|
297815 |
11-Apr-2016 |
sephe |
hyperv: Typo
Noticed by: kib MFC after: 1 week Sponsored by: Microsoft OSTC
|
297811 |
11-Apr-2016 |
sephe |
hyperv/hn: Remove unnecessary NULL checks
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5905
|
297810 |
11-Apr-2016 |
sephe |
hyperv/hn: By default enable multiple TX/RX rings, aka vRSS.
Reviewed by: Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5880
|
297809 |
11-Apr-2016 |
sephe |
hyperv/hn: Cap default # of rings to 8.
8 gives the best performance in both Azure and local Hyper-V on both 10Ge and 40Ge. More rings are still allowed by manual configuration.
Reviewed by: Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5879
|
297808 |
11-Apr-2016 |
sephe |
hyperv: Define macro for Hyper-V interface
Suggested by: rpokala MFC after: 1 week Sponsored by: Microsoft OSTC
|
297807 |
11-Apr-2016 |
sephe |
hyperv: Print more features
And add comment about the MSR features.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
297805 |
11-Apr-2016 |
sephe |
hyperv: Break long line
MFC after: 1 week Sponsored by: Microsoft OSTC
|
297804 |
11-Apr-2016 |
sephe |
hyperv: Declare hyperv_{features,recommends} properly
MFC after: 1 week Sponsored by: Microsoft OSTC
|
297803 |
11-Apr-2016 |
sephe |
hyperv: Resurrect r297481
This time we make sure that the TIME_REF_COUNT MSR exists.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
297802 |
11-Apr-2016 |
sephe |
hyperv: Identify Hyper-V features and recommends properly
Features bits will be used to detect devices, e.g. timers, which do not have corresponding event channels.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> Rearranged by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC
|
297801 |
11-Apr-2016 |
sephe |
hyperv/vmbus: Get rid of max_leaf detection; this is actually not used.
It will be replaced by a new one.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
297800 |
11-Apr-2016 |
sephe |
hyperv/vmbus: Nuke unused function
MFC after: 1 week Sponsored by: Microsoft OSTC
|
297793 |
10-Apr-2016 |
pfg |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
297699 |
08-Apr-2016 |
sephe |
hyperv: Revert r297481
Use vm_guest == VM_GUEST_HV is not enough to determine whether FreeBSD is running on Hyper-V or not. What a mess.
Reported by: smokehydration tutanota com Sponsored by: Microsoft OSTC
|
297641 |
07-Apr-2016 |
sephe |
hyperv: Use lapic_{alloc,free}_ipi to allocate private interrupt vector
Suggested by: jhb Reviewed by: Dexuan Cui <decui microsoft com>, Jun Su <junsu microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5850
|
297636 |
07-Apr-2016 |
sephe |
hyperv: Typo in r297634
Noticed by: hiren MFC after: 1 week Sponsored by: Microsoft OSTC
|
297635 |
07-Apr-2016 |
sephe |
hyperv/vmbus: Use default mtx for channel message queue
First of all sema_post() can't be called w/ spinlock, and the channel message queue processing is not on hot code path, i.e. spinlock is not necessary.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5812
|
297634 |
07-Apr-2016 |
sephe |
hyperv: Use mb() instead of atomic_thread_fence_seq_cst()
Since atomic_thread_fence_seq_cst() will become compiler fence on UP kernel.
Reviewed by: kib, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5852
|
297482 |
01-Apr-2016 |
sephe |
tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication
And factor out tcp_lro_rx_done, which deduplicates the same logic with netinet/tcp_lro.c
Reviewed by: gallatin (1st version), hps, zbb, np, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5725
|
297481 |
01-Apr-2016 |
sephe |
hyperv: Register Hyper-V timer early enough for TSC freq calibration
The i8254 simulation in Hyper-V is kinda broken and is not available in Generation 2 Hyper-V VMs, so Hyper-V timer must be registered early enough so that it can be used to do the TSC freq calibration.
This fixes the notorious warning like this: calcru: runtime went backwards from 50 usec to 25 usec for pid 0 (kernel)
Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: kib, sephe Tested by: kib, sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5778
|
297221 |
24-Mar-2016 |
sephe |
hyperv/vmbus: Create per-cpu fast taskqueue for msg handling
Using one taskqueue does not work, since the EOM MSR must be written on the msg's owner CPU.
Noticed by: Jun Su <junsu microsoft com> Discussed with: Jun Su <junsu microsoft com>, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
297220 |
24-Mar-2016 |
sephe |
hyperv/utils: Allow hint to disable individual utility
Reviewed by: kib, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5714
|
297219 |
24-Mar-2016 |
sephe |
hyperv/vmbus: use a better retry method in hv_vmbus_post_message()
Most often, hv_vmbus_post_message() doesn't fail. However, it fails intermittently when GPADLs of large shared memory is to be established with the host, e.g. on the hn(4) attach path: a GPADL of 15MB sendbuf is created, for which lots of messages will be flooded to the host. The host side tries to throttle the message rate by returning HV_STATUS_INSUFFICIENT_BUFFERS.
Before this commit, we do several retries for failed messages, but the delay between each retry is pretty/too low, which will cause sporadic message posting failure. We now use large delay (>=1ms) between each retry to fix the message posting failure.
Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5715
|
297182 |
22-Mar-2016 |
sephe |
hyperv/hn: When short of mbufs on the RX path, don't spam the console.
Instead, increase the IQDROPS counter.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5693
|
297181 |
22-Mar-2016 |
sephe |
hyperv/hn: Factor out hn_set_lro_lenlim()
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5692
|
297180 |
22-Mar-2016 |
sephe |
hyperv/hn: Reduce TCP segment aggregation limit for multiple RX rings
This mainly used to improve ACK timeliness when multiple RX rings are enabled.
This value gives the best performance in both Azure and Hyper-V environment, w/ both 10Ge and 40Ge using non-{INVARIANTS,WITNESS} kernel.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5691
|
297178 |
22-Mar-2016 |
sephe |
hyperv/vmbus: Remove NULL check for taskqueue_create_fast(M_WAITOK)
Submitted by: Jun Su <junsu microsoft com> Reviewed by: Dexuan Cui <decui microsoft com>, sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5215
|
297177 |
22-Mar-2016 |
sephe |
hyperv/vmbus: Use taskqueue_fast for non-performance critical messages
This gets rid of the per-cpu SWIs.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: Dexuan Cui <decui microsoft com>, sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5215
|
297176 |
22-Mar-2016 |
sephe |
hyperv/evttimer: Use an independent message slot so that it can work
Using the same message slot as the other types of the messages has the side effect that the event timer message could be deferred to the swi threads to run (lacking of trapframe and the original code didn't even handle that, so the event timer was actually broken).
As of this commit we use an independent message slot for event timer, so that we could handle all of event timer messages in the interrupt handler directly. Note, the message slot for event timer is still bind to the same interrupt vector as the other types of messages.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe Discussed with: Jun Su <junsu microsoft com>, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5696
|
297143 |
21-Mar-2016 |
sephe |
hyperv/vmbus: Implement bus_child_pnpinfo_str method
Submitted by: Jun Su <junsu microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5669
|
297142 |
21-Mar-2016 |
sephe |
hyperv: Factor out snprinf_hv_guid()
Submitted by: Ju Sun <junsu microsoft com> Reviewed by: Dexuan Cui <decui microsoft com>, sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5651
|
296595 |
10-Mar-2016 |
sephe |
hyperv/hn: Make the # of TX rings configurable.
Rename the tunables to avoid confusion.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5578
|
296594 |
10-Mar-2016 |
sephe |
hyperv/hn: Factor out hn_channel_attach
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5577
|
296593 |
10-Mar-2016 |
sephe |
hyperv/hn: Move if_initname to an earlier place
So that functions shared w/ attach path could use if_printf().
While I'm here, remove unnecessary if_dunit and if_dname assignment.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5576
|
296417 |
05-Mar-2016 |
dim |
Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0 release.
Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information.
Release notes for llvm and clang will soon be available here: <http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>
Thanks to Ed Maste, Roman Divacky, Davide Italiano and Antoine Brodin for their help.
Relnotes: yes
|
296381 |
04-Mar-2016 |
sephe |
hyperv/hn: Add per-TX ring stats for # of transmitted packets
MFC after: 2 weeks Sponsored by: Microsoft OSTC
|
296380 |
04-Mar-2016 |
sephe |
hyperv/hn: Pass channel to send done callbacks.
Mainly to strigent the data packet send done check.
MFC after: 2 weeks Sponsored by: Microsoft OSTC
|
296379 |
04-Mar-2016 |
sephe |
hyperv/hn: Add multiple channel support, a.k.a. vRSS
Each channel contains one RX ring and one TX ring. And we try to distribute the channels to different evenly.
Note: Currently we don't have enough information to extract the RSS type and RSS hash value from the received packets.
This greatly improves the TX/RX performance for 8 virtual CPU Hyper-V over 10Ge: it can max out 10Ge for TCP when multiple RX/TX rings are enabled.
This almost doubles the TX/RX performance for locally connected Hyper-Vs: was 6Gbps w/ 128 TCP streams, now 11Gbps w/ multiple RX/TX rings enabled.
It is not enabled by default; it will be switched on after more tests.
Collaborated with: Hongjiang Zhang <honzhan microsoft com> MFC after: 2 week Sponsored by: Microsoft OSTC
|
296305 |
02-Mar-2016 |
sephe |
hyperv/hn: Make # of rings configurable
And since the host may not being able to allocate the # of rings requested by us, save the # of rings allocated by the host in the ring_inuse counters; use ring_inuse counters for run time operation.
This paves the way for the upcoming vRSS support.
MFC after: 1 week Sponsored by: Microsoft OSTC
|
296297 |
02-Mar-2016 |
sephe |
hyperv/hn: Fix typo in comment
MFC after: 1 week Sponsored by: Microsoft OSTC
|
296296 |
02-Mar-2016 |
sephe |
hyperv/hn: Make read buffer per-channel
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reorganized by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC
|
296293 |
02-Mar-2016 |
sephe |
hyperv/hn: Pass channel to hv_nv_on_receive_completion()
While I'm here, staticize this function.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Modified by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC
|
296291 |
02-Mar-2016 |
sephe |
hyperv/chan: Factor out the vcpu setting
And use it for cpu0 assignment; it does not sound right to assume that cpu0 maps to vcpu0. And this factored out function will be exposed to drivers, if driver specific CPU binding is needed, e.g. hn(4).
Move default cpu select after saving channel offer message. This makes sure that all useful information of the channel has been setup.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5504
|
296290 |
02-Mar-2016 |
sephe |
hyperv/chan: Function renaming; no functional change
The renamed function create a sysctl tree for channel, and many non-statistics nodes exists, so don't claim it only adds sysctl nodes for statistics.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5503
|
296289 |
02-Mar-2016 |
sephe |
hyperv/chan: Add sysctl node to check whether monitor is allocated or not
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5502
|
296272 |
01-Mar-2016 |
jhb |
Remove taskqueue_enqueue_fast().
taskqueue_enqueue() was changed to support both fast and non-fast taskqueues 10 years ago in r154167. It has been a compat shim ever since. It's time for the compat shim to go.
Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: sephe Differential Revision: https://reviews.freebsd.org/D5131
|
296253 |
01-Mar-2016 |
sephe |
hyperv/channel: Nuke useless stack variable
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5499
|
296252 |
01-Mar-2016 |
sephe |
hyperv/hn: Set hash per-packet-info for each packet transmission
So that the host could dispatch the TX done back to this TX ring's owner channel
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5498
|
296188 |
29-Feb-2016 |
sephe |
hyperv/channel: Add sysctl node for channel owner cpu
And add sysctl node for sub-channel's channel id.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5489
|
296187 |
29-Feb-2016 |
sephe |
hyperv/hn: Utilize mbuf flowid
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5488
|
296185 |
29-Feb-2016 |
sephe |
hyperv/hn: Put LRO aggregation limit settings under FreeBSD version check
This simplifies MFC to 10-stable
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5487
|
296184 |
29-Feb-2016 |
sephe |
hyperv/hn: Switch to if_transmit by default after r296178
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5485
|
296181 |
29-Feb-2016 |
sephe |
hyperv/channel: Add debug sysctl nodes for channel indices
It would serve as a debug tool, if the shared buffer ring's indices stopped updating.
Submitted by: HongJiang Zhang <honzhan microsoft com> Reviewed by: sephe, Jun Su <junsu microsoft com> Modified by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5402
|
296180 |
29-Feb-2016 |
sephe |
hyperv: Use proper fence function to keep store-load order for msgs
sfence only makes sure about the store-store order, which is not sufficient here. Use atomic_thread_fence_seq_cst() as suggested jhb and kib (a locked op in the nutshell, which should have the
Reviewed by: jhb, kib, Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5436
|
296089 |
26-Feb-2016 |
sephe |
hyperv/hn: Make transmission path channel aware
Chimney sending buffer still needs conversion, which will be done along with the upcoming vRSS support.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5457
|
296088 |
26-Feb-2016 |
sephe |
hyperv/hn: Remove the useless num_outstanding_sends
We rely on taskqueue draining now.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5456
|
296087 |
26-Feb-2016 |
sephe |
hyperv/hn: Associate TX/RX ring with channel
This fixes the TX/RX ring selection for TX/RX done.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5454
|
296086 |
26-Feb-2016 |
sephe |
hyperv/hn: Pass channel to TX/RX done
This is preamble to associate the TX/RX rings to their channel.
While I'm here, revoke unused netvsc_recv_rollup.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5453
|
296085 |
26-Feb-2016 |
sephe |
hyperv/hn: Pass channel as the channel callback argument
This is the preamble to pass channel back to hn(4) upon TX/RX done.
Reviewed by: Hongjiang Zhang <honzhan microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5452
|
296084 |
26-Feb-2016 |
sephe |
hyperv: Always set device for channels
And unregister hv_device only for primary channels, who own the hv_device.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5451
|
296083 |
26-Feb-2016 |
sephe |
hyperv: Remove useless channel inbound_lock
It serves no purpose.
Reviewed by: Hongjiang Zhang <honzhan microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5450
|
296076 |
26-Feb-2016 |
sephe |
hyperv: Use atomic_fetchadd_int to get GPADL id.
Reviewed by: Hongjiang Zhang <honzhan microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5439
|
296028 |
25-Feb-2016 |
sephe |
hyperv: Wait 5 seconds for hyperv result, instead of 500ms
This addresses various devices (network, stoarge) attach failure.
Reported by: Hongxiong Xian <v-hoxian microsoft com> Tested by: Hongxiong Xian <v-hoxian microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5435
|
296024 |
25-Feb-2016 |
sephe |
hyperv/hn: Hold the TX ring lock then drain TX desc buf_ring
Reported by: Hongxiong Xian <v-hoxian microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
|
296022 |
25-Feb-2016 |
sephe |
hyperv/hn: Implement ifnet.if_transmit method
It will be turned on by default later.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5415
|
295964 |
24-Feb-2016 |
sephe |
hyperv/vmbus: Use free(9) for interrupt page; it is allocated by malloc(9)
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5417
|
295958 |
24-Feb-2016 |
sephe |
hyperv/utils: Code rearrange and cleanup
Split heartbeat, shutdown and timesync out of utils code and name them properly.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, sephe, Hongjiang Zhang <honzhan microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5216
|
295919 |
23-Feb-2016 |
sephe |
hyperv/stor: Fix print format
Detected by: PVS Static Analysis MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5388
|
295918 |
23-Feb-2016 |
sephe |
hyperv/hn: Use IFQ_DRV_PREPEND instead of IF_PREPEND
IF_PREPEND promises out-of-order packet sending when the TX desc list is depleted. It was overlooked and copied blindly when the transmission path was partially rewritten.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5386
|
295916 |
23-Feb-2016 |
sephe |
hyperv/hn: Factor out hn_send_pkt() from hn_start_locked()
It will be shared w/ the upcoming ifnet.if_transmit method implementation.
No functional change.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5385
|
295882 |
22-Feb-2016 |
skra |
As <machine/vmparam.h> is included from <vm/vm_param.h>, there is no need to include it explicitly when <vm/vm_param.h> is already included.
Suggested by: alc Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D5379
|
295877 |
22-Feb-2016 |
sephe |
hyperv/hn: Add TX method for txeof processing.
Preamble to implement ifnet.if_transmit method.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5346
|
295876 |
22-Feb-2016 |
sephe |
hyperv/hn: Staticize and rename packet TX done function
It is only used in hv_netvsc_drv_freebsd.c; and rename it to hn_tx_done() mainly to reserve "xmit" for ifnet.if_transmit implement.
While I'm here, remove unapplied comment.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5345
|
295875 |
22-Feb-2016 |
sephe |
hyperv/hn: Rename TX related function and struct fields a bit
Preamble to implement the ifnet.if_transmit method.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5344
|
295794 |
19-Feb-2016 |
sephe |
hyperv/hn: Free the txdesc buf_ring when the TX ring is destroyed
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5318
|
295793 |
19-Feb-2016 |
sephe |
hyperv/hn: Enable IP header checksum offloading for WIN8 (WinServ2012)
Tested on Windows Server 2012.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5317
|
295792 |
19-Feb-2016 |
sephe |
hyperv/hn: Add option to bind TX taskqueues to the specified CPU
It will be used to help tracking host side transmission ring selection issue; and it will be turned on by default, once we have concrete result.
Reviewed by: adrian, Jun Su <junsu microsoft com> Approved by: adrian (mento) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5316
|
295748 |
18-Feb-2016 |
sephe |
hyperv/hn: Use buf_ring for txdesc list
So one spinlock is avoided, which would be potentially dangerous for virtual machine, if the spinlock holder was scheduled out by the host, as noted by royger.
Old spinlock based txdesc list is still kept around, so we could have a safe fallback.
No performance regression nor improvement is observed.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5290
|
295747 |
18-Feb-2016 |
sephe |
hyperv/hn: Split TX ring data structure out of softc
This paves the way for upcoming vRSS stuffs and eases more code cleanup.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5283
|
295746 |
18-Feb-2016 |
sephe |
hyperv/hn: Use non-fast taskqueue for transmission
Performance stays same; so no need to use fast taskqueue here.
Suggested by: royger Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5282
|
295745 |
18-Feb-2016 |
sephe |
hyperv/hn: Use taskqueue_enqueue()
This also eases experiment on the non-fast taskqueue.
Reviewed by: adrian, Jun Su <junsu microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5276
|
295744 |
18-Feb-2016 |
sephe |
hyperv/hn: Split RX ring data structure out of softc
This paves the way for upcoming vRSS stuffs and eases more code cleanup.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5275
|
295743 |
18-Feb-2016 |
sephe |
hyperv/hn: Change global tunable prefix to hw.hn
And use SYSCTL+CTLFLAG_RDTUN for them.
Suggested by: adrian Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5274
|
295742 |
18-Feb-2016 |
sephe |
hyperv/hn: Always do transmission scheduling.
This one gives the best performance so far.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5273
|
295741 |
18-Feb-2016 |
sephe |
hyperv/hn: Add option to allow sharing TX taskq between hn instances
It is off by default. This eases further experimenting on this driver.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5272
|
295740 |
18-Feb-2016 |
sephe |
hyperv/hn: Set the TCP ACK/data segment aggregation limit
Set TCP ACK append limit to 1, i.e. aggregate 2 ACKs at most. Aggregating anything more than 2 hurts TCP sending performance in hyperv. This significantly improves the TCP sending performance when the number of concurrent connetion is low (2~8). And it greatly stabilizes the TCP sending performance in other cases.
Set TCP data segments aggregation length limit to 37500. Without this limitation, hn(4) could aggregate ~45 TCP data segments for each connection (even at 64 or more connections) before dispatching them to socket code; large aggregation slows down ACK sending and eventually hurts/destabilizes TCP reception performance. This setting stabilizes and improves TCP reception performance for >4 concurrent connections significantly.
Make them sysctls so they could be adjusted.
Reviewed by: adrian, gallatin (previous version), hselasky (previous version) Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5185
|
295606 |
14-Feb-2016 |
sephe |
hyperv/hn: Fix typo in comment
Noticed by: avos Reviewed by: adrian, avos, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5199
|
295309 |
05-Feb-2016 |
sephe |
hyperv: Use malloc for page allocation.
We will eventually convert them to use busdma.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, sephe, Dexuan Cui <decui microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5087
|
295308 |
05-Feb-2016 |
sephe |
hyperv: Use WAITOK in the places where we can wait
And convert rndis non-hot path spinlock to mutex.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, sephe Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5081
|
295307 |
05-Feb-2016 |
sephe |
hyperv: Use standard taskqueue instead of hv_work_queue
HyperV code was ported from Linux. There is an implementation of work queue called hv_work_queue. In FreeBSD, taskqueue could be used for the same purpose. Convert all the consumer of hv_work_queue to use taskqueue, and remove work queue implementation.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4963
|
295306 |
05-Feb-2016 |
sephe |
hyperv/hn: Add an option to always do transmission scheduling
It is off by default. This eases more experiment on hn(4).
Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5175
|
295305 |
05-Feb-2016 |
sephe |
hyperv/hn: Move LRO flush to the channel processing rollup
This significantly increases LRO aggregation ratio when there are large amount of connections (improves reception performance a lot).
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5167
|
295304 |
05-Feb-2016 |
sephe |
hyperv/hn: Increase LRO entry count to 128 by default
hn(4) only has one RX ring currently, so default 8 LRO entries are too small.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5166
|
295303 |
05-Feb-2016 |
sephe |
hyperv/hn: Recover half of the chimney sending space
We lost half of the chimney sending space, because we mis-used ffs() on a 64 bits mask, where ffsl() should be used.
While I'm here: - Use system atomic operation instead. - Stringent chimney sending index assertion.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5159
|
295302 |
05-Feb-2016 |
sephe |
hyperv/hn: Factor out hn_encap() from hn_start_locked()
It will be shared w/ upcoming ifnet.if_transmit implementaion.
No functional changes.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5158
|
295301 |
05-Feb-2016 |
sephe |
hyperv/hn: Obey IFCAP_RXCSUM configure
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5104
|
295300 |
05-Feb-2016 |
sephe |
hyperv/hn: Add sysctls to trust host side UDP and IP csum verification
Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5103
|
295299 |
05-Feb-2016 |
sephe |
hyperv/hn: Enable UDP RXCSUM
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5102
|
295298 |
05-Feb-2016 |
sephe |
hyperv/hn: Enable IP header checksum offloading
So that: - TCP/IP stack will not do unnecessary IP header checksum for TSO packets. - Reduce guest load for non-TSO IP packets.
Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5099
|
295297 |
05-Feb-2016 |
sephe |
hyperv/hn: Reorganize TX csum offloading
- For non-TSO offloading, we don't need to access mbuf to know which csum offloading is requested, we can just use the CSUM_{IP,TCP,UDP} in the csum_flags. - For TSO offloading, we still can depend on CSUM_{TSO4,TSO6} in the csum_flags to tell whether the TSO packet is an IPv4 TSO packet or an IPv6 TSO packet.
This streamlines csum offloading handling (remove the two goto) and allows us the nuke the unnecessary get_transport_proto_type().
Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5098
|
295296 |
05-Feb-2016 |
sephe |
hyperv/hn: Avoid duplicate csum features settings
- Record csum features in softc, so we don't need to duplicate the logic from attach path to ioctl path. - Protect if_capenable and if_hwassist changes by main lock. - Prefer turn on/off bits in if_hwassist explicitly instead of using XOR.
Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5085
|
295295 |
05-Feb-2016 |
sephe |
hyperv/stor: Fix the NULL pointer dereference
Reported by: Netapp Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: adrian, sephe, Dexuan Cui <decui microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5097
|
294886 |
27-Jan-2016 |
sephe |
hyperv/vmbus: Event handling code refactor.
- Use taskqueue instead of swi for event handling. - Scan the interrupt flags in filter - Disable ringbuffer interrupt mask in filter to ensure no unnecessary interrupts.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, sephe, Dexuan <decui microsoft com> Approved by: adrian (mentor) MFC after: 2 weeks Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4920
|
294788 |
26-Jan-2016 |
sephe |
hyperv/hn: Improve sending performance
- Avoid main lock contention by trylock for if_start, if that fails, schedule TX taskqueue for if_start - Don't do direct sending if the packet to be sent is large, e.g. TSO packet.
This change gives me stable 9.1Gbps TCP sending performance w/ TSO over a 10Gbe directly connected network (the performance fluctuated between 4Gbps and 9Gbps before this commit). It also improves non- TSO TCP sending performance a lot.
Reviewed by: adrian, royger Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5074
|
294705 |
25-Jan-2016 |
sephe |
hyperv/vmbus: Avoid extra copy of page information.
The page information array could contain up to 32 elements (i.e. 512B). And on network side w/ TSO, 11+ (176B+) elements, i.e. ~44K TSO packet, in the page information array is quite common.
This saves us some cpu cycles.
Reviewed by: adrian, delphij Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4992
|
294703 |
25-Jan-2016 |
sephe |
hyperv/hn: Trust host TCP segment checksum verification by default.
According to all available information, VMSWITCH always does the TCP segment checksum verification before sending the segment to guest.
Reviewed by: adrian, delphij, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4991
|
294702 |
25-Jan-2016 |
sephe |
hyperv/hn: Remove unnecessary zeroing out the netvsc_packet
All used fields are setup one by one, so there is no need to zero out this large struct.
While I'm here, move the stack variable near its usage.
Reviewed by: adrian, delphij, Jun Su <junsu microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4978
|
294701 |
25-Jan-2016 |
sephe |
hyperv/hn: Use m_copydata for chimney sending.
While I'm here, move stack variables near their usage.
Reviewed by: adrian, delphij, Jun Su <junsu microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4977
|
294700 |
25-Jan-2016 |
sephe |
hyperv/hn: Partly rework transmission path
- Avoid unnecessary malloc/free on transmission path. - busdma(9)-fy transmission path. - Properly handle IFF_DRV_OACTIVE. This should fix the network stalls reported by many. - Properly setup TSO parameters. - Properly handle bpf(4) tapping. This 5 times the performance during TCP sending test, when there is one bpf(4) attached. - Allow size of chimney sending be tuned on a running system. Default value still needs more test to determine.
Reviewed by: adrian, delphij Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4972
|
294557 |
22-Jan-2016 |
sephe |
hyperv/stor: Verify returned inquiry data before further dispatching
Windows 10 and Window 2016 will return all zero inquiry data for non-existing slots. If we dispatched them, then a lot of useless (0 sized) disks would be created. So we verify the returned inquiry data (valid type, non-empty vendor/product/revision etc.), before further dispatching.
Minor white space cleanup and wording fix.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: adrian, sephe, Jun Su <junsu microsoft com> Approved by: adrian (mentor) Modified by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4928
|
294553 |
22-Jan-2016 |
sephe |
hyperv/vmbus: Lookup channel through id table
Vmbus event handler will need to find the channel by its relative id, when software interrupt for event happens. The original lookup searches the channel list, which is not very efficient. We now create a table indexed by the channel relative id to speed up the channel lookup.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: delphij, adrain, sephe, Dexuan Cui <decui microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4802
|
294327 |
19-Jan-2016 |
hselasky |
Add optimizing LRO wrapper:
- Add optimizing LRO wrapper which pre-sorts all incoming packets according to the hash type and flowid. This prevents exhaustion of the LRO entries due to too many connections at the same time. Testing using a larger number of higher bandwidth TCP connections showed that the incoming ACK packet aggregation rate increased from ~1.3:1 to almost 3:1. Another test showed that for a number of TCP connections greater than 16 per hardware receive ring, where 8 TCP connections was the LRO active entry limit, there was a significant improvement in throughput due to being able to fully aggregate more than 8 TCP stream. For very few very high bandwidth TCP streams, the optimizing LRO wrapper will add CPU usage instead of reducing CPU usage. This is expected. Network drivers which want to use the optimizing LRO wrapper needs to call "tcp_lro_queue_mbuf()" instead of "tcp_lro_rx()" and "tcp_lro_flush_all()" instead of "tcp_lro_flush()". Further the LRO control structure must be initialized using "tcp_lro_init_args()" passing a non-zero number into the "lro_mbufs" argument.
- Make LRO statistics 64-bit. Previously 32-bit integers were used for statistics which can be prone to wrap-around. Fix this while at it and update all SYSCTL's which expose LRO statistics.
- Ensure all data is freed when destroying a LRO control structures, especially leftover LRO entries.
- Reduce number of memory allocations needed when setting up a LRO control structure by precomputing the total amount of memory needed.
- Add own memory allocation counter for LRO.
- Bump the FreeBSD version to force recompilation of all KLDs due to change of the LRO control structure size.
Sponsored by: Mellanox Technologies Reviewed by: gallatin, sbruno, rrs, gnn, transport Tested by: Netflix Differential Revision: https://reviews.freebsd.org/D4914
|
293875 |
14-Jan-2016 |
sephe |
hyperv: set receive buffer size according to NVSP protocol version
If the NVSP protocol version is not greater than NVSP_PROTOCOL_VERSION_2, then the recv buffer size is 15MB, otherwise the buffer size is 16MB.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: royger, Dexuan Cui <decui microsoft com>, adrian Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4814
|
293874 |
14-Jan-2016 |
sephe |
hyperv: add interrupt counters
Submitted by: Howard Su <howard0su gmail com> Reviewed by: royger, Dexuan Cui <decui microsoft com>, adrian Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4693
|
293873 |
14-Jan-2016 |
sephe |
hyperv: implement an event timer
Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: delphij, royger, adrian Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4676
|
293871 |
14-Jan-2016 |
sephe |
hyperv: remove unused vmbus definitions
We don't need them at all.
Submitted by: Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Reviewed by: royger, adrian, delphij Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4595
|
293870 |
14-Jan-2016 |
sephe |
hyperv: use x86 generic code to do the hypervisor detection
This is first step to move the generic part of HV code into kernel instead of module, so that it is possible to use hypercall to implement some other paravirtualization code in the kernel.
Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: royger, delphij, adrian Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D3072
|
293869 |
14-Jan-2016 |
sephe |
hyperv/hn: Unbreak LINT-NOIP
Reported by: bz Approved by: adrain (mentor) Sponsored by: Microsoft OSTC
|
293722 |
12-Jan-2016 |
sephe |
hyperv/hn: Removed unused netvsc_init()
Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: me, adrian, royger, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4594
|
293721 |
12-Jan-2016 |
sephe |
hyperv/hn: Avoid mbuf cluster allocation, if the packet is small.
This one mainly avoids mbuf cluster allocation for TCP ACKs during TCP sending tests. And it gives me ~200Mbps improvement (4.7Gbps -> 4.9Gbps), when running iperf3 TCP sending test w/ 16 connections.
While I'm here, nuke the unnecessary zeroing out pkthdr.csum_flags.
Reviewed by: adrain Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4853
|
293720 |
12-Jan-2016 |
sephe |
hyperv/hn: Implement SIOC[SG]IFMEDIA support
Many applications and kernel modules (e.g. bridge) rely on the ifmedia status report; give them what they want.
Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: Jun Su <junsu microsoftc com>, me, adrian Modified by: me (minor) Original differential: https://reviews.freebsd.org/D4611 Differential Revision: https://reviews.freebsd.org/D4852 Approved by: adrian (mentor) Sponsored by: Microsoft OSTC
|
293719 |
12-Jan-2016 |
sephe |
hyperv/hn: Implement LRO
- Implement the LRO using tcp_lro APIs, and LRO is enabled by default. - Add several stats sysctl nodes. - Check IP/TCP length before sending the packet to tcp_lro_rx(), if host does not provide RX csum information (*); and add an option through sysctl to always trust host TCP segment csum checks (default is off). - Add sysctl to control the LRO entry depth; it is disabled by default. It is used to avoid holding too much TCP segments in driver. Limiting the LRO entry depth helps a lot in a one/two streams RX test.
This one 3x the RX performance on my local test (3Gbps -> 10Gbps), and ~2x the RX performance over a directly connected 40Ge network (5Gbps -> 9Gbps).
(*) It seems the host stops supplying csum information, once the network load is high. This still needs investigation...
Reviewed by: Hongjiang Zhang <honzhan microsoft com>, Dexuan Cui <decui microsoft com>, Jun Su <junsu microsoft com>, delphij Tested by: me (local), Hongjiang Zhang <honzhan microsoft com> (directly connected 40Ge) Approved by: delphij (mentor), adrian (mentor, no objection) With feedback from: delphij, Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4824
|
292861 |
29-Dec-2015 |
delphij |
hyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()
We'll remove the per-channel control_work_queue because it can't properly do serialization of message handling, e.g., when there are 2 NIC devices, vmbus_channel_on_offer() -> hv_queue_work_item() has a race condition: for an SMP VM, vmbus_channel_process_offer() can run concurrently on different CPUs and if the second NIC's vmbus_channel_process_offer() -> hv_vmbus_child_device_register() runs first, the second NIC's name will be hn0 and the first NIC's name will be hn1!
We can fix the race condition by removing the per-channel control_work_queue and run all the message handlers in the global hv_vmbus_g_connection.work_queue -- we'll do this in the next patch.
With the coming next patch, we have to run the non-blocking handlers directly in the kernel thread vmbus_msg_swintr(), because the special handling of sub-channel: when a sub-channel (e.g., of the storvsc driver) is received and being handled in vmbus_channel_on_offer() running on the global hv_vmbus_g_connection.work_queue, vmbus_channel_process_offer() invokes channel->sc_creation_callback, i.e., storvsc_handle_sc_creation, and the callback will invoke hv_vmbus_channel_open() -> hv_vmbus_post_message and expect a further reply from the host, but the handling of the further messag can't be done because the current message's handling hasn't finished yet; as result, hv_vmbus_channel_open() -> sema_timedwait() will time out and th device can't work.
Also renamed the handler type from hv_pfn_channel_msg_handler to vmbus_msg_handler: the 'pfn' and 'channel' in the old name make no sense.
Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: royger MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4596
|
292859 |
29-Dec-2015 |
delphij |
hyperv: vmbus: remove the per-channel control_work_queue
Now vmbus_channel_on_offer() -> vmbus_channel_process_offer() can safely run on the global hv_vmbus_g_connection.work_queue now.
We remove the per-channel control_work_queue to achieve the proper serialization of the message handling.
I removed the bogus TODO in vmbus_channel_on_offer(): a vmbus offer can only come from the parent partition, i.e., the host.
PR: kern/205156 Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: Howard Su <howard0su gmail com>, delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4597
|
292661 |
23-Dec-2015 |
ngie |
Remove redundant vmbus_select_outgoing_channel declaration already handled in include/hyperv.h
This unbreaks the gcc 4.2.1 kernel build of hyperv
Differential Revision: https://reviews.freebsd.org/D4684 MFC after: 3 days Reviewed by: royger Sponsored by: EMC / Isilon Storage Division
|
292258 |
15-Dec-2015 |
royger |
hyperv/kvp: wake up the daemon if it's sleeping due to poll()
Without the patch, there is a race condition: when poll() is invoked(), if kvp_globals.daemon_busy is false, the daemon won't be timely woke up, because hv_kvp_send_msg_to_daemon() can't wake up the daemon in this case.
Submitted by: Dexuan Cui <decui@microsoft.com> Sponsored by: Microsoft OSTC Reviewed by: delphij, royger MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D4258
|
291156 |
22-Nov-2015 |
whu |
Ignore the inbound checksum flags when doing packet forwarding in netvsc driver.
PR: 20363 Submitted by: whu Reviewed by: royger, whu Approved by: royger MFC after: 1 week Relnotes: No Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4131
|
290494 |
07-Nov-2015 |
bapt |
Improve collation string and locales support
Merge collation support from Illumos and DragonflyBSD.
Locales are now generated with the new localedef(1) tool from CLDR POSIX files. The generated files are now identified as "BSD 1.0" format.
The libc now only read "BSD 1.0" locales definitions, all other version will be set to "C" The localedef(1) tool has been imported from Illumos and modified to use tree(3) instead of the CDDL avl(3) A set of tool created by edwin@ and extended by marino@ for dragonfly has been added to be able to generate locales and the Makefiles from the vanilla CLDR unicode databases + a universal UTF-8 charmap (by marino@) Update the locales to unicode v27 Given our regex(3) does not support multibyte (yet) it has been forced to always use locale C Remove now unused colldef(1) and mklocale(1) Finish implementing the numeric BSD extension for ctypes The number of supported locales has grown from 175 to 250 locales. Among the new locales: 6 Arabic locales (AE EG JO MA QA SA), Different variations of spanish locales. Added new 3 components locales for mn_Cyrl_MN, sr_Cyrl_RS sr_Latn_RS, zh_Hans_CN, zh_Hant_HK and zh_Hant_TW. Some aliases has been for 2 components version when possible.
Thanks: Garrett D'Amore (Illumos) who made sure all his work was done under BSD license!, Edwin Groothuis (edwin@) for the work he made on tools to be able to generate locales definition usable in freebsd sources out of vanilla CLDR definitions, John Marino (DragonflyBSD) who first merge the Illumos work into Dragonfly and spent hours tracking down bugs.
|
290102 |
28-Oct-2015 |
bapt |
Merge mpsutil(8) branch
mpsutil(8)/mprutil(8) are new utilities for managing LSI Fusion-MPT 2/3 controllers (mps(4) and mpr(4))
For now only informational commands have been implemented.
This utility has been written by scottl@ [1] and polished by myself[2]
Submitted by: scottl Discussed with: scottl Relnotes: yes Sponsored by: Netflix [1] Sponsored by: Gandi.net [2]
|
288943 |
06-Oct-2015 |
dim |
Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0 release.
Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information.
Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html>
Thanks to Ed Maste, Andrew Turner and Antoine Brodin for their help.
Exp-run: antoine Relnotes: yes
|
285785 |
22-Jul-2015 |
whu |
Do not enable UDP checksum offloading when running on the Hyper-V on Windows Server 2012 and earlier hosts.
Submitted by: whu Reviewed by: royger Approved by: royger MFC after: 3 days Relnotes: No Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D3086
|
284889 |
27-Jun-2015 |
bz |
Fix compilation without INET6 and without INET and INET6 after offload support was introduced in r284746.
While here also fix the ioctl() handler for IPv4 added in r279819, which was never compiled in given opt_inet.h was not included.
|
284746 |
24-Jun-2015 |
whu |
TSO and checksum offloading support for Netvsc driver on Hyper-V.
Submitted by: whu Reviewed by: royger Approved by: royger MFC after: 1 week Relnotes: yes Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2517
|
283291 |
22-May-2015 |
jkim |
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent.
Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
|
283053 |
18-May-2015 |
whu |
Add support for SCSI disk hot add and remove. Also add padding according to the requirement of different hypervisor releases.
Submitted by: whu Reviewed by: royger Approved by: royger MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2512
|
282212 |
29-Apr-2015 |
whu |
Microsoft vmbus, storage and other related driver enhancements for HyperV. - Vmbus multi channel support. - Vector interrupt support. - Signal optimization. - Storvsc driver performance improvement. - Scatter and gather support for storvsc driver. - Minor bug fix for KVP driver. Thanks royger, jhb and delphij from FreeBSD community for the reviews and comments. Also thanks Hovy Xu from NetApp for the contributions to the storvsc driver.
PR: 195238 Submitted by: whu Reviewed by: royger, jhb, delphij Approved by: royger MFC after: 2 weeks Relnotes: yes Sponsored by: Microsoft OSTC
|
280031 |
15-Mar-2015 |
dim |
Upgrade our copy of clang, llvm and lldb to 3.6.0 release.
Please note that from 3.5.0 onwards, clang/llvm/lldb require C++11 support to build; see UPDATING for more information.
Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.6.0/tools/clang/docs/ReleaseNotes.html>
Thanks to Ed Maste for the lldb part of this upgrade.
Exp-run: antoine
|
279819 |
09-Mar-2015 |
delphij |
Fix CARP when in use in a HyperV environment:
- Bump link state when stopping or starting the interface; - Don't handle SIOCGIFADDR specially, similar to r277103.
This change is based on a previous revision from Andy Zhang (Microsoft) who did the diagnostic work and many thanks to them for their help in supporting the HyperV work.
PR: kern/187203 MFC after: 2 weeks
|
276479 |
31-Dec-2014 |
dim |
Upgrade our copy of clang, llvm and lldb to 3.5.0 release.
Please note that this version now requires C++11 support to build; see UPDATING for more information.
Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>
Thanks to Ed Maste, Roman Divacky, Andrew Turner, Justin Hibbits and Antoine Brodin for their invaluable help with this import.
Approved by: portmgr (antoine) MFC after: 1 month
|
274819 |
21-Nov-2014 |
smh |
Prevent overflow issues in timeout processing
Previously, any timeout value for which (timeout * hz) will overflow the signed integer, will give weird results, since callout(9) routines will convert negative values of ticks to '1'. For unsigned integer overflow we will get sufficiently smaller timeout values than expected.
Switch from callout_reset, which requires conversion to int based ticks to callout_reset_sbt to avoid this.
Also correct isci to correctly resolve ccb timeout.
This was based on the original work done by Eygene Ryabinkin <rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid the overlow.
Differential Revision: https://reviews.freebsd.org/D1157 Reviewed by: mav, davide MFC after: 1 month Sponsored by: Multiplay
|
274231 |
07-Nov-2014 |
glebius |
Remove struct arpcom. It is unused by most interface types, that allocate it, except Ethernet, where it carried ng_ether(4) pointer. For now carry the pointer in if_l2com directly.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
273577 |
24-Oct-2014 |
delphij |
Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR or 0 for in-tree driver. This change was verified by Microsoft.
|
273402 |
21-Oct-2014 |
gjb |
Fix an issue where a FreeBSD virtual machine provisioned in the Microsoft Azure service does not recognize the second attached disk on the system.
Submitted by: kyliel@Microsoft Patched by: weh@Microsoft PR: 194376 MFC after: 3 days X-MFC-10.1: yes, ASAP Sponsored by: The FreeBSD Foundation
|
271849 |
19-Sep-2014 |
glebius |
Mechanically convert to if_inc_counter().
|
271493 |
13-Sep-2014 |
delphij |
Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD.
While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary.
The HyperV utilities are only built for i386 and amd64 targets.
This is a stable/10 candidate for inclusion with 10.1-RELEASE.
Submitted by: Wei Hu <weh microsoft com> MFC after: 1 week
|
270856 |
30-Aug-2014 |
glebius |
Use define from if_var.h to access a field inside struct if_data, that resides in struct ifnet.
Sponsored by: Nginx, Inc.
|
264177 |
05-Apr-2014 |
imp |
Make some unwise casts. On i386 these casts wind up being safe. Rather than disturb the API, go with these casts to shut gcc up.
|
263123 |
14-Mar-2014 |
delphij |
Hide a few messages under bootverbose.
Reviewed by: Abhishek Gupta MFC after: 2 weeks
|
262847 |
06-Mar-2014 |
mav |
Minor fix to r262789.
MFC after: 6 days
|
262789 |
05-Mar-2014 |
mav |
Remove custom bus scanner code and fix use of CAM's default scanner.
This fixes kernel panic during boot, caused by incompatibility of recent CAM locking changes and this bus scanner code.
Submitted by: Microsoft MFC after: 1 week
|
260718 |
16-Jan-2014 |
glebius |
Another round of removing historical mbuf(9) allocator flags. They are breeding! New ones arouse since last round.
Sponsored by: Nginx, Inc.
|
259180 |
10-Dec-2013 |
pjd |
Fix missing new line after:
Netvsc initializing...
during boot.
|
257369 |
29-Oct-2013 |
delphij |
Don't reference pointer before testing whether it is NULL.
Submitted by: Clement Lecigne <clecigne google com> Reviewed by: grehan MFC after: 3 days
|
257341 |
29-Oct-2013 |
nwhitehorn |
More BUS_PROBE_NOWILDCARD sweeping. Some devices here (if_ath_ahb and siba) resist easy conversion since they implement a great deal of their attach logic inside probe(). Some of this could be fixed by moving it to attach(), but some requires something more subtle than BUS_PROBE_NOWILDCARD.
|
257241 |
28-Oct-2013 |
glebius |
Include necessary headers that now are available due to pollution via if_var.h.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
256425 |
13-Oct-2013 |
gibbs |
Centralize the detection logic for the Hyper-V hypervisor.
Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs, grehan Approved by: re (gjb)
sys/sys/systm.h: * Add a new VM_GUEST type, VM_GUEST_HV (HyperV guest).
sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c: sys/dev/hyperv/vmbus/hv_hv.c: sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c: * Set vm_guest to VM_GUEST_HV and use that on other HyperV related devices instead of cloning the cpuid hypervisor check. * Cleanup the vmbus_identify function.
|
256362 |
12-Oct-2013 |
grehan |
Fix a lock-order reversal in the net driver by dropping the lock and holding a reference prior to calling further into the hyperv stack.
Added missing FreeBSD idents.
Submitted by: Microsoft hyperv dev team Approved by: re@ (gjb)
|
256350 |
11-Oct-2013 |
grehan |
Fix vmbus channel memory leak where incorrect length parameter was being passed to contigfree().
Submitted by: Microsoft hyperv dev team Approved by: re@ (glebius)
|
256304 |
10-Oct-2013 |
grehan |
Allow the legacy CDROM device to be accessed in a FreeBSD guest, while still using enlightened drivers for other block devices.
Submitted by: Microsoft hyperv dev team, mav@ Approved by: re@
|
256276 |
10-Oct-2013 |
dim |
In sys/dev/hyperv, fix a number of gcc warnings about usage of anonymous union members in strict C99, by giving them names. While here, add some FreeBSD keywords where they were missing.
Approved by: re (gjb) Reviewed by: grehan
|
256071 |
05-Oct-2013 |
gibbs |
Correct panic caused by attaching both Xen PV and HyperV virtualization aware drivers on Xen hypervisors that advertise support for some HyperV features.
x86/xen/hvm.c: When running in HVM mode on a Xen hypervisor, set vm_guest to VM_GUEST_XEN so other virtualization aware components in the FreeBSD kernel can detect this mode is active.
dev/hyperv/vmbus/hv_hv.c: Use vm_guest to ignore Xen's HyperV emulation when Xen is detected and Xen PV drivers are active.
Reported by: Shanker Balan Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (Xen blanket)
|
255686 |
19-Sep-2013 |
grehan |
Reorder the hypervisor presence test to avoid claiming ATA disks on non hyperv systems.
Reviewed by: neel, abgupta at microsoft dot com Approved by: re@ (hrs)
|
255685 |
19-Sep-2013 |
grehan |
Fix missing SVN properties.
Approved by: re@ (hrs)
|
255524 |
13-Sep-2013 |
grehan |
Import Hyper-V paravirtualized drivers from projects/hyperv branch into head.
Approved by: re@ (hrs) Obtained from: Microsoft, NetApp, and Citrix.
|
255427 |
09-Sep-2013 |
grehan |
Revert the kvp code - there's still some work that needs to be done for that.
Discussed with: Microsoft hyper-v devs
|
255414 |
09-Sep-2013 |
grehan |
Latest update from Microsoft.
Obtained from: Microsoft Hyper-v dev team
|
253869 |
01-Aug-2013 |
grehan |
IFC @ r253862
- change the SI_SUB_RUN_SCHEDULER sysinits in hv_utilc and hv_netvsc_drv_freebsd.c to SI_SUB_KTHREAD_IDLE, since the former is no longer in FreeBSD. The use of these SYSINITs can probably be removed.
|
253411 |
17-Jul-2013 |
grehan |
Microsoft have changed their policy on how the hyper-v code will be pulled into FreeBSD. From now, FreeBSD will be considered the upstream repo.
First step: move the drivers away from the contrib area and into the base system.
A follow-on commit will include the drivers in the amd64 GENERIC kernel.
|
252645 |
03-Jul-2013 |
grehan |
Import driver source from hyperv-20130627 vendor branch.
|
251775 |
15-Jun-2013 |
grehan |
Import driver source from hyperv-20130502 vendor branch.
|
250200 |
03-May-2013 |
grehan |
Tag hyperv 20130502
|
250199 |
03-May-2013 |
grehan |
Initial import of the Microsoft HyperV 'enlightened' drivers.
From https://github.com/FreeBSDonHyper-V/VendorBranchForFreeBSDonHyper-V rev: 99eaa0ddb0485c9d76046664100f6beb1a0a0c58
|