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 F1F2542DEC; Thu, 6 Jul 2023 20:01:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F88543038; Thu, 6 Jul 2023 19:59:58 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 9AA9D4300C for ; Thu, 6 Jul 2023 19:59:53 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-26307d808a4so808102a91.1 for ; Thu, 06 Jul 2023 10:59:53 -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=YUaoAaCW8daqnEr+cyLfMieQl56BBtKQiVUj96MeO14=; b=OGd8rUNV2H2pgcOKvXFybbnJbLTP3eZVVfKvpGhHXFkdCmC2M6hvYsXtPzmedlshwV 36ElHmWec0Q/JTanIXrj0Xg9sH48XG7I3DSkBxKG41Hg0RoWCUy1qrm9X/hQZZTLtWci ADJtxA5UBSRrPIcT4LGLrlgPVL4d4DrXD1MSEs9aeVrVOVpRk0UCzQhJVDUX4bnvb7fk lDDx5CT8/o0mFY06as8TZptbjMD+lC7FiHmH0UOksj66sil13iSd+IV5700WsQN22xvM gbHs0D4/5T2Hiv5SJdNuwVqAVR6vh31/MMAvzaXo5HBhgnBX7xCGSwbBWHi83kTaNlH6 RAQg== 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=YUaoAaCW8daqnEr+cyLfMieQl56BBtKQiVUj96MeO14=; b=WXRVmWPFEJhBmUuFa1xkexG6ql6BIKL1g9MZpDQHHGq+lnnCNo8xrmtOaVf3xd/fYi pEFkxTnaeW2qdckbCs/6UDzUlOfE59o0h1D7qmo6SE+7grtmk7VxwgFAcXgo2BDOWzqq mXmGZg8S1XE7+iWt8+xc+IP+xpf3fxpL0WPodfTzaU64XTXOndTMv8ibVnPIIq4wOXA3 hYbEek/6B2lvfQhe3KOKWuDhLHAiiGlF/lQWjO0tctz2qDWXKxUh1FucZS4bJ9ly9Bmj UHayGP8XXvsLTg/nJFZse4gWt/30YUb6+CL1a2kyRK/mKZzYLAUZ3kq9X1q3w5YTGkNM P6wg== X-Gm-Message-State: ABy/qLaJjnE06woWppQfVIdPPGn3RxQHKOytmwk4qCRbtAKiZyKXUBbs zVAEq6djOU7C0/1B76tbrd4esvh5v1AzZvjRqM4= X-Google-Smtp-Source: APBJJlEEqA99ELYe4aZkTIKCTisvIEpLt3FlyR+3xQzDitWbVKglzk4HtVXaANK3a26XMmaUDh0RMw== X-Received: by 2002:a17:90b:3a83:b0:262:d6cb:3567 with SMTP id om3-20020a17090b3a8300b00262d6cb3567mr2524491pjb.26.1688666392630; Thu, 06 Jul 2023 10:59:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 10:59:52 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Gagandeep Singh , Hemant Agrawal Subject: [PATCH v3 12/14] crypto/caam_jr: use rte_pktmbuf_mtod_offset Date: Thu, 6 Jul 2023 10:59:36 -0700 Message-Id: <20230706175938.62721-13-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/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