Port-evbmips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Network alignment and endianness



John Klos <john%ziaspace.com@localhost> writes:

> On evbmips64-eb, -current from two days ago on an EdgeRouter Lite,
> trying to ping6 the other side of a gif interface:
>
> panic: kernel diagnostic assertion "IP6_HDR_ALIGNED_P(icmp6)" failed:
> file "/usr/current/src/sys/netinet6/icmp6.c", line 485
> cpu0: Begin traceback...
> pid 268450496 not found
> cpu0: End traceback...
>
> dumping to dev 8,1 offset 1048575
> dump i/o error
>
> rebooting...
>
> This looks to be the same as this:
>
> http://mail-index.netbsd.org/port-arm/2016/10/02/msg003925.html
>
> So... What's the deal with big endian systems and alignment? Any ideas?

I'm not sure it's big endian vs stricter alignment.  Long ago, I ran
into issues where a data structure in a packet would be aligned right
(e.g. 4 byte value with two zero bits in the address) sometimes, but
sometimes, either because of some dma setup with ethernet header on some
interface, or via some encap, would end up 2 bytes off.

I think the big issue is to figure out where code should be
assuming/checking alignment, and where it should be assuming it.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index