> On Tue, Jul 29, 2008 at 06:44:08PM +0100, David Edmondson wrote:
> > I'd like reviewers for:
> >
> > 6639676 xnb should use hardware partial checksum offload if it is available
> > 6649354 xnf sends bad checksum on small IPv6 packets (PV domU)
> >
> > Webrev is at http://dme.org/solaris/webrev/6649354/
>
> I updated this slightly to avoid the need to declare a flag day.
In xnb.c, line 361..363: is that assert correct? It should be OK if we
get a cksum > 0xFFFF after adding the high & low 16 bits at
line 361.
Before the assert, another
|cksum = (cksum >> 16) + (cksum & 0xFFFF);| is
needed.
357 cksum += (dst >> 16) + (dst & 0xFFFF);
358 cksum += (src >> 16) + (src & 0xFFFF);
359 cksum += length - IP_SIMPLE_HDR_LENGTH;
360
361 cksum = (cksum >> 16) + (cksum & 0xFFFF);
362
363 ASSERT(cksum <= 0xFFFF);
The above code should trigger the assert with:
dst ip: 255.255.255.255
src ip: 10.235.244.240
proto: 6
len: 32
ffff+ffff+aeb+f4f0+6+20=X
2ffff
With such a packet it should compute
checksum as 0x10001, after line 361.
And a debug kernel would crash at line 363.
This message posted from opensolaris.org
_______________________________________________
xen-discuss mailing list
[email protected]