From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9122CA04A3; Tue, 16 Jun 2020 10:28:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79D4D1BDAE; Tue, 16 Jun 2020 10:28:05 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id E39491BDAC; Tue, 16 Jun 2020 10:28:03 +0200 (CEST) IronPort-SDR: huDT49E1tXRgMGKFgEXar4p9hAH9JW7lnd2LmiXlZDmJ4Dq+G2D2BRep/sFWxb1u8+eIw7P9Sm kcFs3qSsh1eg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 01:28:02 -0700 IronPort-SDR: Gy+L8mMr/OJiGKdu1qtW8nI7a35DzwJemUMSSuqaIJ2t3WKQnT7kRHoFfwa01JOWielncMncDb R4nMyLKFGO4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,518,1583222400"; d="scan'208";a="276845321" Received: from dpdk-xuting-main.sh.intel.com ([10.67.117.84]) by orsmga006.jf.intel.com with ESMTP; 16 Jun 2020 01:28:01 -0700 From: Ting Xu To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, stable@dpdk.org Date: Tue, 16 Jun 2020 16:27:05 +0000 Message-Id: <20200616162705.83575-1-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] lib/table: fix cache alignment issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When create softnic hash table with 16 keys, it failed on 32bit environment because of the structure rte_bucket_4_16 alignment issue. Add __rte_cache_aligned to ensure correct cache align. Fixes: 8aa327214c ("table: hash") Cc: stable@dpdk.org Signed-off-by: Ting Xu --- lib/librte_table/rte_table_hash_key16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_table/rte_table_hash_key16.c b/lib/librte_table/rte_table_hash_key16.c index 2cca1c924..5e1665c15 100644 --- a/lib/librte_table/rte_table_hash_key16.c +++ b/lib/librte_table/rte_table_hash_key16.c @@ -44,7 +44,7 @@ struct rte_bucket_4_16 { uint64_t key[4][2]; /* Cache line 2 */ - uint8_t data[0]; + uint8_t data[0] __rte_cache_aligned; }; struct rte_table_hash { -- 2.17.1