Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2015 13:51:28 +0000
From:      "hselasky (Hans Petter Selasky)" <phabric-noreply@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   [Differential] [Updated, 87 lines] D1761: Extend LRO support to accumulate more than 65535 bytes
Message-ID:  <f7e9182c216193742db0a3516da431bc@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-wifan4aus5qtbwh2gnxc-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-wifan4aus5qtbwh2gnxc-req@FreeBSD.org>

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

--b1_f7e9182c216193742db0a3516da431bc
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

hselasky updated this revision to Diff 5720.
hselasky added a comment.
Herald added a subscriber: imp.

Minor fix for computing correct ip6_plen in ip6_input().
Previously only the first 64K of the payload was consumed.


REPOSITORY
  rS FreeBSD src repository

CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D1761?vs=3630&id=5720

REVISION DETAIL
  https://reviews.freebsd.org/D1761

AFFECTED FILES
  sys/conf/options
  sys/netinet/ip_input.c
  sys/netinet/ip_output.c
  sys/netinet/tcp_input.c
  sys/netinet/tcp_lro.c
  sys/netinet6/ip6_input.c
  sys/sys/mbuf.h

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, imp, np, jfv, adrian
Cc: imp, freebsd-net

--b1_f7e9182c216193742db0a3516da431bc
Content-Type: text/x-patch; charset=utf-8; name="D1761.5720.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="D1761.5720.patch"

ZGlmZiAtLWdpdCBhL3N5cy9zeXMvbWJ1Zi5oIGIvc3lzL3N5cy9tYnVmLmgKLS0tIGEvc3lzL3N5
cy9tYnVmLmgKKysrIGIvc3lzL3N5cy9tYnVmLmgKQEAgLTMwNiw2ICszMDYsNyBAQAogI2RlZm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JaWYgKGlhICE9IE5VTEwpCiAJCQkJbXR1
ID0gaWEtPmlhX2lmcC0+aWZfbXR1OwogCQkJZWxzZQotCQkJCW10dSA9IGlwX25leHRfbXR1KG50
b2hzKGlwLT5pcF9sZW4pLCAwKTsKKwkJCQltdHUgPSBpcF9uZXh0X210dShpcF9sZW4sIDApOwog
CQl9CiAJCUlQU1RBVF9JTkMoaXBzX2NhbnRmcmFnKTsKIAkJYnJlYWs7CmRpZmYgLS1naXQgYS9z
eXMvY29uZi9vcHRpb25zIGIvc3lzL2NvbmYvb3B0aW9ucwotLS0gYS9zeXMvY29uZi9vcHRpb25z
CisrKyBiL3N5cy9jb25mL29wdGlvbnMKQEAgLTQwMiw2ICs0MDIsOCBAQAogRFVNTVlORVQJCW9w
dF9pcGRuLmgKIElORVQJCQlvcHRfaW5ldC5oCiBJTkVUNgkJCW9wdF9pbmV0Ni5oCitMUk9fRU5U
UklFUwkJb3B0X2xyby5oCitMUk9fUEFZTE9BRF9NQVgJCW9wdF9scm8uaAogSVBESVZFUlQKIElQ
RklMVEVSCQlvcHRfaXBmaWx0ZXIuaAogSVBGSUxURVJfREVGQVVMVF9CTE9DSwlvcHRfaXBmaWx0
ZXIuaAoK


--b1_f7e9182c216193742db0a3516da431bc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f7e9182c216193742db0a3516da431bc>