Project

General

Profile

Feature #12679

want viona driver for bhyve

Added by Patrick Mooney 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
bhyve
Gerrit CR:

Description

This represents the consolidated upstreaming effort for viona in bhyve.

Short for VirtIO-Net-Acceleration, viona provides a virtio-net interface to the guest, coupled tightly to the MAC network interface in illumos. This results in fairly high network performance, thanks to the low overhead of mostly in-kernel handling and offload capabilities offered by MAC and underlying drivers. With the necessary prereqs (#12671, #12672, #12673, #12674, #12675, #12676, #12677, #12678) in place, viona will be integrated as a single unit, rolling together all of the fixes/improvements that have been made to it so far.

Changes included in this omnibus commit:
- OS-7237 viona too persistent with legacy interrupt
- OS-8042 viona_open() gets id_alloc_nosleep() wrong
- OS-8000 viona ring reset can race with Rx packets
- OS-7843 viona could be split up
- OS-7447 formalize bhyve resource exclusion
- OS-7835 bhyve modules should have mapfiles
- OS-7812 viona bungles refcount during ipf hook
- OS-7804 viona VTNET_MAXSEGS is inadequate
- OS-7409 bhyve does not receive multicast packets
- OS-7613 bhyve virtio needs barriers
- OS-7614 viona should use proper barriers
- OS-7592 viona doesn't zero ULP checksum for HCK_FULLCKSUM
- OS-7591 viona should be strict about cksum offsets
- OS-7538 device tree deadlock between viona and softmac
- OS-6964 Cloud Firewall not affecting bhyve Instances
- OS-6884 viona frame headers risk TOCTOU
- OS-7073 viona buffer merging stumbles over perfectly sized frames
- OS-6815 viona should pad short frames
- OS-6874 viona should untangle status and flags
- OS-6883 viona needs design prose
- OS-6856 viona can miss msix fast path
- OS-6811 viona must not spin on invalid descriptor count
- OS-6810 want problem counters in viona
- OS-6798 viona_recv_merged() can corrupt used ring
- OS-6807 viona rx ring can deadlock on shutdown
- OS-6681 modernize viona driver

Including partial bits from:
- OS-2340 vnics should support LSO
- OS-6778 MAC loopback traffic should avoid cksum work
- OS-6794 want LSO support in viona
- OS-7319 dangling ref in mac_sw_cksum()
- OS-7331 mac_sw_cksum() drops valid UDP traffic
- OS-8027 reinstate mac-loopback hardware emulation on Tx
- OS-7768 illumos-joyent needs smatch fixes
- OS-7200 would like thread name API
- OS-7960 need fixes for NULL as a pointer
- OS-7125 Need mitigation of L1TF (CVE-2018-3646)
- OS-6812 implement RFD 118 interpretation of HCKSUM_INET_FULL_V4/6

#1

Updated by Patrick Mooney 9 months ago

  • Description updated (diff)
#2

Updated by Patrick Mooney 8 months ago

This driver, along with its associated changes, has been in production in Joyent SmartOS for an extended period of time. OmniOSce also side-pulled it and has seen similarly useful results. After the initial bring-up work, viona became effectively the only want to attach virtio-net devices to guests under bhyve.

#3

Updated by Patrick Mooney 8 months ago

It should be noted that while the Reviewed-by list for the upstreaming commit is limited, nearly all of the included changes were scrutinized as they went into SmartOS (and presumably again when side-ported into OmniOSce).

#4

Updated by Patrick Mooney 8 months ago

These viona patches were compared against their downstream SmartOS counterparts. Furthermore they were smoke-tested on hardware to ensure a guest could properly access the network through viona.

#5

Updated by Electric Monk 8 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit b22a70abf81f995ecc990b8444e63308bc389d5c

commit  b22a70abf81f995ecc990b8444e63308bc389d5c
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-05-19T15:55:57.000Z

    12679 want viona driver for bhyve
    Portions contributed by: Ryan Zezeski <rpz@joyent.com>
    Portions contributed by: John Levon <john.levon@joyent.com>
    Portions contributed by: Jason King <jason.king@joyent.com>
    Portions contributed by: Robert Mustacchi <rm@joyent.com>
    Portions contributed by: Bryan Cantrill <bryan@joyent.com>
    Reviewed by: Ryan Zezeski <ryan@zinascii.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF