Page MenuHomeFreeBSD

[bhyve] Pass a complete string of parameters to network backends
ClosedPublic

Authored by afedorov on May 6 2020, 3:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 8:33 AM
Unknown Object (File)
Thu, Mar 21, 3:27 PM
Unknown Object (File)
Thu, Mar 21, 3:24 PM
Unknown Object (File)
Mar 18 2024, 1:28 PM
Unknown Object (File)
Jan 14 2024, 4:05 PM
Unknown Object (File)
Jan 11 2024, 4:55 PM
Unknown Object (File)
Dec 23 2023, 9:21 AM
Unknown Object (File)
Nov 21 2023, 1:41 PM
Subscribers

Details

Summary

These changes are needed to integrate the Netgraph backend. See discussion: https://reviews.freebsd.org/D24620

I also think passing all the arguments to the backend can be useful in the future.

Test Plan

Test various combinations with mac and mtu options:

  • -s X:Y,virtio-net,tap,mtu=X,mac=XXXXXX
  • -s X:Y,virtio-net,valeN:M,mtu=X,mac=XXXXXX
  • -s X:Y,e1000,tap,mtu=X,mac=XXXXXX
  • -s X:Y,e1000,valeN:M,mtu=X,mac=XXXXXX

And without options:

  • -s X:Y,virtio-net,tap
  • -s X:Y,virtio-net
  • -s X:Y,e1000,tap
  • -s X:Y,e1000

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

vmaffione added inline comments.
usr.sbin/bhyve/net_backends.c
759 ↗(On Diff #71460)

Please return -1. The caller will check errno if needed.
I know below (EINVAL) is returned, but I see that as a leftover that should be removed.

usr.sbin/bhyve/pci_e82545.c
2284 ↗(On Diff #71460)

optscopy may be a better name?

This revision is now accepted and ready to land.May 6 2020, 7:00 PM
This revision now requires review to proceed.May 7 2020, 11:05 AM
  • Fix the indicated issues.

@vmaffione , if you have no objection, can I commit these changes?

Have you tested the case with no arguments, e.g.:

-s X:Y,virtio-net,tap1

?
After that, please go ahead and commit.
Thanks.

This revision is now accepted and ready to land.May 7 2020, 8:17 PM
afedorov edited the test plan for this revision. (Show Details)
  • Free optscopy early.
  • While I'm here, fix a memory leak in e1000 frontend.
This revision now requires review to proceed.May 8 2020, 4:59 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 8 2020, 5:15 PM
This revision was automatically updated to reflect the committed changes.