Date: Fri, 20 Nov 2020 15:34:40 +0100 From: "Kristof Provost" <kp@FreeBSD.org> To: "YongHyeon PYUN" <pyunyh@gmail.com> Cc: "Carsten =?utf-8?q?B=C3=A4cker?=" <carbaecker@gmx.de>, "Hans Petter Selasky" <hps@selasky.org>, freebsd-arm@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Problem with checksum offloading on RPi3 (PF + Jails involved) Message-ID: <BE4BDA8B-A586-451D-8F4A-7A52D2A84D0B@FreeBSD.org> In-Reply-To: <20201119022208.GB1974@michelle> References: <20201103045215.GA2524@michelle> <46d08198-530c-cb4b-efa8-4edaf89471c1@selasky.org> <4dfaa9a3-c085-8466-a6e4-19f988b5ed3d@selasky.org> <e43b42e0-80fe-847a-f1bc-025b6914f98a@gmx.de> <20201116011910.GB1941@michelle> <1245cbe5-9d2f-4808-f989-569ae7d57a8a@gmx.de> <20201117030406.GA45158@michelle> <e302db94-2d16-ae06-ee76-444ac88c7c57@gmx.de> <20201118044857.GA1974@michelle> <a38b46ec-0164-2588-9f51-aa1a0aeb7e06@gmx.de> <20201119022208.GB1974@michelle>
next in thread | previous in thread | raw e-mail | index | archive | help
On 19 Nov 2020, at 3:22, YongHyeon PYUN wrote: > On Wed, Nov 18, 2020 at 10:47:08AM +0100, Carsten Bäcker wrote: > > [...] > >> Sorry, that's my fault - i overlooked your request for a test with pf >> enabled. >> The example-ruleset is attached again. I added a line to allow the >> incoming ping to 5555. >> >> I don't see a difference until i enable the redirection to the jail >> which makes the packet with extended data-length fail. >> Once i disable RXCSUM it works. >> > > Thanks for testing. Unfortunately I couldn't find a driver issue > on patched smsc(4). Quick looking pf(4) makes me wonder how it > verifies UDP datagrams. > > Kristof, does pf(4) take advantage of H/W checksummed result for > UDP datagrams? Yes. Pf updates checksums if they’re present, rather than fully recalculating them. > It seems pf_check_proto_cksum() always pass > IPPROTO_TCP such that UDP pseudo checksum is not computed in the > function. Note that pf_check_proto_cksum() is only ever called from pf_return(), and then only if pf->proto == IPPROTO_TCP. Checksum updates are mostly done through pf_proto_cksum_fixup(), in different parts of the code. Best egards, Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BE4BDA8B-A586-451D-8F4A-7A52D2A84D0B>