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 8CD8F43E7E; Mon, 15 Apr 2024 22:13:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0628442E57; Mon, 15 Apr 2024 22:06:37 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9204540EA5 for ; Mon, 15 Apr 2024 22:05:07 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0D40120FDA9C; Mon, 15 Apr 2024 13:04:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0D40120FDA9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713211492; bh=KjL4AjXx28h3bGhZUyCF9UhuiAVYN3K0Vlts16lefbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVcbaRWOwpo9ruA77LMKDIQww5S9fMGm3gzwgQFpt/e1SAJJEfWilzV72BhbIAFHb mVWkfOT1XugKhzRsB5FlnV+O0ebndT78gLLSHQ5KIbY4WW1CjNpTVcPNA+fVJxBAzz zy3lN6pt0DCsC/m32WY6CdTlN8Ht+sOAhrkzsTDQ= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , "Min Hu (Connor)" , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH v2 56/83] crypto/mvsam: move alignment attribute on types Date: Mon, 15 Apr 2024 13:04:18 -0700 Message-Id: <1713211485-9021-57-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1713211485-9021-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> <1713211485-9021-1-git-send-email-roretzla@linux.microsoft.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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- drivers/crypto/mvsam/mrvl_pmd_private.h | 12 ++++++------ drivers/crypto/mvsam/rte_mrvl_pmd.c | 12 +++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/crypto/mvsam/mrvl_pmd_private.h b/drivers/crypto/mvsam/mrvl_pmd_private.h index 719d73d..80ff229 100644 --- a/drivers/crypto/mvsam/mrvl_pmd_private.h +++ b/drivers/crypto/mvsam/mrvl_pmd_private.h @@ -44,7 +44,7 @@ struct mrvl_crypto_private { }; /** MRVL crypto queue pair structure. */ -struct mrvl_crypto_qp { +struct __rte_cache_aligned mrvl_crypto_qp { /** SAM CIO (MUSDK Queue Pair equivalent).*/ struct sam_cio *cio; @@ -59,10 +59,10 @@ struct mrvl_crypto_qp { /** CIO initialization parameters.*/ struct sam_cio_params cio_params; -} __rte_cache_aligned; +}; /** MRVL crypto private session structure. */ -struct mrvl_crypto_session { +struct __rte_cache_aligned mrvl_crypto_session { /** Crypto operations chain order. */ enum mrvl_crypto_chain_order chain_order; @@ -74,12 +74,12 @@ struct mrvl_crypto_session { /** Cipher IV offset. */ uint16_t cipher_iv_offset; -} __rte_cache_aligned; +}; -struct mrvl_crypto_src_table { +struct __rte_cache_aligned mrvl_crypto_src_table { uint16_t iter_ops; struct sam_buf_info src_bd[MRVL_MAX_SEGMENTS]; -} __rte_cache_aligned; +}; /** Set and validate MRVL crypto session parameters */ int diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c index 1641da9..193b7fb 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c @@ -47,22 +47,20 @@ enum algo_supported { }; /** Map elements for cipher mapping.*/ -struct cipher_params_mapping { +/* We want to squeeze in multiple maps into the cache line. */ +struct __rte_aligned(32) cipher_params_mapping { enum algo_supported supported; /**< On/Off switch */ enum sam_cipher_alg cipher_alg; /**< Cipher algorithm */ enum sam_cipher_mode cipher_mode; /**< Cipher mode */ unsigned int max_key_len; /**< Maximum key length (in bytes)*/ -} -/* We want to squeeze in multiple maps into the cache line. */ -__rte_aligned(32); +}; /** Map elements for auth mapping.*/ -struct auth_params_mapping { +/* We want to squeeze in multiple maps into the cache line. */ +struct __rte_aligned(32) auth_params_mapping { enum algo_supported supported; /**< On/off switch */ enum sam_auth_alg auth_alg; /**< Auth algorithm */ } -/* We want to squeeze in multiple maps into the cache line. */ -__rte_aligned(32); /** * Map of supported cipher algorithms. -- 1.8.3.1