[dpdk-dev] app/crypto-perf: fix crypto op init

Message ID 20171106093604.1463-1-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

De Lara Guarch, Pablo Nov. 6, 2017, 9:36 a.m. UTC
  The mempool and the physical address of the crypto operation
at mempool initialization were not being set,
leading to incorrect physical addresses.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/cperf_test_common.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Fan Zhang Nov. 6, 2017, 11:59 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, November 6, 2017 9:36 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix crypto op init
> 
> The mempool and the physical address of the crypto operation at mempool
> initialization were not being set, leading to incorrect physical addresses.
> 
> Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  app/test-crypto-perf/cperf_test_common.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-
> perf/cperf_test_common.c
> index 46e4a46..7180bb9 100644
> --- a/app/test-crypto-perf/cperf_test_common.c
> +++ b/app/test-crypto-perf/cperf_test_common.c
> @@ -119,6 +119,8 @@ mempool_obj_init(struct rte_mempool *mp,
>  	op->type = RTE_CRYPTO_OP_TYPE_SYMMETRIC;
>  	op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
>  	op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
> +	op->phys_addr = rte_mem_virt2phy(obj);
> +	op->mempool = mp;
> 
>  	/* Set source buffer */
>  	op->sym->m_src = m;
> --
> 2.9.4

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  
Ferruh Yigit Nov. 7, 2017, 7:25 a.m. UTC | #2
On 11/6/2017 3:59 AM, Zhang, Roy Fan wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
>> Sent: Monday, November 6, 2017 9:36 AM
>> To: Doherty, Declan <declan.doherty@intel.com>
>> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
>> Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix crypto op init
>>
>> The mempool and the physical address of the crypto operation at mempool
>> initialization were not being set, leading to incorrect physical addresses.
>>
>> Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
>>
>> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
 Applied to dpdk/master, thanks.
  

Patch

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 46e4a46..7180bb9 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -119,6 +119,8 @@  mempool_obj_init(struct rte_mempool *mp,
 	op->type = RTE_CRYPTO_OP_TYPE_SYMMETRIC;
 	op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
 	op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
+	op->phys_addr = rte_mem_virt2phy(obj);
+	op->mempool = mp;
 
 	/* Set source buffer */
 	op->sym->m_src = m;