From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C45DF45BCB; Fri, 25 Oct 2024 18:51:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86547402ED; Fri, 25 Oct 2024 18:51:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 8124A402AE for ; Fri, 25 Oct 2024 18:51:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729875076; x=1761411076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bEzt/EHqK7pwyr191vzeyz+P8KpV70PEdg+GHCbZJgA=; b=Ga2IcZHG6zIa0hunLGDFreEFpE9vEIMr7yZGrmWdGNKBv0Exbm0DBZ+F TN4ktjF7dGe5i0iYNyFajhb0l0eQ4oyht8hsuu6hujbT3N3IdJ+2iC0/Z OCiVoX6pEmc86gBbzgH1SblpjNtAT54vgpWLe4fJUQjCitR4Ro+CFnKaK NBXqs7vibVd00KELp3FL33f2xWXrcM65U9bPAPnwkrXC6FRYcMn3moK8K NRK/zPzEzA6oyUhVWOBRZVENWSHIo8Y3lVe12nQvJknbjoifVFj4ySvWa fLcXrxfth6ijCc3ZEVlpiUZKcmmC6QqfssKAB1Xyj1A9R48qneXzkmW0c g==; X-CSE-ConnectionGUID: o7RBaPCoRT+0mUYc6K6VEw== X-CSE-MsgGUID: qx/QAMnQRA+JezI48y93+Q== X-IronPort-AV: E=McAfee;i="6700,10204,11236"; a="54956144" X-IronPort-AV: E=Sophos;i="6.11,232,1725346800"; d="scan'208";a="54956144" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2024 09:50:38 -0700 X-CSE-ConnectionGUID: TvujRBulTByNKF6oOgWTiA== X-CSE-MsgGUID: 4lyAMU+4R1W7WU98mDMFOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,232,1725346800"; d="scan'208";a="118417486" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa001.jf.intel.com with ESMTP; 25 Oct 2024 09:50:37 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson , Stephen Hemminger , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Byron Marohn , Yipeng Wang Subject: [PATCH v2 2/6] efd: remove unnecessary packed attributes Date: Fri, 25 Oct 2024 17:50:15 +0100 Message-ID: <20241025165020.1856733-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241025165020.1856733-1-bruce.richardson@intel.com> References: <20241017142214.1669370-1-bruce.richardson@intel.com> <20241025165020.1856733-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Stephen Hemminger Acked-by: Morten Brørup --- 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