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 7319242A49; Fri, 5 May 2023 19:49:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2364442D8A; Fri, 5 May 2023 19:48:33 +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 1B27E42D77 for ; Fri, 5 May 2023 19:48:31 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6436e075166so1627527b3a.0 for ; Fri, 05 May 2023 10:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683308910; x=1685900910; 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=YUaoAaCW8daqnEr+cyLfMieQl56BBtKQiVUj96MeO14=; b=x2nNM1JCLTJ+wbZkYbta5z5lkosAfnUl9S9jqvJZeqFSkljkMkgpY0W6ty/a6nAdTQ JAXv5CG6KX7TQtW5pWsfnt/dn0WUSTI/GsOa6m+n2xTCYA5amplMtgM2My1KLZDDDLWV JOhTll5z4ct0yYznfA7QvFes0E0APSDCpXCrcsTO6HX9Ct8X0hBSPyjmB1maGG5v/PDY PfTBTkMeDvEXOVotbZgyNdEKrDGo/numVpQ0lbCelR+DZNc9wUTJjeyojuzlxA3MQbZQ DgWVmAwOFV5X5KbDtNO1U9ij7YuuT5uHQAqjPzQ3ig/Gzt401pjMELn/iSAgh5qxd+XA 5Jkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683308910; x=1685900910; 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=YUaoAaCW8daqnEr+cyLfMieQl56BBtKQiVUj96MeO14=; b=hBKm4TRU4NPC6EupeVYP4/JY8JL1jiNqKnc+2IKS65ZJI6fh9fsRMcfJ+89LTWmiip X2f4Og7qN4ekyHr+sD6z/yVeQdI99csIL6511I/A+WoorT8ZbJ6vRs0gV8Yc146bB3OH 8Xn/7b5V2DKTj9A/k2qqFwpXw5wxUPcsJGYEF0HvxQ9c+8E3/SLQ3YH0DgsmTwaMVOEF Jwj5bl0qLTdkFgKegGaxVk9VTPaATtlJBnXGM2EwWtNxOqI9WcK0NOOG2CpgZxYNG5lv aSPJZpTFmo56x1fon1X1LEp+Boackvcc4WTb7mDcqu1NfHC4/COQnEHRuDRxpHUdJ611 kfvQ== X-Gm-Message-State: AC+VfDwaOMvYyVb0z71NxxFSa9xRw0D9PsOy4TiRfp0e7f7A5SL/PnjV KCfWPN9ZpRUWDc8gAJq7mqQ3pGLzyrvtrz+ZkjFCvg== X-Google-Smtp-Source: ACHHUZ6dNkrGtHzdtKi77hRif8KH0KNdmCFqIW95X9p1UpL4vLl5CxtnNMLbEkhIQaywB5Ze9YO2jg== X-Received: by 2002:a05:6a00:198d:b0:63f:1600:e711 with SMTP id d13-20020a056a00198d00b0063f1600e711mr3036191pfl.29.1683308910022; Fri, 05 May 2023 10:48:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 10:48:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Gagandeep Singh , Hemant Agrawal Subject: [PATCH 12/14] crypto/caam_jr: use rte_pktmbuf_mtod_offset Date: Fri, 5 May 2023 10:48:11 -0700 Message-Id: <20230505174813.133894-13-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/crypto/caam_jr/caam_jr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index b55258689b49..9c96fd21a48d 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -631,15 +631,15 @@ hw_poll_job_ring(struct sec_job_ring_t *job_ring, if (ctx->op->sym->m_dst) { /*TODO check for ip header or other*/ - ip4_hdr = (struct ip *) - rte_pktmbuf_mtod(ctx->op->sym->m_dst, char*); + ip4_hdr = rte_pktmbuf_mtod(ctx->op->sym->m_dst, + struct ip *); ctx->op->sym->m_dst->pkt_len = rte_be_to_cpu_16(ip4_hdr->ip_len); ctx->op->sym->m_dst->data_len = rte_be_to_cpu_16(ip4_hdr->ip_len); } else { - ip4_hdr = (struct ip *) - rte_pktmbuf_mtod(ctx->op->sym->m_src, char*); + ip4_hdr = rte_pktmbuf_mtod(ctx->op->sym->m_src, + struct ip *); ctx->op->sym->m_src->pkt_len = rte_be_to_cpu_16(ip4_hdr->ip_len); ctx->op->sym->m_src->data_len = -- 2.39.2