Skip to content

Commit

Permalink
FIX: Reworked _FREEBSD_NET_DRIVERS_GREP_STRING again
Browse files Browse the repository at this point in the history
After @invisnet updated this variable last week, I read that direct
wireless devices are incompatible with bhyve. See FAQ question “Why
can't I network VMs over a wireless host interface?”
https://wiki.freebsd.org/bhyve

Removed first “?” in each driver regex to fix issue where just the
driver name was accepted without trailing number.

Support for VFs for the cxgbe and cxl drivers were added.
https://svnweb.freebsd.org/base?view=revision&revision=305549

In total, the following drivers were added in addition to the drivers
in GENERIC on 12-CURRENT r305507:
  lagg - Thanks @invisnet
  cxgber
  cxgbev
  cxl
  cxlv
  vmx - Nested VMware guests

I used this to get the base set of devices and then form that into a
regex grep string (kinda nasty way to inject the additional drivers but
‘eh):
grep -B10000 '# Wireless NIC cards' /usr/src/sys/amd64/conf/GENERIC |
grep -A10000 '# PCI Ethernet NICs.' | grep -v -E '^$|^#|miibus' | awk
'{ print $2,"lagg cxgbe cxgbev cxl cxlv vmx" }' | tr ' ' '\n' | sort |
uniq | awk '{ print "^"$0"[0-9][0-9]?$" }' | tr '\n' '|'
  • Loading branch information
EpiJunkie committed Sep 10, 2016
1 parent 7886c65 commit c582b59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sbin/chyves
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ _DATE_YMD=$( date +"%Y%m%d" )
_DATE_YM=$( date +"%Y%m" )
_UUID_GENERAL_USE="$(/bin/uuidgen)"
_UUID_GUEST_USE="$(/bin/uuidgen)"
_FREEBSD_NET_DRIVERS_GREP_STRING='^bxe[0-9]?[0-9]?$|^de[0-9]?[0-9]?$|^em[0-9]?[0-9]?$|^igb[0-9]?[0-9]?$|^ix[0-9]?[0-9]?$|^ixv[0-9]?[0-9]?$|^ixl[0-9]?[0-9]?$|^ixlv[0-9]?[0-9]?$|^lagg[0-9]?[0-9]?$|^le[0-9]?[0-9]?$|^ti[0-9]?[0-9]?$|^txp[0-9]?[0-9]?$|^vx[0-9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][0-9]?$|^alc[0-9][0-9]?$|^ale[0-9][0-9]?$|^bce[0-9][0-9]?$|^bfe[0-9][0-9]?$|^bge[0-9][0-9]?$|^bxe[0-9][0-9]?$|^cas[0-9][0-9]?$|^cxgbe[0-9][0-9]?$|^cxgbev[0-9][0-9]?$|^cxl[0-9][0-9]?$|^cxlv[0-9][0-9]?$|^dc[0-9][0-9]?$|^de[0-9][0-9]?$|^em[0-9][0-9]?$|^et[0-9][0-9]?$|^fxp[0-9][0-9]?$|^gem[0-9][0-9]?$|^hme[0-9][0-9]?$|^igb[0-9][0-9]?$|^ix[0-9][0-9]?$|^ixl[0-9][0-9]?$|^ixlv[0-9][0-9]?$|^ixv[0-9][0-9]?$|^jme[0-9][0-9]?$|^lagg[0-9][0-9]?$|^le[0-9][0-9]?$|^lge[0-9][0-9]?$|^msk[0-9][0-9]?$|^nfe[0-9][0-9]?$|^nge[0-9][0-9]?$|^pcn[0-9][0-9]?$|^re[0-9][0-9]?$|^rl[0-9][0-9]?$|^sf[0-9][0-9]?$|^sge[0-9][0-9]?$|^sis[0-9][0-9]?$|^sk[0-9][0-9]?$|^ste[0-9][0-9]?$|^stge[0-9][0-9]?$|^ti[0-9][0-9]?$|^tl[0-9][0-9]?$|^tx[0-9][0-9]?$|^txp[0-9][0-9]?$|^vge[0-9][0-9]?$|^vmx[0-9][0-9]?$|^vr[0-9][0-9]?$|^vx[0-9][0-9]?$|^wb[0-9][0-9]?$|^xl[0-9][0-9]?$'
_KERNEL_MODULES="$( printf "%s\n%s\n%s\n%s\n%s" "vmm" "nmdm" "if_tap" "bridgestp" "if_bridge" )"
_NUMBER_OF_ALL_GUESTS="$( zfs list -d 3 -t filesystem -r -o name | grep -c /chyves/guests/ )"
_GUEST_NAMES_FORBIDDEN_GREP_STRING="^.config$|^.defaults$|^all$|^clone$|^console$|^create$|^dataset$|^defaults$|^delete$|^destroy$|^disk$|^firmware$|^get$|^global$|^guests$|^info$|^iso$|^list$|^network$|^primary$|^reclaim$|^rename$|^reorder$|^reset$|^set$|^snapshot$|^start$|^stop$|^stop$"
Expand Down

0 comments on commit c582b59

Please sign in to comment.