Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    pfSense SR-IOV support on Microsoft Hyper-V

    Scheduled Pinned Locked Moved Virtualization
    16 Posts 5 Posters 2.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nzkiwi68N
      nzkiwi68
      last edited by

      Well, that's not looking very promising!

      Thanks though for your post, upvote for you!

      1 Reply Last reply Reply Quote 0
      • B
        bjd223
        last edited by bjd223

        What iperf speeds are you getting without SR-IOV? Can you use VMQ?

        If your hardware supports it you could probably pass a NIC right through to the VM with DDA.

        nzkiwi68N 1 Reply Last reply Reply Quote 0
        • nzkiwi68N
          nzkiwi68 @bjd223
          last edited by

          @bjd223 I couldn't pass the NIC through, as, I normally use 2 x 10 Gbe NIC setup with Microsoft SET (Switch Embedded Teaming) which since Server 2016 allows SR-IOV through to the NIC.

          That way I am protected from a single NIC failure, and, because of SET we have double the VF (virtual function slots) for the VM to use with SR-IOV.

          It's not just about speed, but, a lot lower CPU.

          Consider 2 VMs on two different hosts talking to one another;

          • without SR-IOV
            vm > virtual switch > physical NIC > across network switch > physical NIC > virtual switch > vm

          • with SR-IOV
            vm > physical NIC > across network switch > physical NIC > vm

          So there's 2 lots of CPU savings to be made, because the virtual switch is all software/CPU cycles. Sure it's efficient, but it still adds overhead and takes CPU cycles.
          SR-IOV makes a lot of sense.

          I notice FortiGate firewall VM have a requirement for SR-IOV for their implementation.
          https://docs.fortinet.com/document/fortigate/6.0.0/fortigate-vm-on-kvm/553137/sr-iov
          https://docs2.fortinet.com/document/fortigate/6.0.0/fortigate-vm-on-vmware-esxi/553137/sr-iov

          B 1 Reply Last reply Reply Quote 0
          • B
            bjd223 @nzkiwi68
            last edited by

            @nzkiwi68 Yes I understand the performance benefits on SR-IOV. However if it is not supported in the version of FreeBSD that pfsense is using then it will not work.

            Your next best choice is VMQ and if you are lucky you will fall under tier 2 which is maximum offload for VMQ.

            nzkiwi68N 1 Reply Last reply Reply Quote 1
            • nzkiwi68N
              nzkiwi68 @bjd223
              last edited by

              @bjd223 yep. Doesn't change the fact I'd still love to see SR-IOV support...

              Thanks for your comments.

              B 1 Reply Last reply Reply Quote 0
              • provelsP
                provels
                last edited by

                FWIW (and worth every penny paid), here's a H-V tuning article from Altaro.
                https://www.altaro.com/hyper-v/hardware-tweaks-hyper-v-performance/

                Peder

                MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                1 Reply Last reply Reply Quote 0
                • B
                  bjd223 @nzkiwi68
                  last edited by bjd223

                  @nzkiwi68 If you look at the FreeBSD Wiki https://wiki.freebsd.org/HyperV which was last updated on 10/04/19, it implies that the article will be updated as new info is available, so I think that article reflects the current state of affairs.

                  I think the integration drivers are contributed to FreeBSD primarily by MS themselves. So I doubt the pfsense devs want to get involved upstream of the pfsense project (or can even do it to begin with since it is probably very complicated and may also need updates to Hyper-V itself).

                  I know that pfsense 2.5 is supposed to be based on FreeBSD 12, which if you are lucky will have updated integrations which include SR-IOV.

                  nzkiwi68N 1 Reply Last reply Reply Quote 0
                  • nzkiwi68N
                    nzkiwi68 @bjd223
                    last edited by

                    @bjd223 Thanks, it will be interesting to see what FreeBSD 12 brings.

                    1 Reply Last reply Reply Quote 0
                    • T
                      TWalker82
                      last edited by

                      Just a small note of caution for anyone looking at this again now that we have PFSense 2.4.5 stable - be extremely cautious using SR IOV with PFSense under Hyper-V

                      My experience this week is that if you make SR IOV available to it, it does appear to work - but causes big glitches that can pretty much bring down your hypervisor.

                      Obviously the particular driver/hardware in question will have an effect but with my X520 nic and SR IOV pfsense would hang on shutdown and fail to turn off, and nothing I did (killing processes on the hypervisor etc) would kill it off, or bring it back up.

                      I ended up in a real mess as when I rebooted the hypervisor it would automatically start the PFSense box again, with SR IOV enabled, and I'd be stuck - had to use powershell to turn off the automatic boot of the pfsense vm and reboot everything again.

                      1 Reply Last reply Reply Quote 1
                      • nzkiwi68N
                        nzkiwi68
                        last edited by

                        https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-freebsd-virtual-machines-on-hyper-v

                        Updated 7 April 2020 and clearly FreeBSD 11.0, 11.1-11.13 and 12.-12.1 are supported for SR-IOV.

                        Feature 	Windows Server OS 	12-12.1 	11.1-11.3 	11.0
                        SR-IOV 	2019, 2016 	 	 	 ✔ 	 	✔ 	 	✔
                        

                        I expect then pfSense 2.4.5 based on FreeBSD 11.3 should work well with SR-IOV.

                        Does anyone have 2.4.5 running SR-IOV?

                        X 1 Reply Last reply Reply Quote 0
                        • X
                          xpxp2002 @nzkiwi68
                          last edited by

                          @nzkiwi68 With 2.4.5 utterly broken in multi-core virtualized environments, it's hard to say. I won't be able to upgrade my environment until this pfctl issue is fixed, which means waiting another 6-12 months for a 2.4.5-p1.

                          One step forward, one step back.

                          1 Reply Last reply Reply Quote 2
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.