From: "kalash nainwal" <kalash.nainwal@gmail.com>
To: "David Miller" <davem@davemloft.net>
Cc: bshanth@gmail.com, netdev@vger.kernel.org
Subject: Re: ip_finish_outpu2 question
Date: Wed, 14 May 2008 14:17:58 +0530 [thread overview]
Message-ID: <416aa1ad0805140147m2efff9b1v6a5f8c3d0ee701c6@mail.gmail.com> (raw)
In-Reply-To: <20080513.213425.03637016.davem@davemloft.net>
On Wed, May 14, 2008 at 10:04 AM, David Miller <davem@davemloft.net> wrote:
> From: Prashanth <bshanth@gmail.com>
> Date: Wed, 14 May 2008 09:12:54 +0530
>
>> hi, In the following function at line 189 , we are getting aligned
>> length (hh_alen) for the hardware header , but while doing a
>> skb_push() why are we using the hh->hh_len;for ethernet hh_alen would
>> be 16 , and hh->hh_len would be 14, since we are doing skb_push() with
>> 14 (i.e hh->hh_len), the skb->data will not be aligned right? Can
>> someone please shed some light on this. thanks.
>
> We are using 16 for the copy so that we do an aligned
> copy. But the ethernet header size is only 14 bytes.
>
I thought memcpy in linux is anyway always alignment safe. no?
-Kalash
next prev parent reply other threads:[~2008-05-14 8:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 3:42 ip_finish_outpu2 question Prashanth
2008-05-14 4:34 ` David Miller
2008-05-14 5:23 ` Prashanth
2008-05-14 5:46 ` David Miller
2008-05-14 8:47 ` kalash nainwal [this message]
2008-05-14 10:03 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=416aa1ad0805140147m2efff9b1v6a5f8c3d0ee701c6@mail.gmail.com \
--to=kalash.nainwal@gmail.com \
--cc=bshanth@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).