DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>
Cc: <dev@dpdk.org>,
	"Vladimir Medvedkin" <vladimir.medvedkin@intel.com>,
	"Konstantin Ananyev" <konstantin.ananyev@huawei.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>
Subject: Re: [PATCH dpdk v1 00/15] IPv6 APIs overhaul
Date: Thu, 22 Aug 2024 17:27:40 +0200	[thread overview]
Message-ID: <D3MJOFQ438C5.9XEVVY0EF552@redhat.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F65E@smartserver.smartshare.dk>

Morten Brørup, Aug 22, 2024 at 17:13:
> The types seem to be different in the Windows API (than in Linux/BSD):
> https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.14393.0/shared/in6addr.h#L25
> https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.16299.0/shared/inaddr.h#L25
>
> Furthermore, but less important:
> The existing in the Linux/BSD/Windows IPv6 address type are 2-byte aligned.

At least BSD is 4 bytes aligned.

https://github.com/freebsd/freebsd-src/blob/498286d4e807d6b9e4caad22b96ebca7f16e9b18/sys/netinet6/in6.h#L91-L100

And on Linux, it depends on the libc implementation?

https://github.com/torvalds/linux/blob/872cf28b8df9c5c3a1e71a88ee750df7c2513971/include/uapi/linux/in6.h#L33

> In the RFC discussion, we agreed to omit any alignment requirements for the DPDK IPv6 address, for tunneling purposes.
> We could introduce 2-byte alignment later, using a union and an array of uint16_t, if beneficial.
>
> Which makes me think...
> Maybe the 'a' field in the DPDK IPv6 address structure should be named 'b' for "byte" instead, to prepare it for adding a union with a 'w' (for "word") field if we want to introduce 2-byte alignment.

My idea was to name the field a16 instead of w which would be confusing. 
Also, how would you name a 32 bit array field if it presented itself?


  reply	other threads:[~2024-08-22 15:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 16:25 Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 01/15] net: split raw checksum functions in separate header Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 02/15] net: split ipv6 symbols " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 03/15] net: add structure for ipv6 addresses Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 04/15] net: use ipv6 structure for header addresses Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 05/15] fib6,rib6,lpm6: use ipv6 addr struct Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 06/15] net: add ipv6 address utilities Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 07/15] fib6,rib6,lpm6: use ipv6 utils Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 08/15] graph,node: use ipv6 addr struct and utils Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 09/15] pipeline: use ipv6 addr struct Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 10/15] ipsec: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 11/15] thash: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 12/15] gro: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 13/15] rte_flow: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 14/15] rib6,fib6,lpm6: remove duplicate constants Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 15/15] net: add utilities for well known ipv6 address types Robin Jarry
2024-08-21 22:28 ` [PATCH dpdk v1 00/15] IPv6 APIs overhaul Morten Brørup
2024-08-22 14:13 ` Stephen Hemminger
2024-08-22 15:13   ` Morten Brørup
2024-08-22 15:27     ` Robin Jarry [this message]
2024-08-22 18:41       ` Morten Brørup
2024-08-22 15:14   ` Robin Jarry
2024-08-22 15:16   ` Robin Jarry

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=D3MJOFQ438C5.9XEVVY0EF552@redhat.com \
    --to=rjarry@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@huawei.com \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    --cc=vladimir.medvedkin@intel.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).