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 68ADC42A49; Fri, 5 May 2023 19:49:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1970642D84; Fri, 5 May 2023 19:48:32 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id EEDDC42D69 for ; Fri, 5 May 2023 19:48:29 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-64389a44895so1797990b3a.1 for ; Fri, 05 May 2023 10:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683308909; x=1685900909; 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=DLoTBf8X9Pp0Zi5pqxDkGBdz9KaBqJP776V70MvTpsJdgk7sAmkrgkaSEk0IJ4N6NF eqX8c52ikydaTk9uMKrk65/jff9boxiSsJZgGIdMFXkZezfoxZs/dMlrcHmqF5oVHf6D O+90EY8VqOIJDk4UitXvfkVVOStUMGIKtzX0Y1xdS82fwPscrEngVUg42aJsKW0KOLvd lcSTEoIkErAyE93N6CqaJ+vRVGBYO9phlvtgrYuflqb+ILU3Jncial3GrBR7DoLFht89 nIfkV8tTPOZffpK594Psskh3hXaYAmOuocYnP+imEWNTFImhhyT+YkOsahtdlJFEOmmH zmyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683308909; x=1685900909; 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=Zok9ZCTLqTUB5IeST/AmINN9s53kFsbzand1rRqOQmiGkd4SraBntVIgP43NUqwkaS K6E2pFvPIcNlpkpBgLMTzykPWsJlWbKbZZwz2a7X5ZcHIa0BX6Ep9I11DJ/ZMswF9bhV q/GbuCU1p1wGv6swRjtc7VoJgiihrl3p6WjVn07vvb8YU7BxdsWV2HZHn9/pZAWcns2n EFMJ9rYNCeFdMiLcERHGz8I0MomGl05cUtD1/EOgN4bB3qmQcoohZt8Npwd37uV2Z3RW PYhUqU5YqROfQoZNR0F1oux7baOlJHSd6xo1I0rpzIE4ZWFuMmLCqf+gNSWmmlt7W8pT 0e7Q== X-Gm-Message-State: AC+VfDzb7xUVPC9iakdd+EJ8N7kznrNA7r8F2fBzx0M8Yy3Und7D5Bow mLfiNvK1oo9c7M9E/UiACtF0LA/lok+O/+vTruDxPw== X-Google-Smtp-Source: ACHHUZ7taolrsvIRpyXuyx241H8cA86vZ85YwX70SsATZ6dr/u5Mfr/wlg0GxzC8jdQ6iRtvyrt1Nw== X-Received: by 2002:a05:6a20:1581:b0:f9:1f3e:cccb with SMTP id h1-20020a056a20158100b000f91f3ecccbmr3199247pzj.10.1683308908910; Fri, 05 May 2023 10:48:28 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 10:48:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph Subject: [PATCH 11/14] common/cpt: use rte_pktmbuf_mtod_offset Date: Fri, 5 May 2023 10:48:10 -0700 Message-Id: <20230505174813.133894-12-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 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