Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2018 17:43:13 +0200
From:      "Dries Michiels" <driesm.michiels@gmail.com>
To:        "'Andrey V. Elsukov'" <bu7cher@yandex.ru>, <freebsd-net@freebsd.org>
Subject:   RE: kernel: in6_delayed_cksum: delayed m_pullup
Message-ID:  <012401d3e875$9bd23a60$d376af20$@gmail.com>
In-Reply-To: <008101d3e86f$584fb930$08ef2b90$@gmail.com>
References:  <5ae60f44.1c69fb81.ee4a5.1043@mx.google.com> <c4953cdd-faf9-21ac-1b1b-2fba817d0a2c@yandex.ru> <f537f8b4-07ad-8202-a17d-8b4a71aabe93@yandex.ru> <008101d3e86f$584fb930$08ef2b90$@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multipart message in MIME format.

------=_NextPart_000_0125_01D3E886.5F5BA6A0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> -----Original Message-----
> From: Dries Michiels <driesm.michiels@gmail.com>
> Sent: donderdag 10 mei 2018 16:58
> To: 'Andrey V. Elsukov' <bu7cher@yandex.ru>; freebsd-net@freebsd.org
> Subject: RE: kernel: in6_delayed_cksum: delayed m_pullup
>=20
> > -----Original Message-----
> > From: Andrey V. Elsukov <bu7cher@yandex.ru>
> > Sent: donderdag 10 mei 2018 16:34
> > To: Dries Michiels <driesm.michiels@gmail.com>;
> > freebsd-net@freebsd.org
> > Subject: Re: kernel: in6_delayed_cksum: delayed m_pullup
> >
> > On 10.05.2018 17:25, Andrey V. Elsukov wrote:
> > > On 29.04.2018 21:30, Dries Michiels wrote:
> > >> Dear mailing list,
> > >>
> > >> After upgrading my FreeBSD server from source from:
> > >> FreeBSD 11.1-STABLE (VADOS) #9 r331859: Sun Apr  1 12:09:18 CEST
> > >> 2018 to FreeBSD 11.2-PRERELEASE (VADOS) #10 r333091: Sun Apr 29
> > >> 16:48:44 CEST 2018
> > >>
> > >> My /var/log/messages is getting spammed by the following
> notice/error:
> > >> Apr 29 19:51:42 vados kernel: in6_delayed_cksum: delayed =
m_pullup,
> > >> m->len: 48 plen 68 off 56 csum_flags=3D400<CSUM_IP6_TCP> Apr 29
> > >> 19:55:34 vados last message repeated 11 times Apr 29 20:11:56 =
vados
> > >> last message repeated 10 times Apr 29 20:12:42 vados last message
> > >> repeated 4 times
> > >>
> > >> Does anyone have a clue what this indicates?
> > >> I did not have this message on my older system (r331859).
> > >
> > > Do you use pf(4) or ipsec(4)?
>=20
> I use IPFW as firewall. Due to log file spamming I had disabled ipv6.
> I will enable it again and check if error message is still present.
> If so I will try the patch you provided. Thanks in advance!
> > Also, can you try this patch?
> >
> > --
> > WBR, Andrey V. Elsukov

Ok error has returned:
May 10 17:31:39 vados kernel: in6_delayed_cksum: delayed m_pullup, =
m->len: 48 plen 68 off 56 csum_flags=3D400<CSUM_IP6_TCP>
May 10 17:31:53 vados last message repeated 3 times

I'll apply the patch and rebuild from source to give an update later.

Dries

------=_NextPart_000_0125_01D3E886.5F5BA6A0
Content-Type: application/octet-stream;
	name="in6_delayed_cksum.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="in6_delayed_cksum.diff"

Index: sys/netinet6/ip6_output.c
===================================================================
--- sys/netinet6/ip6_output.c	(revision 333460)
+++ sys/netinet6/ip6_output.c	(working copy)
@@ -199,18 +199,10 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u
 		csum = 0xffff;
 	offset += m->m_pkthdr.csum_data;	/* checksum offset */
 
-	if (offset + sizeof(u_short) > m->m_len) {
-		printf("%s: delayed m_pullup, m->len: %d plen %u off %u "
-		    "csum_flags=%b\n", __func__, m->m_len, plen, offset,
-		    (int)m->m_pkthdr.csum_flags, CSUM_BITS);
-		/*
-		 * XXX this should not happen, but if it does, the correct
-		 * behavior may be to insert the checksum in the appropriate
-		 * next mbuf in the chain.
-		 */
-		return;
-	}
-	*(u_short *)(m->m_data + offset) = csum;
+	if (offset + sizeof(csum) > m->m_len)
+		m_copyback(m, offset, sizeof(csum), (caddr_t)&csum);
+	else
+		*(u_short *)mtodo(m, offset) = csum;
 }
 
 int

------=_NextPart_000_0125_01D3E886.5F5BA6A0--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?012401d3e875$9bd23a60$d376af20$>