[dtrace-discuss] Help required on invalid alignment - dtrace !

James Carlson
Wed, 13 Jun 2007 16:43:52 -0000

Lenin Lakshminarayanan -X (lelakshm - HCL at Cisco)
writes:
>         self->iphdr = (ipha_t *)((char
*)self->mp->b_rptr+sizeof(struct
> ether_header));

You''re assuming that b_rptr + 14 is 4-byte aligned.  It might not be.

You''re also assuming that b_rptr + 14 + 20 is less than or equal to
b_wptr.  It might not be.

> Can someone please clarify what''s wrong ? Does this mean that the
mblk_t
> coming to the bge driver is malformed ?

No.  Just not necessarily aligned as your script is assuming.

--
James Carlson, Solaris Networking              <james.d.carlson at
sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677