RE: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-11 Thread Dries Michiels
>> From: Dries Michiels <driesm.michi...@gmail.com>
>> Sent: donderdag 10 mei 2018 17:43
>> To: 'Andrey V. Elsukov' <bu7c...@yandex.ru>; freebsd-net@freebsd.org
>> Subject: RE: kernel: in6_delayed_cksum: delayed m_pullup
>> > 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=400 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.

Patch applied fine, rebuilded world and kernel and installed both without any 
errors. 
IPV6 performance is the same as before (maxing out my upstream connection in a 
speedtest).
And no more errors! But, couldn’t get any as its not in the code anymore after 
the patch.
Is this a patch that could get committed in STABLE?
Is there anything else I can test with respect to this patch?

> 
> Dries

___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


RE: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Dries Michiels
> -Original Message-
> From: Dries Michiels <driesm.michi...@gmail.com>
> Sent: donderdag 10 mei 2018 16:58
> To: 'Andrey V. Elsukov' <bu7c...@yandex.ru>; freebsd-net@freebsd.org
> Subject: RE: kernel: in6_delayed_cksum: delayed m_pullup
> 
> > -Original Message-
> > From: Andrey V. Elsukov <bu7c...@yandex.ru>
> > Sent: donderdag 10 mei 2018 16:34
> > To: Dries Michiels <driesm.michi...@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=400 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)?
> 
> 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=400
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


in6_delayed_cksum.diff
Description: Binary data
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Alexander Zagrebin
В Thu, 10 May 2018 16:56:38 +0200
"Dries Michiels" <driesm.michi...@gmail.com> пишет:

> I had updated the day after to see if it was just a regression but
> the error message was not gone: May  1 22:19:51 vados kernel:
> in6_delayed_cksum: delayed m_pullup, m->len: 48 plen 68 off 56
> csum_flags=400 May  1 22:27:57 vados last message
> repeated 29 times May  1 22:36:53 vados last message repeated 17
> times May  1 22:49:41 vados last message repeated 6 times May  1
> 23:00:09 vados last message repeated 8 times May  1 23:01:06 vados
> last message repeated 7 times May  1 23:18:05 vados last message
> repeated 12 times For this reason I had disabled IPV6 for my LAN
> clients (disabled rtadvd). My server was still ipv6 reachable and
> error messages where gone.

I've observed such messages when ipv6 packets was passed via ipv4 NAT.
After changing ipfw rule from (for example)
nat 1 ip from any to me in via re1
to
nat 1 ipv4 from any to me in via re1
this messages has gone.
 
-- 
Alexander Zagrebin
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


RE: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Dries Michiels
> -Original Message-
> From: Andrey V. Elsukov <bu7c...@yandex.ru>
> Sent: donderdag 10 mei 2018 16:34
> To: Dries Michiels <driesm.michi...@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=400 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)?

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

___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


RE: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Dries Michiels
> -Original Message-
> From: Tom Jones <t...@freebsd.org>
> Sent: donderdag 10 mei 2018 15:48
> To: Dries Michiels <driesm.michi...@gmail.com>
> Cc: freebsd-net@freebsd.org
> Subject: Re: kernel: in6_delayed_cksum: delayed m_pullup
> 
> On Mon, Apr 30, 2018 at 09:54:48AM +0200, Dries Michiels wrote:
> >
> > Tom,
> >
> > I’m using the igb (intel I210) driver for my LAN interface and the em
> > (intel I219-V) driver for the WAN interface.  I use this FreeBSD box
> > as my home server so I wouldn’t say that it has a heavy ipv6 workload.
> >
> 
> Hi Dries,
> 
> Does this bug persist on later snapshots? Or have you stayed with the same
> one from the original question?

I had updated the day after to see if it was just a regression but the error 
message was not gone:
May  1 22:19:51 vados kernel: in6_delayed_cksum: delayed m_pullup, m->len: 48 
plen 68 off 56 csum_flags=400
May  1 22:27:57 vados last message repeated 29 times
May  1 22:36:53 vados last message repeated 17 times
May  1 22:49:41 vados last message repeated 6 times
May  1 23:00:09 vados last message repeated 8 times
May  1 23:01:06 vados last message repeated 7 times
May  1 23:18:05 vados last message repeated 12 times
For this reason I had disabled IPV6 for my LAN clients (disabled rtadvd).
My server was still ipv6 reachable and error messages where gone.

