From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com,
"Bruce Richardson" <bruce.richardson@intel.com>,
"Stephen Hemminger" <stephen@networkplumber.org>,
"Morten Brørup" <mb@smartsharesystems.com>,
"Byron Marohn" <byron.marohn@intel.com>,
"Yipeng Wang" <yipeng1.wang@intel.com>
Subject: [PATCH v2 2/6] efd: remove unnecessary packed attributes
Date: Fri, 25 Oct 2024 17:50:15 +0100 [thread overview]
Message-ID: <20241025165020.1856733-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20241025165020.1856733-1-bruce.richardson@intel.com>
The structure "efd_online_group_entry" only consists of values which are
typedefs of "uint16_t", so packing the structure has no effect. The
"efd_online_chunk" structure has a mix of "uint8_t" and the
"efd_online_group_entry" struct, i.e. uint16_t values, but since the
first, uint8_t, member array is of even size, the packed attribute does
not affect the structure layout.
Removing these packed attributes allows the library to compile cleanly
without "-Wno-address-of-packed-member" compiler flag.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/efd/rte_efd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c
index d3b732f2e8..3cbb3c2719 100644
--- a/lib/efd/rte_efd.c
+++ b/lib/efd/rte_efd.c
@@ -212,7 +212,7 @@ struct efd_offline_chunk_rules {
struct efd_online_group_entry {
efd_hashfunc_t hash_idx[RTE_EFD_VALUE_NUM_BITS];
efd_lookuptbl_t lookup_table[RTE_EFD_VALUE_NUM_BITS];
-} __rte_packed;
+};
/**
* A single chunk record, containing EFD_TARGET_CHUNK_NUM_RULES rules.
@@ -228,7 +228,7 @@ struct efd_online_chunk {
struct efd_online_group_entry groups[EFD_CHUNK_NUM_GROUPS];
/**< Array of all the groups in the chunk. */
-} __rte_packed;
+};
/**
* EFD table structure
--
2.43.0
next prev parent reply other threads:[~2024-10-25 16:51 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 14:22 [PATCH 0/6] Reduce scope address-of-packed-member warning Bruce Richardson
2024-10-17 14:22 ` [PATCH 1/6] ip_frag: remove use of unaligned variable Bruce Richardson
2024-10-17 16:26 ` Stephen Hemminger
2024-10-17 16:42 ` Konstantin Ananyev
2024-10-17 14:22 ` [PATCH 2/6] efd: remove unnecessary packed attributes Bruce Richardson
2024-10-17 16:22 ` Stephen Hemminger
2024-10-17 14:22 ` [PATCH 3/6] bus/ifpga: remove packed attribute Bruce Richardson
2024-10-17 14:52 ` Xu, Rosen
2024-10-17 16:25 ` Stephen Hemminger
2024-10-17 14:22 ` [PATCH 4/6] pipeline: " Bruce Richardson
2024-10-17 14:24 ` Bruce Richardson
2024-10-17 16:25 ` Stephen Hemminger
2024-10-17 14:22 ` [PATCH 5/6] net: add smaller IPv4 cksum function for simple cases Bruce Richardson
2024-10-17 16:24 ` Stephen Hemminger
2024-10-17 17:01 ` Bruce Richardson
2024-10-17 17:15 ` Morten Brørup
2024-10-17 19:03 ` Bruce Richardson
2024-10-17 19:34 ` Stephen Hemminger
2024-10-18 0:32 ` Morten Brørup
2024-10-17 14:22 ` [PATCH 6/6] build: limit scope of packed member warning disabling Bruce Richardson
2024-10-19 15:38 ` Stephen Hemminger
2024-10-17 16:21 ` [PATCH 0/6] Reduce scope address-of-packed-member warning Stephen Hemminger
2024-10-17 17:02 ` Bruce Richardson
2024-10-25 13:24 ` David Marchand
2024-10-25 14:55 ` David Marchand
2024-10-25 16:51 ` Bruce Richardson
2024-10-25 16:50 ` [PATCH v2 " Bruce Richardson
2024-10-25 16:50 ` [PATCH v2 1/6] ip_frag: remove use of unaligned variable Bruce Richardson
2024-10-25 16:50 ` Bruce Richardson [this message]
2024-10-25 16:50 ` [PATCH v2 3/6] bus/ifpga: remove packed attribute Bruce Richardson
2024-10-25 16:50 ` [PATCH v2 4/6] pipeline: " Bruce Richardson
2024-10-25 16:50 ` [PATCH v2 5/6] net: add smaller IPv4 cksum function for simple cases Bruce Richardson
2024-10-25 16:50 ` [PATCH v2 6/6] build: limit scope of packed member warning disabling Bruce Richardson
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=20241025165020.1856733-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=byron.marohn@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.org \
--cc=yipeng1.wang@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).