Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8K3KjI11622 for netdev-outgoing; Wed, 19 Sep 2001 20:20:45 -0700 Received: from web11507.mail.yahoo.com (web11507.mail.yahoo.com [216.136.172.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8K3Khe11619 for ; Wed, 19 Sep 2001 20:20:43 -0700 Message-ID: <20010920032040.14252.qmail@web11507.mail.yahoo.com> Received: from [24.112.158.226] by web11507.mail.yahoo.com via HTTP; Wed, 19 Sep 2001 20:20:40 PDT Date: Wed, 19 Sep 2001 20:20:40 -0700 (PDT) From: Guilhem Tardy Subject: Re: 3c59x.c modified for time measurement / code included To: Donald Becker Cc: netdev@oss.sgi.com, andrewm@uow.edu.au, greearb@candelatech.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-netdev@oss.sgi.com Precedence: bulk Content-Length: 992 Lines: 24 > If you are accessing a 32 bit number, you should use a "naturally > aligned" address. In your previous example you were using > (int *)(base + 21) > If "base" is aligned, base+21 will be misaligned for all but byte accesses. Then I should be fine, as my original code read: *(((unsigned int *) (skb->data+20)) + 1) I was under the assumption that int was 16 bits on x86, but Rene corrected me ("int = 32Bit @ linux"). I will test the code modified with u16 first thing in the morning tomorrow. In all cases, the "+1" above refers to a pointer of unsigned int, then alignment should be OK, right? Thanks for the input. I hope not to bother anyone with that after tomorrow. :) As a last resort, I will add some heuristic to find the port number in the packet and start from there. Guilhem. __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/