From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BA188A0679 for ; Fri, 5 Apr 2019 18:07:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3DC6E1B569; Fri, 5 Apr 2019 18:07:21 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3B36A1B560; Fri, 5 Apr 2019 18:07:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 09:07:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,313,1549958400"; d="scan'208";a="220914224" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.136]) by orsmga001.jf.intel.com with ESMTP; 05 Apr 2019 09:07:13 -0700 From: Fan Zhang To: dev@dpdk.org Cc: akhil.goyal@nxp.com, Fan Zhang , stable@dpdk.org Date: Fri, 5 Apr 2019 17:04:24 +0100 Message-Id: <20190405160424.39320-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20190405153112.60248-1-roy.fan.zhang@intel.com> References: <20190405153112.60248-1-roy.fan.zhang@intel.com> Subject: [dpdk-stable] [PATCH v2] crypto/virtio: fix iv offset X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" This patch fixes the incorrect iv offset calculation. Fixes: b063e843fa03 ("crypto/virtio: fix IV physical address") Cc: stable@dpdk.org Signed-off-by: Fan Zhang --- v2: fixed a typo drivers/crypto/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c index e32a1ecd6..e9a63cb5a 100644 --- a/drivers/crypto/virtio/virtio_rxtx.c +++ b/drivers/crypto/virtio/virtio_rxtx.c @@ -203,8 +203,8 @@ virtqueue_crypto_sym_enqueue_xmit( uint16_t req_data_len = sizeof(struct virtio_crypto_op_data_req); uint32_t indirect_vring_addr_offset = req_data_len + sizeof(struct virtio_crypto_inhdr); - uint32_t indirect_iv_addr_offset = indirect_vring_addr_offset + - sizeof(struct vring_desc) * NUM_ENTRY_VIRTIO_CRYPTO_OP; + uint32_t indirect_iv_addr_offset = + offsetof(struct virtio_crypto_op_cookie, iv); struct rte_crypto_sym_op *sym_op = cop->sym; struct virtio_crypto_session *session = (struct virtio_crypto_session *)get_sym_session_private_data( -- 2.14.5