netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Темерханов Сергей" <temerkhanov@yandex.ru>
To: temerkhanov@cifronik.21th.com
Cc: netdev@vger.kernel.org
Subject: Fw: net: alignment problem in icmp code
Date: Sun, 21 Oct 2007 23:54:20 +0400	[thread overview]
Message-ID: <306881192996460@webmail19.yandex.ru> (raw)



-------- Пересылаемое сообщение --------
21.10.07, 23:48, David Miller (davem@davemloft.net):

From: Pierre Ossman <drzeus@drzeus.cx>
Date: Sun, 21 Oct 2007 11:34:05 +0200

> Inlining isn't the problem, but the defined semantics of assignment
> versus memcpy(). memcpy() must work on any region of memory, whilst
> assignment must only work on a properly aligned object.

You are missing a crucial point.

The compiler may emit the same exact loads and stores when it inlines
memcpy() if it "knows" the objects are aligned properly.  And it very
much will do this.

If the compiler is calling memcpy() in your build, it's only because
gcc believes the the object is too big to optimally memcpy() inline.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

-------- Завершение пересылаемого сообщения --------


--
"Краски осени": Новый конкурс на Яндекс.Фотках http://fotki.yandex.ru/contest.xml?id=10

             reply	other threads:[~2007-10-21 20:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 19:54 Темерханов Сергей [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-10-21 19:58 Fw: net: alignment problem in icmp code Темерханов Сергей

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=306881192996460@webmail19.yandex.ru \
    --to=temerkhanov@yandex.ru \
    --cc=netdev@vger.kernel.org \
    --cc=temerkhanov@cifronik.21th.com \
    /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).