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 56E7F42A7F; Sat, 6 May 2023 18:05:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37BE542D59; Sat, 6 May 2023 18:04:19 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id AAA4342D3C for ; Sat, 6 May 2023 18:04:15 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6439b410679so1577585b3a.0 for ; Sat, 06 May 2023 09:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683389055; x=1685981055; 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=DjRUxZ+S3HnN8jLdZvI3rO4HDvVxrsWc87ZDnfZ/sxU=; b=FjO+g4m+7C2TugdlutIv8rRFKwRO4wAl1qr92yytw7gjWF216npuZe7bWAZXEtXlRd EGbeNmIEtbEi3P2Pt9Uv/BPuKAuxeQPP1lFigreOEtlokVGKq9Lo8hpi0JYRHyhA/v26 F79+uQd9FwXjpyxRgqSnpeQsbbLybrq+t2JANGf9BmfLLOhgX2MzLzGr09kzb8uyZL+f j0OjtUMom97FKtcazZ41UDdqtlfU+aTpC1h/FY6tTEIILhowatjDdN83EZLH/q+sfmza PBl8GNETZBCsm9dK9fEAUglCIIwV/0V3oYgpRf4vM7A4TSkJb6SkmbtkyzuT1r8WnCYm ljqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683389055; x=1685981055; 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=DjRUxZ+S3HnN8jLdZvI3rO4HDvVxrsWc87ZDnfZ/sxU=; b=C7Ta5uQlBnvbNRrXfRZGeH8HJcpyhBb/Yj6iyXmfoRdxe++T/ocBAtUtYq767H99Pu StNdlh4Y+XQx0cbAb8So5esb87zUW+imuKxmMePSBlmNpR9Ns4Zs97IsjaqotsFVfxMa 4NeF9XugWvWvBtBXzWywXtLdM/qNilJoXcVM4C11cwZnzo4F7ugP+uMcU8r8/MoEjUTL j+snKvx0itY3EjEyiUoEvv8NZpz2u+7mBMmB/cRibkTJU8OgoGn0c7uXsg3bkCflQGtH xDXqVHliY3DonsLKDbBhPxxdUesK7akrhhPafR5VkNUt+s4NcGL0Y+d+vFjO17HTj8Gi 0FvA== X-Gm-Message-State: AC+VfDwR367HkoyTAwmTKKoAvwKTs+jAVLLJAU3TPlMDTUEKGQtuyY5g 4tnlKuwjwpJx1ql5zT9wksRce0ulziJ6DKtF612CNw== X-Google-Smtp-Source: ACHHUZ6Eii60bxREz4V7V9yS9AWPCAqZCSwCunajH3ANv58boAGmcVEcX1c6PbPMASs1VcjGTTiGEg== X-Received: by 2002:a05:6a21:33a8:b0:f1:c0a1:803f with SMTP id yy40-20020a056a2133a800b000f1c0a1803fmr6064518pzb.45.1683389054966; Sat, 06 May 2023 09:04:14 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id e14-20020a62ee0e000000b006436ffa3dc4sm3369890pfi.24.2023.05.06.09.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 09:04:14 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [PATCH v2 09/14] crypto/qat: use rte_pktmbuf_mtod_offset Date: Sat, 6 May 2023 09:03:58 -0700 Message-Id: <20230506160404.7423-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230506160404.7423-1-stephen@networkplumber.org> References: <20230505174813.133894-1-stephen@networkplumber.org> <20230506160404.7423-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 524c291340da..11f468a9fdc0 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 9a4251e08b47..615e92f01803 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -181,13 +181,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