Skip to content

Commit

Permalink
Merge pull request #489 from citrus-it/MarkProminic/master
Browse files Browse the repository at this point in the history
Allow additional network adapters - soft limit: 16
  • Loading branch information
citrus-it authored Aug 8, 2024
2 parents 145220e + 5271a1b commit d828d9b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/brand/bhyve/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
PPT_SLOT = 9
RNG_SLOT = 10
VIRTFS_SLOT = 11
NET_SLOT2 = 12
CINIT_SLOT = 29
VNC_SLOT = 30
LPC_SLOT_WIN = 31
Expand Down Expand Up @@ -518,11 +519,18 @@ def apply_bootnext(v):
boolv(v, k) # Value check
net_extra += ',{}={}'.format(k, v)

args.extend([
'-s', '{0}:{1},{2},{3}{4}'
.format(NET_SLOT, i, netif, ifname, net_extra)
])
add_bootoption('net', i, ('pci', f'{NET_SLOT}.{i}'))
if i < 8:
args.extend([
'-s', '{0}:{1},{2},{3}{4}'
.format(NET_SLOT, i, netif, ifname, net_extra)
])
add_bootoption('net', i, ('pci', f'{NET_SLOT}.{i}'))
else:
args.extend([
'-s', '{0}:{1},{2},{3}{4}'
.format(NET_SLOT2, i - 8, netif, ifname, net_extra)
])
add_bootoption('net', i, ('pci', f'{NET_SLOT2}.{i - 8}'))
i += 1

for nic, promisc in promisc_filtered_nics.items():
Expand Down

0 comments on commit d828d9b

Please sign in to comment.