From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1151D6CB0 for ; Mon, 30 May 2016 16:58:53 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 30 May 2016 07:58:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,390,1459839600"; d="scan'208";a="991620482" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga002.fm.intel.com with ESMTP; 30 May 2016 07:58:49 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.96]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0248.002; Mon, 30 May 2016 15:58:48 +0100 From: "Jain, Deepak K" To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: "Trahe, Fiona" , "Griffin, John" , "olivier.matz@6wind.com" , "thomas.monjalon@6wind.com" Thread-Topic: [PATCH] qat: fix phys address of content descriptor Thread-Index: AQHRunBDazoYt5RNkkulOhX4TUbYJp/RiMxw Date: Mon, 30 May 2016 14:58:47 +0000 Deferred-Delivery: Mon, 30 May 2016 14:58:16 +0000 Message-ID: References: <1464611916-17061-1-git-send-email-arkadiuszx.kusztal@intel.com> In-Reply-To: <1464611916-17061-1-git-send-email-arkadiuszx.kusztal@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjhjNmMxZGMtM2ZiOC00NmIyLWI4YjMtNTMxZGRmNmI3MWMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5wXC9qeWlFMU1qaUZ0ZDcyVklwWTZPTGhGaG1tK0tDVG1zbnp0T2ZPMERJPSJ9 x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] qat: fix phys address of content descriptor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 14:58:54 -0000 -----Original Message----- From: Kusztal, ArkadiuszX=20 Sent: Monday, May 30, 2016 1:39 PM To: dev@dpdk.org Cc: Trahe, Fiona ; Griffin, John ; Jain, Deepak K ; olivier.matz@6wind.com; th= omas.monjalon@6wind.com; Kusztal, ArkadiuszX Subject: [PATCH] qat: fix phys address of content descriptor From: Arkadiusz Kusztal this patch fixes an error with computation of physical address of content d= escriptor in the symmetric operations session Signed-off-by: Arkadiusz Kusztal --- drivers/crypto/qat/qat_crypto.c | 9 ++++++--- lib/librte_cryptodev/rte_cryptodev.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypt= o.c index 495ea1c..abe0511 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -807,12 +807,15 @@ static inline uint32_t adf_modulo(uint32_t data, uint= 32_t shift) return data - mult; } =20 -void qat_crypto_sym_session_init(struct rte_mempool *mp, void *priv_sess) +void qat_crypto_sym_session_init(struct rte_mempool *mp, void=20 +*sym_sess) { - struct qat_session *s =3D priv_sess; + struct rte_cryptodev_sym_session *sess =3D sym_sess; + struct qat_session *s =3D (void *)sess->_private; =20 PMD_INIT_FUNC_TRACE(); - s->cd_paddr =3D rte_mempool_virt2phy(mp, &s->cd); + s->cd_paddr =3D rte_mempool_virt2phy(mp, sess) + + offsetof(struct qat_session, cd) + + offsetof(struct rte_cryptodev_sym_session, _private); } =20 int qat_dev_config(__rte_unused struct rte_cryptodev *dev) diff --git a/li= b/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index aa4ea42..960e2d5 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -956,7 +956,7 @@ rte_cryptodev_sym_session_init(struct rte_mempool *mp, sess->mp =3D mp; =20 if (dev->dev_ops->session_initialize) - (*dev->dev_ops->session_initialize)(mp, sess->_private); + (*dev->dev_ops->session_initialize)(mp, sess); } =20 static int -- 2.1.0 Acked-by: Deepak Kumar Jain