From patchwork Mon Jan 31 12:30:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 106736 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57F57A04A2; Mon, 31 Jan 2022 12:39:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4972C4116E; Mon, 31 Jan 2022 12:39:30 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id C491B41171 for ; Mon, 31 Jan 2022 12:39:28 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20VB6HZd009700 for ; Mon, 31 Jan 2022 03:39:28 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=CAUSRPVdQXYnWDxf+d2N3VxX5FuUR80MnVcefIrs060=; b=FSj/RNfeazga4dcGTkfZE19bsvAiUXQVJ9jjys3IVJStaZ7lvHTNmlH6EJj3A2IAysv/ guPpn1ld52GBVn8VD7kf3+gGkChTaV9H2ykbTqV8pvecDbVxx14gYlGR3u4D/Vbk2jfy bJi3Nap/YQY+47149RS3/2DXbSsfhJOZioY/bxr59J1fan35n3FpetjrXq+Z0P/hI1xz VH6Z/kZs4Q5YQNQPV3L9Y+oWlHusRbhlFy/cMr2jMhor9XmGZ0Gf9nkZQLTNdXQLlQn4 kK6ASUaFHCh3MokGv7/MKTl9G6yQebbO7GNGXsB16syT3g6A1YywaHIR8ZETQ0XiY5wO Ww== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dw5yqm8n5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 31 Jan 2022 03:39:28 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 31 Jan 2022 03:39:26 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 31 Jan 2022 03:39:26 -0800 Received: from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id DA7813F703F; Mon, 31 Jan 2022 03:39:23 -0800 (PST) From: Tejasree Kondoj To: Akhil Goyal CC: Anoob Joseph , Ankur Dwivedi , Archana Muniganti , Tejasree Kondoj , Subject: [PATCH 4/5] crypto/cnxk: use unique cache line per inst Date: Mon, 31 Jan 2022 18:00:28 +0530 Message-ID: <20220131123029.4024-5-ktejasree@marvell.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220131123029.4024-1-ktejasree@marvell.com> References: <20220131123029.4024-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 6g-7j7gDX1ygGd1AXJdc1g-5Eheh68Po X-Proofpoint-GUID: 6g-7j7gDX1ygGd1AXJdc1g-5Eheh68Po X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-31_04,2022-01-28_01,2021-12-02_01 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 From: Anoob Joseph CPT inflight request is used to track a request that is enqueued to cryptodev. Having more than one inst use the same cacheline can result in serialization of CPT result memory writes causing perf degradations. Align inflight request to ROC cache line to ensure only one result would be written per cache line.. Signed-off-by: Anoob Joseph --- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h index e521f07585..0656ba9675 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h @@ -40,7 +40,9 @@ struct cpt_inflight_req { void *mdata; uint8_t op_flags; void *qp; -} __rte_aligned(16); +} __rte_aligned(ROC_ALIGN); + +PLT_STATIC_ASSERT(sizeof(struct cpt_inflight_req) == ROC_CACHE_LINE_SZ); struct pending_queue { /** Array of pending requests */