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 2758542A7F; Sat, 6 May 2023 18:05:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D212B42D75; Sat, 6 May 2023 18:04:21 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id CB44742D3A for ; Sat, 6 May 2023 18:04:17 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-64115e652eeso25832922b3a.0 for ; Sat, 06 May 2023 09:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683389057; x=1685981057; 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=uHOl7ikZRiwr8EvfJO8zGAtsJN8FkKXOFy50FiXm9zE=; b=UDZvKN8FkZ7GSa6ZCZEkqofwMryc5TSy0QzCRUY/F/aMS3w2iD0GDKm0ovjQByuPxa W5gquxm7EJL5/avknRlJ6tt+vYyn+wMsGY3NSPMmlyd4jucotM/1XHL0az/Rj39UMSMM tTyeXh0xOCLaC5s416l4UKWXG3oABkjsvBl5pce6XSePN2+50/q5eg8YhxgydWXLnCjB wpQvpxHK5+GNopk1mYb3qiDOBfvY4H4aW+htJD15JrktSWk/b8y3TMwhn96pvSZYipry ULjv4dqKJ9FnvTiyFYI7f5ZSTsplZz8pMEi9stZv6T69YlUxgH+XaJFu5PSAdj4NaSMN 7CpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683389057; x=1685981057; 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=uHOl7ikZRiwr8EvfJO8zGAtsJN8FkKXOFy50FiXm9zE=; b=ho+tb894Iy71NxnkVi15Ns9HaAh7zgxRAFBDnhoV+PKV6IMWb0SkBckkRXWuPTVa1u uNIveixsJfjE8JxWssX+e0SPrAW49e6e+CFLt3lI/HWSQfTpdfK/pKtFTVNpyqihkd4r lcr2yaWgNfCR3gj89/8alwclPdZCgyyN0Y+wgVFKpfc9NbRgAhU469MsLZlMq/MgsvTX fEe3FVARC1o4wdIRfitHf5LtPhbJG/aaVoRpvgaug4y3w3UWTvTgz0eESQ2zQdzj5zmB h2uXaBbh6aRF0LztkIKEMcvFWPEksC5u9t84V/w8qh6XUxmjtxyGsoGw7oLDR3wm8fWm JTqA== X-Gm-Message-State: AC+VfDyRlQQW6Ojyh9CI+QAGhIdBy8zdKNxe8YGJdHJ6dUUQSVBHk0/Q pshg5ACuVVFCKFheU6mUJ7fpwNshl9yu06hXzDNqqw== X-Google-Smtp-Source: ACHHUZ4D078WkHWbybJ+mwTSjDTsB/VazFxqLyBNDES874Ccq8d1nupng2Z2Ih8osW/ulhmUNgURbw== X-Received: by 2002:a05:6a20:144f:b0:ef:8de0:6a5 with SMTP id a15-20020a056a20144f00b000ef8de006a5mr6244963pzi.3.1683389056818; Sat, 06 May 2023 09:04:16 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 09:04:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph Subject: [PATCH v2 11/14] common/cpt: use rte_pktmbuf_mtod_offset Date: Sat, 6 May 2023 09:04:00 -0700 Message-Id: <20230506160404.7423-12-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 Autogenerated with cocci/mtod-offset.cocci Signed-off-by: Stephen Hemminger --- drivers/common/cpt/cpt_ucode.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h index b393be4cf661..87a3ac80b9da 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -3167,9 +3167,8 @@ fill_fc_params(struct rte_crypto_op *cop, m = m_src; /* hmac immediately following data is best case */ - if (unlikely(rte_pktmbuf_mtod(m, uint8_t *) + - mc_hash_off != - (uint8_t *)sym_op->aead.digest.data)) { + if (unlikely(rte_pktmbuf_mtod_offset(m, uint8_t *, mc_hash_off) != + (uint8_t *)sym_op->aead.digest.data)) { flags |= VALID_MAC_BUF; fc_params.mac_buf.size = sess_misc->mac_len; fc_params.mac_buf.vaddr = @@ -3211,9 +3210,8 @@ fill_fc_params(struct rte_crypto_op *cop, /* hmac immediately following data is best case */ if (!ctx->dec_auth && !ctx->auth_enc && - (unlikely(rte_pktmbuf_mtod(m, uint8_t *) + - mc_hash_off != - (uint8_t *)sym_op->auth.digest.data))) { + (unlikely(rte_pktmbuf_mtod_offset(m, uint8_t *, mc_hash_off) != + (uint8_t *)sym_op->auth.digest.data))) { flags |= VALID_MAC_BUF; fc_params.mac_buf.size = sess_misc->mac_len; -- 2.39.2