Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 11:23:41 +0000
From:      "aleksandr.fedorov_itglobal.com (Aleksandr Fedorov)" <phabric-noreply@FreeBSD.org>
To:        Phabricator <phabric-noreply@FreeBSD.org>
Cc:        freebsd-virtualization@freebsd.org
Subject:   [Differential] D20276: [bhyve][virtio-net] Allow guest VM's to set JUMBO MTU in case of using the VALE switch.
Message-ID:  <differential-rev-PHID-DREV-pueoqfdkfh54jyuh6emz-req@reviews.freebsd.org>

next in thread | raw e-mail | index | archive | help

--b1_de8aae4aa4571650bb57800da37870f1
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: base64

YWxla3NhbmRyLmZlZG9yb3ZfaXRnbG9iYWwuY29tIGNyZWF0ZWQgdGhpcyByZXZpc2lvbi4KYWxl
a3NhbmRyLmZlZG9yb3ZfaXRnbG9iYWwuY29tIGFkZGVkIHJldmlld2VyczogYmh5dmUsIGpoYiwg
cmdyaW1lcywga3Jpb24sIHYubWFmZmlvbmVfZ21haWwuY29tLgpIZXJhbGQgYWRkZWQgYSBzdWJz
Y3JpYmVyOiBiY3Jhbi4KClJFVklTSU9OIFNVTU1BUlkKICDQoXVycmVudCBpbXBsZW1lbnRhdGlv
biBvZiB0aGUgdmlydGlvLW5ldCBiYWNrZW5kIGRvZXNuJ3QgYWxsb3cgdG8gdHJhbnNmZXIgb2Yg
cGFja2V0cyBsYXJnZXIgdGhhbiB0aGUgbmV0bWFwKDQpIGJ1ZmZlciBzaXplICgyMDQ4KSBvciBt
YXhpbXVtIGd1ZXN0IGRlc2NyaXB0b3Igc2l6ZSBmb3IgdGFwKDQpIGNhc2UuIFRoZSByZWFzb24g
aXMgdGhhdCB0aGVyZSBpcyBubyBzdXBwb3J0IGZvciBtZXJnZS1hYmxlIGJ1ZmZlcnMgKFZJUlRJ
T19ORVRfRl9NUkdfUlhCVUYgaW4gdmlydGlvIHNwZWNpZmljYXRpb25zKS4gU2VlIFBSOiAyMTU3
MzcgVGhpc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LjE0IEdiaXRzL3NlYwogIE1U
VSA5MDAwLiBWTSAtIHZpcnRpby1uZXQgLSBWQUxFIC0gdmlydGlvLW5ldCAtIFZNOiA0LjgwIEdi
aXRzL3NlYwogIE1UVSAxNjAwMC4gVk0gLSB2aXJ0aW8tbmV0IC0gVkFMRSAtIHZpcnRpby1uZXQg
LSBWTTogNy4yNSBHYml0cy9zZWMKICBNVFUgMzIwMDAuIFZNIC0gdmlydGlvLW5ldCAtIFZBTEUg
LSB2aXJ0aW8tbmV0IC0gVk06IDEyLjggR2JpdHMvc2VjCiAgTVRVIDY0MDAwLiBWTSAtIHZpcnRp
by1uZXQgLSBWQUxFIC0gdmlydGlvLW5ldCAtIFZNOiAxMy4zIEdiaXRzL3NlYwoKUkVWSVNJT04g
REVUQUlMCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL0QyMDI3NgoKQUZGRUNURUQgRklM
RVMKICB1c3Iuc2Jpbi9iaHl2ZS9wY2lfdmlydGlvX25ldC5jCgpFTUFJTCBQUkVGRVJFTkNFUwog
IGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9zZXR0aW5ncy9wYW5lbC9lbWFpbHByZWZlcmVu
Y2VzLwoKVG86IGFsZWtzYW5kci5mZWRvcm92X2l0Z2xvYmFsLmNvbSwgI2JoeXZlLCBqaGIsIHJn
cmltZXMsIGtyaW9uLCB2Lm1hZmZpb25lX2dtYWlsLmNvbQpDYzogZnJlZWJzZC12aXJ0dWFsaXph
dGlvbi1saXN0LCBldmd1ZW5pLmdhdnJpbG92X2l0Z2xvYmFsLmNvbSwgYmNyYW4K

--b1_de8aae4aa4571650bb57800da37870f1
Content-Type: text/x-patch; charset=utf-8; name="D20276.57439.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="D20276.57439.patch"

ZGlmZiAtLWdpdCBhL3Vzci5zYmluL2JoeXZlL3BjaV92aXJ0aW9fbmV0LmMgYi91c3Iuc2Jpbi9i
aHl2ZS9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lZCByeCBidWZzIHdl
cmUgbmVnb3RpYXRlZC4KLQkJICovCi0JCW1lbXNldCh2cngsIDAsIHNjLT5yeF92aGRybGVuKTsK
LQogCQlpZiAoc2MtPnJ4X21lcmdlKSB7Ci0JCQlzdHJ1Y3QgdmlydGlvX25ldF9yeGhkciAqdnJ4
aDsKLQotCQkJdnJ4aCA9IHZyeDsKLQkJCXZyeGgtPnZyaF9idWZzID0gMTsKKwkJCXN0cnVjdCB2
aXJ0aW9fbmV0X3J4aGRyICp2cnhoID0gaW92WzBdLmlvdl9iYXNlOworCQkJbWVtc2V0KHZyeGgs
IDAsIHNjLT5yeF92aGRybGVuKTsKKwkJCXZyeGgtPnZyaF9idWZzID0gbjsKIAkJfQogCi0JCS8q
Ci0JCSAqIFJlbGVhc2UgdGhpcyBjaGFpbiBhbmQgaGFuZGxlIG1vcmUgY2hhaW5zLgotCQkgKi8K
LQkJdnFfcmVsY2hhaW4odnEsIGlkeCwgbGVuICsgc2MtPnJ4X3ZoZHJsZW4pOworCQlyaW92ID0g
cnhfaW92X3RyaW0oaW92LCAmbiwgc2MtPnJ4X3ZoZHJsZW4pOworCisJCSh2b2lkKXBjaV92dG5l
dF9uZXRtYXBfcmVhZHYoc2MtPnZzY19ubWQsIHJpb3YsIG4sIGxlbik7CisKKwkJdXNlZCArPSBu
OworCiAJfSB3aGlsZSAodnFfaGFzX2Rlc2NzKHZxKSk7CiAKLQkvKiBJbnRlcnJ1cHQgaWYgbmVl
ZGVkLCBpbmNsdWRpbmcgZm9yIE5PVElGWV9PTl9FTVBUWS4gKi8KKwl2cV9pbmNfdXNlZF9pZHhf
YW5kX2xhc3RfYXZhaWwodnEsIHVzZWQpOwogCXZxX2VuZGNoYWlucyh2cSwgMSk7CisKKwlyZXR1
cm47CiB9CiAKIHN0YXRpYyB2b2lkCgo=


--b1_de8aae4aa4571650bb57800da37870f1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-pueoqfdkfh54jyuh6emz-req>