diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2014-01-29 18:38:54 +0100 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2014-01-29 19:01:19 +0100 |
commit | 122cd16982b30dfd54731dd9f353e54f0e5628b8 (patch) | |
tree | 4de61a26f807c19369b946b6a76723b5c0393940 /tests/virnetdevbandwidthtest.c | |
parent | 7bcbb53e18e02605a56b2b64ecf041f9df7a75a5 (diff) | |
download | libvirt-122cd16982b30dfd54731dd9f353e54f0e5628b8.tar.gz |
Revert "networkAllocateActualDevice: Set QoS for bridgeless networks too"
This reverts commit 2996e6be19a13199ded7c2aa21039cca97318e01
and some parts of 2636dc8c4de83cd37bc0680a6fbc3f6d25023bd7.
The former one tried to implement QoS setting on bridgeless networks.
However, as discussed upstream [1], the patch is far away from being
useful in even a single case. The whole idea of network QoS is to have
aggregated limits over several interfaces. This patch is doing
completely the opposite when merging two QoS settings (from the network
and the domain interface) into one which is then set at the domain
interface itself, not the network.
The latter one is the test for the previous one. Now none of them makes
sense.
1: https://www.redhat.com/archives/libvir-list/2014-January/msg01441.html
Conflicts:
tests/virnetdevbandwidthtest.c: New test has been introduced since
then.
Diffstat (limited to 'tests/virnetdevbandwidthtest.c')
-rw-r--r-- | tests/virnetdevbandwidthtest.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 345a0dd61a..609deb80d1 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -62,56 +62,6 @@ struct testSetStruct { } while (0) static int -testVirNetDevBandwidthMinimal(const void *data) -{ - int ret = -1; - const struct testMinimalStruct *info = data; - virNetDevBandwidthPtr expected_result = NULL, result = NULL, - band1 = NULL, band2 = NULL; - - - /* Parse given XMLs */ - PARSE(info->expected_result, expected_result); - PARSE(info->band1, band1); - PARSE(info->band2, band2); - - if (virNetDevBandwidthMinimal(&result, band1, band2) < 0) - goto cleanup; - - if (!virNetDevBandwidthEqual(expected_result, result)) { - virBuffer exp_buf = VIR_BUFFER_INITIALIZER, - res_buf = VIR_BUFFER_INITIALIZER; - char *exp = NULL, *res = NULL; - - fprintf(stderr, "expected_result != result"); - - if (virNetDevBandwidthFormat(expected_result, &exp_buf) < 0 || - virNetDevBandwidthFormat(result, &res_buf) < 0 || - !(exp = virBufferContentAndReset(&exp_buf)) || - !(res = virBufferContentAndReset(&res_buf))) { - fprintf(stderr, "Failed to fail"); - virBufferFreeAndReset(&exp_buf); - virBufferFreeAndReset(&res_buf); - VIR_FREE(exp); - VIR_FREE(res); - goto cleanup; - } - - virtTestDifference(stderr, exp, res); - VIR_FREE(exp); - VIR_FREE(res); - } - - ret = 0; -cleanup: - virNetDevBandwidthFree(expected_result); - virNetDevBandwidthFree(result); - virNetDevBandwidthFree(band1); - virNetDevBandwidthFree(band2); - return ret; -} - -static int testVirNetDevBandwidthSet(const void *data) { int ret = -1; @@ -159,15 +109,6 @@ mymain(void) { int ret = 0; -#define DO_TEST_MINIMAL(r, ...) \ - do { \ - struct testMinimalStruct data = {r, __VA_ARGS__}; \ - if (virtTestRun("virNetDevBandwidthMinimal", \ - testVirNetDevBandwidthMinimal, \ - &data) < 0) \ - ret = -1; \ - } while (0) - #define DO_TEST_SET(Band, Exp_cmd, ...) \ do { \ struct testSetStruct data = {.band = Band, \ @@ -180,38 +121,6 @@ mymain(void) } while (0) - DO_TEST_MINIMAL(NULL, NULL, NULL); - - DO_TEST_MINIMAL("<bandwidth>" - " <inbound average='1000' peak='5000' burst='5120'/>" - " <outbound average='128' peak='256' burst='256'/>" - "</bandwidth>", - .band1 = "<bandwidth>" - " <inbound average='1000' peak='5000' burst='5120'/>" - " <outbound average='128' peak='256' burst='256'/>" - "</bandwidth>"); - - DO_TEST_MINIMAL("<bandwidth>" - " <inbound average='1000' peak='5000' burst='5120'/>" - " <outbound average='128' peak='256' burst='256'/>" - "</bandwidth>", - .band2 = "<bandwidth>" - " <inbound average='1000' peak='5000' burst='5120'/>" - " <outbound average='128' peak='256' burst='256'/>" - "</bandwidth>"); - DO_TEST_MINIMAL("<bandwidth>" - " <inbound average='1' peak='2' floor='3' burst='4'/>" - " <outbound average='5' peak='6' burst='7'/>" - "</bandwidth>", - "<bandwidth>" - " <inbound average='1' peak='2' burst='4'/>" - " <outbound average='0' burst='7'/>" - "</bandwidth>", - "<bandwidth>" - " <inbound average='1' peak='2' floor='3'/>" - " <outbound average='5' peak='6'/>" - "</bandwidth>"); - DO_TEST_SET(("<bandwidth>" " <inbound average='1' peak='2' floor='3' burst='4'/>" " <outbound average='5' peak='6' burst='7'/>" |