Date: Tue, 2 Feb 2016 10:27:11 +0000 From: "sepherosa_gmail.com (Sepherosa Ziehau)" <phabric-noreply@FreeBSD.org> To: freebsd-net@freebsd.org Subject: [Differential] [Request, 21 lines] D5167: hyperv/hn: Move LRO flush to the channel processing rollup Message-ID: <differential-rev-PHID-DREV-ogleai2v4aflahucu2wl-req@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
--b1_bcbac81c98c0f7d73a739f38120bf5b5 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: 8bit sepherosa_gmail.com created this revision. sepherosa_gmail.com added reviewers: network, adrian, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com. sepherosa_gmail.com added a subscriber: freebsd-net-list. REVISION SUMMARY This significantly increases LRO aggregation ratio when there are large amount of connections (improves reception performance a lot). REVISION DETAIL https://reviews.freebsd.org/D5167 AFFECTED FILES sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c CHANGE DETAILS diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -764,6 +764,15 @@ netvsc_channel_rollup(struct hv_device *device_ctx) { struct hn_softc *sc = device_get_softc(device_ctx->device); +#if defined(INET) || defined(INET6) + struct lro_ctrl *lro = &sc->hn_lro; + struct lro_entry *queued; + + while ((queued = SLIST_FIRST(&lro->lro_active)) != NULL) { + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif if (!sc->hn_txeof) return; @@ -1338,18 +1347,8 @@ } void -netvsc_recv_rollup(struct hv_device *device_ctx) +netvsc_recv_rollup(struct hv_device *device_ctx __unused) { -#if defined(INET) || defined(INET6) - hn_softc_t *sc = device_get_softc(device_ctx->device); - struct lro_ctrl *lro = &sc->hn_lro; - struct lro_entry *queued; - - while ((queued = SLIST_FIRST(&lro->lro_active)) != NULL) { - SLIST_REMOVE_HEAD(&lro->lro_active, next); - tcp_lro_flush(lro, queued); - } -#endif } /* EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, adrian, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com Cc: freebsd-net-list --b1_bcbac81c98c0f7d73a739f38120bf5b5 Content-Type: text/x-patch; charset=utf-8; name="D5167.12948.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D5167.12948.patch" ZGlmZiAtLWdpdCBhL3N5cy9kZXYvaHlwZXJ2L25ldHZzYy9odl9uZXR2c2NfZHJ2X2ZyZWVic2Qu YyBiL3N5cy9kZXYvaHlwZXJ2L25ldHZzYy9odl9uZXR2c2NfZHJ2X2ZyZWVic2QuYwotLS0gYS9z eXMvZGV2L2h5cGVydi9uZXR2c2MvaHZfbmV0dnNjX2Rydl9mcmVlYnNkLmMKKysrIGIvc3lzL2Rl di9oeXBlcnYvbmV0dnNjL2h2X25ldHZzY19kcnZfZnJlZWJzZC5jCkBAIC03NjQsNiArNzY0LDE1 IEBACiBuZXR2c2NfY2hhbm5lbF9yb2xsdXAoc3RydWN0IGh2X2RldmljZSAqZGV2aWNlX2N0eCkK IHsKIAlzdHJ1Y3QgaG5fc29mdGMgKnNjID0gZGV2aWNlX2dldF9zb2Z0YyhkZXZpY2VfY3R4LT5k ZXZpY2UpOworI2lmIGRlZmluZWQoSU5FVCkgfHwgZGVmaW5lZChJTkVUNikKKwlzdHJ1Y3QgbHJv X2N0cmwgKmxybyA9ICZzYy0+aG5fbHJvOworCXN0cnVjdCBscm9fZW50cnkgKnF1ZXVlZDsKKwor CXdoaWxlICgocXVldWVkID0gU0xJU1RfRklSU1QoJmxyby0+bHJvX2FjdGl2ZSkpICE9IE5VTEwp IHsKKwkJU0xJU1RfUkVNT1ZFX0hFQUQoJmxyby0+bHJvX2FjdGl2ZSwgbmV4dCk7CisJCXRjcF9s cm9fZmx1c2gobHJvLCBxdWV1ZWQpOworCX0KKyNlbmRpZgogCiAJaWYgKCFzYy0+aG5fdHhlb2Yp CiAJCXJldHVybjsKQEAgLTEzMzgsMTggKzEzNDcsOCBAQAogfQogCiB2b2lkCi1uZXR2c2NfcmVj dl9yb2xsdXAoc3RydWN0IGh2X2RldmljZSAqZGV2aWNlX2N0eCkKK25ldHZzY19yZWN2X3JvbGx1 cChzdHJ1Y3QgaHZfZGV2aWNlICpkZXZpY2VfY3R4IF9fdW51c2VkKQogewotI2lmIGRlZmluZWQo SU5FVCkgfHwgZGVmaW5lZChJTkVUNikKLQlobl9zb2Z0Y190ICpzYyA9IGRldmljZV9nZXRfc29m dGMoZGV2aWNlX2N0eC0+ZGV2aWNlKTsKLQlzdHJ1Y3QgbHJvX2N0cmwgKmxybyA9ICZzYy0+aG5f bHJvOwotCXN0cnVjdCBscm9fZW50cnkgKnF1ZXVlZDsKLQotCXdoaWxlICgocXVldWVkID0gU0xJ U1RfRklSU1QoJmxyby0+bHJvX2FjdGl2ZSkpICE9IE5VTEwpIHsKLQkJU0xJU1RfUkVNT1ZFX0hF QUQoJmxyby0+bHJvX2FjdGl2ZSwgbmV4dCk7Ci0JCXRjcF9scm9fZmx1c2gobHJvLCBxdWV1ZWQp OwotCX0KLSNlbmRpZgogfQogCiAvKgoK --b1_bcbac81c98c0f7d73a739f38120bf5b5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-ogleai2v4aflahucu2wl-req>