Commit Graph

9 Commits

Author SHA1 Message Date
Nikolay Shirokovskiy
4c9c7a5ba2 port allocator: drop skip bind check flag
This flag is only used for tests. Let's instead overload bind syscall
in mocks where it is not done yet.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
2018-02-22 13:52:45 +01:00
Laine Stump
a4b37cd0f1 tests: fix bhyve build
This file was modified in an editor buffer but not saved prior to
commit e62cb4a9b7 (which removed virMacAddr::generated), so the bhyve
build would fail.

Signed-off-by: Laine Stump <laine@laine.org>
2018-02-19 21:18:49 -05:00
Michal Privoznik
7e62c4cd26 virmacaddr: Track if MAC address is autogenerated
It will come handy to know if the MAC address was generated (e.g.
during XML parse) or if it was parsed since provided by user in
the XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2017-10-04 17:10:12 +02:00
Martin Kletzander
fcef44728d Set coalesce settings for domain interfaces
This patch makes use of the virNetDevSetCoalesce() function to make
appropriate settings effective for devices that support them.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1414627

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-04-21 13:35:04 +02:00
Laine Stump
dd8ac030fb util: add MTU arg to virNetDevTapCreateInBridgePort()
virNetDevTapCreateInBridgePort() has always set the new tap device to
the current MTU of the bridge it's being attached to. There is one
case where we will want to set the new tap device to a different
(usually larger) MTU - if that's done with the very first device added
to the bridge, the bridge's MTU will be set to the device's MTU. This
patch allows for that possibility by adding "int mtu" to the arg list
for virNetDevTapCreateInBridgePort(), but all callers are sending -1,
so it doesn't yet have any effect.

Since the requested MTU isn't necessarily what is used in the end (for
example, if there is no MTU requested, the tap device will be set to
the current MTU of the bridge), and the hypervisor may want to know
the actual MTU used, we also return the actual MTU to the caller (if
actualMTU is non-NULL).
2017-02-07 13:45:08 -05:00
Roman Bogorodskiy
a6b81d5581 bhyve: fix memory leaks in bhyvexml2argvtest
* virNetDevTapCreateInBridgePort() mock: free '*ifname' before
   strdupping a hardoded value to it
 * testCompareXMLToArgvFiles(): unref 'conn' object in cleanup
 * testCompareXMLToArgvHelper(): free 'ldargs' and 'dmargs' in
   cleanup
2016-11-15 19:07:48 +03:00
Pavel Hrdina
9ec8da9704 bhyvexml2argvmock: change int to size_t for tapfdSize
Commit c5b6a4a5 forget to update also this mock function.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-02-11 14:30:45 +01:00
Roman Bogorodskiy
d0d344cfdb bhyve: tests: fix build
Commit b20d39a introduced a new argument for the
virNetDevTapCreateInBridgePort function, however, its mock
in bhyve tests wasn't updated, so the build failed.

Fix build by adding this new argument to the mock version.
2014-09-18 13:37:12 +04:00
Roman Bogorodskiy
1994d2dddb bhyve: add xml2args unittest
At this point unittest covers 4 basic cases:

 - minimal working XML for bhyve
 - same as above, but with virtio disk
 - ACPI and APIC args test
 - MAC address test
2014-03-27 08:33:41 +04:00