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 A90E442A49; Fri, 5 May 2023 19:49:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6604342D64; Fri, 5 May 2023 19:48:29 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id B686E42D5E for ; Fri, 5 May 2023 19:48:27 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-643465067d1so1639854b3a.0 for ; Fri, 05 May 2023 10:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683308907; x=1685900907; 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=sVdSVc9Lr1RKk3G/PUZuBzpBmhzRs76cvI38GWqp5OSCtT9E9hjUdovOpI6GShpJ2O 0mQcI4wcRbiTh71u2Qn/QvI4cbXrDqbSmyGIokbSiGGTALUDOQqjyxtVqr9uiyMpCMkK 5Wtf+yf60jaTI+b/8blY5eY0LlvAsKRAMUH8uf7Q3TOzUiz+BSxFcG/Lz1U9pxvVdM44 4HXXGvWYTjYTC64/UIrnH2ytDZueQFM0qBOma/Yh0atI49qwXYGwpl4HGa6pIGnSzgSC sMxa9VwDqSLp8Jau8fM8iCUCv18wfsZW0s50YMvpuojiDMjL5DwUtjBKNQS82QIDv9I8 xvzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683308907; x=1685900907; 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=DSz29sfmr2Umfk9Ts1rr4X+r180QsPDdrnNf1pjD3DCnh5lr61sgeh4LfsJhAmMobE g5k+ECWoPbWh3qkBO/X4b5D1AOrbBfHDcvHFGXM1DGoLJ1T5K8zoN/nIJqSi4jH19x/0 9puzR+66iK64JDmM38Qgg3TeRAs35urUkZpDK2wMD21SJEqBCflJFnW0JaZIhsK6NRKQ 05uT7ASqkJEoe+To51kLDR/ZnnT2m+SF81LCHtetQKcQqYivAxbqNScWJrGowVFuY9Tw d5oIeJp+t2HuWsQa3kDjEQtRT0t7+uVoYRu4iccHUYB4kNVwcQ4lQsZXqqRRlnCgXAtb 8q9g== X-Gm-Message-State: AC+VfDwU5THDxJzTP1rv2zjbGZPWfSBnOEjsiO9a3y8E3evNNui9Ufsz baTrG9aEERj/77p0wmCOTGn4QGxhZ1X4bDHBCyIzQg== X-Google-Smtp-Source: ACHHUZ4vs1C6s1/N8QI0NG/01HtKe3ebOOIqQNnK8Lf2FG/4DfQcKOqvWetb2aVnb5XnBrwpOsM+7Q== X-Received: by 2002:a05:6a21:168f:b0:ef:7d7b:433a with SMTP id np15-20020a056a21168f00b000ef7d7b433amr2284321pzb.47.1683308906720; Fri, 05 May 2023 10:48:26 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id a15-20020aa780cf000000b0063799398eb9sm1895707pfn.58.2023.05.05.10.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 10:48:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [PATCH 09/14] crypto/qat: use rte_pktmbuf_mtod_offset Date: Fri, 5 May 2023 10:48:08 -0700 Message-Id: <20230505174813.133894-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230505174813.133894-1-stephen@networkplumber.org> References: <20230505174813.133894-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