DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Scott Mitchell" <scott.k.mitch1@gmail.com>
Cc: <dev@dpdk.org>, <stephen@networkplumber.org>,
	"Scott" <scott_mitchell@apple.com>
Subject: RE: [PATCH v12 3/3] eal/net: add workaround for GCC optimization bug
Date: Sun, 11 Jan 2026 18:57:54 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F6564C@smartserver.smartshare.dk> (raw)
In-Reply-To: <CAFn2buCsqH5DR9k9rZFek5OyEC3q26G_Cm_u9dUG1=YuWXrgQw@mail.gmail.com>

> From: Scott Mitchell [mailto:scott.k.mitch1@gmail.com]
> Sent: Sunday, 11 January 2026 07.22
> 
> > Does this still happen after you replaced the RTE_PTR_ADD() with
> native pointer arithmetic in the checksum function?
> > In other words: Is this workaround still necessary?
> 
> Yes unfortunately it is necessary with the pointer access.
> I updated the reproducer which shows this case:
> https://gist.github.com/Scottmitch/bf23748b4588e68c9bdb8d124f92f1bd

I wonder if some of the magic types in rte_memcpy() [1] could be used to fix the aliasing/eliding problem in the checksum function:

struct __rte_packed_begin rte_unaligned_uint16_alias {
	unaligned_uint16_t val;
} __rte_packed_end __rte_may_alias;


[1]: https://elixir.bootlin.com/dpdk/v25.11/source/lib/eal/x86/include/rte_memcpy.h#L66


  reply	other threads:[~2026-01-11 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-10  1:56 [PATCH v12 0/3] net: optimize raw checksum computation scott.k.mitch1
2026-01-10  1:56 ` [PATCH v12 1/3] net: optimize __rte_raw_cksum and add tests scott.k.mitch1
2026-01-10  2:28   ` Scott Mitchell
2026-01-10 14:47   ` Morten Brørup
2026-01-10  1:56 ` [PATCH v12 2/3] eal: add workaround for UBSAN alignment false positive scott.k.mitch1
2026-01-10 15:02   ` Morten Brørup
2026-01-10  1:56 ` [PATCH v12 3/3] eal/net: add workaround for GCC optimization bug scott.k.mitch1
2026-01-10 15:29   ` Morten Brørup
2026-01-11  6:21     ` Scott Mitchell
2026-01-11 17:57       ` Morten Brørup [this message]
2026-01-11 20:24         ` Scott Mitchell
2026-01-10 16:59 ` [PATCH v12 0/3] net: optimize raw checksum computation Stephen Hemminger

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=98CBD80474FA8B44BF855DF32C47DC35F6564C@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@dpdk.org \
    --cc=scott.k.mitch1@gmail.com \
    --cc=scott_mitchell@apple.com \
    --cc=stephen@networkplumber.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).