DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH] net: improve vlan header type alignment
Date: Mon, 14 Oct 2024 09:04:38 +0100	[thread overview]
Message-ID: <ZwzQlqalWAgH-n5y@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20241013083554.97489-1-mb@smartsharesystems.com>

On Sun, Oct 13, 2024 at 08:35:54AM +0000, Morten Brørup wrote:
> Ethernet packets can be VLAN tagged, i.e. an Ethernet header can have a
> VLAN tag (a.k.a. VLAN header) embedded.
> Since the Ethernet header is 2 byte aligned, and the VLAN tag is directly
> related to the Ethernet header, the VLAN tag is also 2 byte aligned, so
> packing the VLAN tag structure is not necessary.
> 
> Furthermore, the Ethernet header type is implictly 2 byte aligned, so
> removed the superfluous explicit 2 byte alignment.
> 
> Added static_asserts to verify the size and alignment of the various
> Ethernet types.
> 
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> ---
>  lib/net/rte_ether.h | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

  parent reply	other threads:[~2024-10-14  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-13  8:35 Morten Brørup
2024-10-13  8:51 ` Morten Brørup
2024-10-14  5:42 ` fengchengwen
2024-10-14  8:04 ` Bruce Richardson [this message]
2024-10-17 20:44 ` Thomas Monjalon
2024-10-17 23:41   ` Morten Brørup
2024-10-18  9:11 ` Thomas Monjalon

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=ZwzQlqalWAgH-n5y@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.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).