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 2B45642DEC; Thu, 6 Jul 2023 20:00:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 416D443023; Thu, 6 Jul 2023 19:59:54 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 303014301E for ; Thu, 6 Jul 2023 19:59:51 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-262cc036fa4so582190a91.3 for ; Thu, 06 Jul 2023 10:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688666390; x=1691258390; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F69PS55Z8d+JCpBArBnlboybxsumWrIJT6EP0C7v0Ks=; b=GzdtKffSjiViqrEE88Qpl/WZ9AqMZl5gDasRPQblpARFimbwqjoTaOYcQOA3T1aeH8 Cruz3KVaETdUqqeQ4NWkWE96QMY6jElZ/zWTooTzzRRwI8hfi1DxsAjiFXWyUv3fXNbD uq/Rfk4kPJ53CC+oqhHyExQi0dKOaxyCGRiuYtv/TU/71C8thyer3a9qq4HsXgPGSKOR KTCLTDFzozoGEaJiSyxEMtMazZzLR4456lnPPOilbCr5BaOExhXd55mQGoOyUiK2lsFC 1lCIaEkEutmGWInXpV2ykmMMKSeIjYF8YUGIxocD31G/zPCy3ElTYj/zDDZTih9YOHpn aX+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688666390; x=1691258390; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F69PS55Z8d+JCpBArBnlboybxsumWrIJT6EP0C7v0Ks=; b=kdBE3uyno/bz8guy4PboYwMkG5HbkFh6bvgqycxUR8QE63oCA37XGDTnDthflyhJNF RRWhZYVoiGiUXy8LhPdeIDzfl9xH3feTrQmjTp0xKNoWtcfpGJ1GfGFSA8wd9AEsvYCU UabluZyEDdg+F/IaI/V1sB4DfaQdG4BtFUcd2Uas5zQFSXUPLV43Cyfl4vFo4A5+EdlB Sv50wNvK2hjkCk8ozc722oXrcqAm8OmWr8nwEOrb8lfPZdvj05LJcv293N4JNe0bkcgC IZaYAxDkrS5F5reyAxNnrs2sYfIaPYR71kNtKhmdoWNv3VAUArDvCDoBReZjk1XO82Zr ac7Q== X-Gm-Message-State: ABy/qLbt/iFNpeXcf20JsJFVABzZLmbNRgFNVzMxV/aeQppo+WlZLLUq Htt1OP84cJq5+8qqOQ7F3/Rp42BQmCbvbkLB1wA= X-Google-Smtp-Source: APBJJlFW2p8lhCtQEFN96XThTmggsumcV17UIsXKDyfs4lLslT8KAShPq0/JiPDsAP9dpjVA1Tek4Q== X-Received: by 2002:a17:90a:7e8e:b0:264:a14:ce19 with SMTP id j14-20020a17090a7e8e00b002640a14ce19mr1883821pjl.20.1688666389955; Thu, 06 Jul 2023 10:59:49 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id nh8-20020a17090b364800b00256bbfbabcfsm76464pjb.48.2023.07.06.10.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 10:59:48 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [PATCH v3 09/14] crypto/qat: use rte_pktmbuf_mtod_offset Date: Thu, 6 Jul 2023 10:59:33 -0700 Message-Id: <20230706175938.62721-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230706175938.62721-1-stephen@networkplumber.org> References: <20230505174813.133894-1-stephen@networkplumber.org> <20230706175938.62721-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Auto generated with cocci/mtod-offset.cocci Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 9 +++++---- drivers/crypto/qat/qat_sym.h | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h index 1bafeb4a53e8..3e0dfea94c87 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h @@ -56,14 +56,15 @@ qat_bpicipher_preprocess(struct qat_sym_session *ctx, uint8_t *last_block, *dst, *iv; uint32_t last_block_offset = sym_op->cipher.data.offset + sym_op->cipher.data.length - last_block_len; - last_block = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_src, - uint8_t *, last_block_offset); + last_block = rte_pktmbuf_mtod_offset(sym_op->m_src, uint8_t *, + last_block_offset); if (unlikely((sym_op->m_dst != NULL) && (sym_op->m_dst != sym_op->m_src))) /* out-of-place operation (OOP) */ - dst = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_dst, - uint8_t *, last_block_offset); + dst = rte_pktmbuf_mtod_offset(sym_op->m_dst, + uint8_t *, + last_block_offset); else dst = last_block; diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h index 193281cd9135..d7ceb13b29cd 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -192,13 +192,14 @@ qat_bpicipher_postprocess(struct qat_sym_session *ctx, last_block_offset = sym_op->cipher.data.offset + sym_op->cipher.data.length - last_block_len; - last_block = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_src, - uint8_t *, last_block_offset); + last_block = rte_pktmbuf_mtod_offset(sym_op->m_src, uint8_t *, + last_block_offset); if (unlikely(sym_op->m_dst != NULL)) /* out-of-place operation (OOP) */ - dst = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_dst, - uint8_t *, last_block_offset); + dst = rte_pktmbuf_mtod_offset(sym_op->m_dst, + uint8_t *, + last_block_offset); else dst = last_block; -- 2.39.2