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 D4E9E42DEC; Thu, 6 Jul 2023 20:01:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D75643035; Thu, 6 Jul 2023 19:59:57 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id BFF1643010 for ; Thu, 6 Jul 2023 19:59:52 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-263036d54b9so785476a91.0 for ; Thu, 06 Jul 2023 10:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688666392; x=1691258392; 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=sTYsOswYbss6rQ2Op67E677JuvkEv+uHiezqbZf3rEm/7iFJfBsIDNXZTxGJ9VSkAF bFgT2MFvFg0YDsjvOb9JrcUtBM/i+WIFKdHHcJG1aHrSdPGVpD9/fA8FmUNr2+mqBFjt 0oXIraZK3jHd3S4Iri0ZlUwtG+daG8CMPFzTmoNMCCj5iicKOJCHixojjzaWe5FE2mz2 TWIZLKT5pz5SURo3E3UOW561SSjUUr6Knd6yAnzsvdtF2OXtytkLxS/RZV5rYG9gdHE6 C0bvW99VuGHmktokkW2xmRiKz/7sdX+mNtZsMDqE7HaHEV6waDmkneSWT3a4tNl2ieOu I9AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688666392; x=1691258392; 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=AMap/1rhKsuw4NIFrxJngzuzo82i3Ob+bD2qZO6kM1jPof21uOtxEYEKAmmvLVhR6S JuLhWDnyjNKjZif/vEzG9dItUjIZWxaz4gblIrez+1JYHNVq5HWH+UNezzKVJu0ixDA9 8Y1wfRoXvpIvM62QGlZqutBIi13VHZTNL6D6zNYOO0FYt/XqJZRYVkjHu1a4XDRF2gD0 3nyydYShC7TNt6S7IIxJE5qQonDRU+3H/SCDZcdMpQ32Vb2j0p1lMBuku6i75KcgfFow T75qIOzr+a/OeklDU/8u7gpZ3nnzTL5itgxbvQ9BElB00L1z1aMLFnyex11/43xVxz5q nt8w== X-Gm-Message-State: ABy/qLaSbt6hj+v43pETWGH39luV4yQNQWzvxnwCFF/h6Vb4iX29Eb+T fpJpjqbanKjghYGVBB+PgzAqh9/S+7R1cMiTii8= X-Google-Smtp-Source: APBJJlEwBSDMK6Dqud5s8fELbr9EetjnzjCQYhhBwgfO0Zx32oKwDbcRDFQ+KyWFW2uIyZerzybYAQ== X-Received: by 2002:a17:90b:888:b0:262:fbb0:8737 with SMTP id bj8-20020a17090b088800b00262fbb08737mr2389998pjb.33.1688666391783; Thu, 06 Jul 2023 10:59:51 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 10:59:51 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph Subject: [PATCH v3 11/14] common/cpt: use rte_pktmbuf_mtod_offset Date: Thu, 6 Jul 2023 10:59:35 -0700 Message-Id: <20230706175938.62721-12-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 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