]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Set coalesce settings for domain interfaces
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 7 Apr 2017 15:54:12 +0000 (17:54 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 21 Apr 2017 11:35:04 +0000 (13:35 +0200)
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>
src/bhyve/bhyve_command.c
src/network/bridge_driver.c
src/qemu/qemu_interface.c
src/uml/uml_conf.c
src/util/virnetdevtap.c
src/util/virnetdevtap.h
tests/bhyvexml2argvmock.c

index e0528ed77a2c0259de5282b8c56c62bf4ef2f0b5..e9c072b9f57862940ad7a8f70d7213cfa5871118 100644 (file)
@@ -100,7 +100,7 @@ bhyveBuildNetArgStr(virConnectPtr conn,
                                            def->uuid, NULL, NULL, 0,
                                            virDomainNetGetActualVirtPortProfile(net),
                                            virDomainNetGetActualVlan(net),
-                                           0, NULL,
+                                           NULL, 0, NULL,
                                            VIR_NETDEV_TAP_CREATE_IFUP | VIR_NETDEV_TAP_CREATE_PERSIST) < 0) {
             goto cleanup;
         }
index 45abe16964b81e3b168ca412e523e4f4f78fd725..d2d8557d280dc7693775322d2726e042dcc0f3e6 100644 (file)
@@ -2311,7 +2311,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
         if (virNetDevTapCreateInBridgePort(network->def->bridge,
                                            &macTapIfName, &network->def->mac,
                                            NULL, NULL, &tapfd, 1, NULL, NULL,
-                                           network->def->mtu, NULL,
+                                           NULL, network->def->mtu, NULL,
                                            VIR_NETDEV_TAP_CREATE_USE_MAC_FOR_BRIDGE |
                                            VIR_NETDEV_TAP_CREATE_IFUP |
                                            VIR_NETDEV_TAP_CREATE_PERSIST) < 0) {
index c5dca60f1f654dfbff2335469f3bce87791f4707..2057ac9293f2159742898dbc248b99f9d42567c5 100644 (file)
@@ -545,7 +545,7 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
                                            def->uuid, tunpath, tapfd, *tapfdSize,
                                            virDomainNetGetActualVirtPortProfile(net),
                                            virDomainNetGetActualVlan(net),
-                                           net->mtu, mtu,
+                                           net->coalesce, net->mtu, mtu,
                                            tap_create_flags) < 0) {
             virDomainAuditNetDevice(def, net, tunpath, false);
             goto cleanup;
index 871653c5a64c9d8f793c55f07d055a62a242b8d9..bdef7832438575d8c62d52349357835ad4dd8e9d 100644 (file)
@@ -125,7 +125,7 @@ umlConnectTapDevice(virDomainDefPtr vm,
                                        vm->uuid, net->backend.tap, &tapfd, 1,
                                        virDomainNetGetActualVirtPortProfile(net),
                                        virDomainNetGetActualVlan(net),
-                                       0, NULL,
+                                       NULL, 0, NULL,
                                        VIR_NETDEV_TAP_CREATE_IFUP |
                                        VIR_NETDEV_TAP_CREATE_PERSIST) < 0) {
         if (template_ifname)
index 93002b9294c9c31197a2945e4e8a847405fd30d4..c8dacfe27b94cdf1bbf96c26b2d3cfe21b0f645f 100644 (file)
@@ -584,6 +584,7 @@ virNetDevTapAttachBridge(const char *tapname,
  * @tapfd: array of file descriptor return value for the new tap device
  * @tapfdSize: number of file descriptors in @tapfd
  * @virtPortProfile: bridge/port specific configuration
+ * @coalesce: optional coalesce parameters
  * @mtu: requested MTU for port (or 0 for "default")
  * @actualMTU: MTU actually set for port (after accounting for bridge's MTU)
  * @flags: OR of virNetDevTapCreateFlags:
@@ -616,6 +617,7 @@ int virNetDevTapCreateInBridgePort(const char *brname,
                                    size_t tapfdSize,
                                    virNetDevVPortProfilePtr virtPortProfile,
                                    virNetDevVlanPtr virtVlan,
+                                   virNetDevCoalescePtr coalesce,
                                    unsigned int mtu,
                                    unsigned int *actualMTU,
                                    unsigned int flags)
@@ -661,6 +663,9 @@ int virNetDevTapCreateInBridgePort(const char *brname,
     if (virNetDevSetOnline(*ifname, !!(flags & VIR_NETDEV_TAP_CREATE_IFUP)) < 0)
         goto error;
 
+    if (virNetDevSetCoalesce(*ifname, coalesce) < 0)
+        goto error;
+
     return 0;
 
  error:
index 311f0698b155dea401c82d244dfa1ec0a7f9846c..0b17feb8d94d0306598f8de8247fca251c235ade 100644 (file)
@@ -24,6 +24,7 @@
 # define __VIR_NETDEV_TAP_H__
 
 # include "internal.h"
+# include "virnetdev.h"
 # include "virnetdevvportprofile.h"
 # include "virnetdevvlan.h"
 
@@ -83,6 +84,7 @@ int virNetDevTapCreateInBridgePort(const char *brname,
                                    size_t tapfdSize,
                                    virNetDevVPortProfilePtr virtPortProfile,
                                    virNetDevVlanPtr virtVlan,
+                                   virNetDevCoalescePtr coalesce,
                                    unsigned int mtu,
                                    unsigned int *actualMTU,
                                    unsigned int flags)
index fd714694f0bde305addb881862d259ff8ce7be6b..7afa0e34c43ca0ff6f8cecccfb4ca5a402fccd27 100644 (file)
@@ -28,6 +28,7 @@ int virNetDevTapCreateInBridgePort(const char *brname ATTRIBUTE_UNUSED,
                                    size_t tapfdSize ATTRIBUTE_UNUSED,
                                    virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
                                    virNetDevVlanPtr virtVlan ATTRIBUTE_UNUSED,
+                                   virNetDevCoalescePtr coalesce ATTRIBUTE_UNUSED,
                                    unsigned int mtu ATTRIBUTE_UNUSED,
                                    unsigned int *actualMTU ATTRIBUTE_UNUSED,
                                    unsigned int fakeflags ATTRIBUTE_UNUSED)