> Could you send me the ifconfig flags lines for igb0 and em0?
> 
> like this
> 
> $ ifconfig em0
> em0:
> flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST>
> metric 0 mtu 1500
>   options=40098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VL
> AN_HWTSO>
> 
> $ ifconfig igb0
> igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0
> mtu 1500
> 
> options=6403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMB
> O_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM
> _IPV6>

ifconfig flags of my interfaces shown below.
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: WAN

options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: LAN

options=6403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>

> My em interfaces don't have flags for ipv6 checksum offload, I suspect the
> issue is from the em side of your network.
> 
> I have tried moving 100GB of v6 tcp through each interface with iperf3 to see
> if I could stimulate the bug, but no luck so far. I will leave the test box 
> sitting
> exposed to my network for a while.
> 
> - [tj]

___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Andrey V. Elsukov
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=400
>> 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)?

Also, can you try this patch?

-- 
WBR, Andrey V. Elsukov
Index: sys/netinet6/ip6_output.c
===
--- sys/netinet6/ip6_output.c	(revision 333456)
+++ sys/netinet6/ip6_output.c	(working copy)
@@ -199,18 +199,10 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u
 		csum = 0x;
 	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), );
+	else
+		*(u_short *)mtodo(m, offset) = csum;
 }
 
 int


signature.asc
Description: OpenPGP digital signature


Re: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Andrey V. Elsukov
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=400
> 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)?

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: kernel: in6_delayed_cksum: delayed m_pullup

2018-05-10 Thread Tom Jones
On Mon, Apr 30, 2018 at 09:54:48AM +0200, Dries Michiels wrote:
> 
> Tom,
> 
> I’m using the igb (intel I210) driver for my LAN interface and the em
> (intel I219-V) driver for the WAN interface.  I use this FreeBSD box
> as my home server so I wouldn’t say that it has a heavy ipv6 workload.
> 

Hi Dries,

Does this bug persist on later snapshots? Or have you stayed with the
same one from the original question?

Could you send me the ifconfig flags lines for igb0 and em0?

like this

$ ifconfig em0
em0: flags=8943 metric 0 mtu 
1500
options=40098

$ ifconfig igb0
igb0: flags=8843 metric 0 mtu 1500

options=6403bb
 


My em interfaces don't have flags for ipv6 checksum offload, I suspect
the issue is from the em side of your network. 

I have tried moving 100GB of v6 tcp through each interface with iperf3
to see if I could stimulate the bug, but no luck so far. I will leave
the test box sitting exposed to my network for a while.

- [tj]
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


RE: kernel: in6_delayed_cksum: delayed m_pullup

2018-04-30 Thread Dries Michiels

Tom,

I’m using the igb (intel I210) driver for my LAN interface and the em (intel 
I219-V) driver for the WAN interface.
I use this FreeBSD box as my home server so I wouldn’t say that it has a heavy 
ipv6 workload.

Regards,
Dries

From: Tom Jones
Sent: zondag 29 april 2018 21:05
To: Dries Michiels
Cc: freebsd-net@freebsd.org
Subject: Re: kernel: in6_delayed_cksum: delayed m_pullup

On Sun, Apr 29, 2018 at 08:30:28PM +0200, 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=400
> 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?

An error it seems:

 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;
 }

> I did not have this message on my older system (r331859).

What network hardware are you using? 

Do you have a heavy ipv6 workload that might be a source?

- [tj]

___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kernel: in6_delayed_cksum: delayed m_pullup

2018-04-29 Thread Tom Jones
On Sun, Apr 29, 2018 at 08:30:28PM +0200, 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=400
> 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?

An error it seems:

 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;
 }

> I did not have this message on my older system (r331859).

What network hardware are you using? 

Do you have a heavy ipv6 workload that might be a source?

- [tj]
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


kernel: in6_delayed_cksum: delayed m_pullup

2018-04-29 Thread Dries Michiels
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=400
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).

Thanks in advance,
Dries
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"