From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Subject: RE: IPv6 APIs rework
Date: Fri, 19 Jul 2024 08:25:01 +0000 [thread overview]
Message-ID: <cda77371d81b450c9fcc45dfb9fac559@huawei.com> (raw)
In-Reply-To: <D2SZK17E8CKJ.2ISL9TQI3ST40@redhat.com>
> Vladimir Medvedkin, Jul 18, 2024 at 23:25:
> > I think alignment should be 1 since in FIB6 users usually don't copy IPv6
> > address and just provide a pointer to the memory inside the packet. Current
> > vector implementation loads IPv6 addresses using unaligned access (
> > _mm512_loadu_si512) so it doesn't rely on alignment.
>
> Yes, my intention was exactly that, being able to map that structure
> directly in packets without copying them on the stack.
>
> > > 2. In the IPv6 packet header, the IPv6 addresses are not 16 byte aligned,
> > > they are 8 byte aligned. So we cannot make the IPv6 address type 16 byte
> > > aligned.
>
> > Not necessary, if Ethernet frame in mbuf starts on 8b aligned address, then
> > IPv6 is aligned only by 2 bytes.
>
> We probably could safely say that aligning on 2 bytes would be OK. But
> is there any benefit, performance wise, in doing so? Keeping the same
> alignment as before the change would at least make it ABI compatible.
I am also not sure that this extra alignment (2B or 4B) here will give us any benefit,
while it most likely will introduce extra restrictions.
AFAIK, right now we do have ipv6 as array of plain chars, and there were no much
complaints about it.
So I am for keeping it 1B aligned.
Overall proposal looks reasonable to me... might be 24.11 is a good opportunity for such change.
Konstantin
next prev parent reply other threads:[~2024-07-22 9:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 15:03 Robin Jarry
2024-07-18 20:27 ` Morten Brørup
2024-07-18 21:15 ` Stephen Hemminger
2024-07-18 21:40 ` Robin Jarry
2024-07-18 21:25 ` Vladimir Medvedkin
2024-07-18 21:34 ` Robin Jarry
2024-07-19 8:25 ` Konstantin Ananyev [this message]
2024-07-19 9:12 ` Morten Brørup
2024-07-19 10:02 ` Robin Jarry
2024-07-19 10:09 ` Bruce Richardson
2024-07-19 10:46 ` Morten Brørup
2024-07-19 11:09 ` Robin Jarry
2024-07-19 15:47 ` Morten Brørup
2024-07-19 17:07 ` Stephen Hemminger
2024-07-20 17:43 ` Robin Jarry
2024-07-20 20:26 ` Stephen Hemminger
2024-07-20 20:33 ` Robin Jarry
2024-07-21 16:12 ` Morten Brørup
2024-07-21 21:51 ` Robin Jarry
2024-07-22 9:31 ` Morten Brørup
2024-07-19 10:41 ` Medvedkin, Vladimir
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=cda77371d81b450c9fcc45dfb9fac559@huawei.com \
--to=konstantin.ananyev@huawei.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).