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 8539C42A7F; Sat, 6 May 2023 18:05:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD80442D7E; Sat, 6 May 2023 18:04:22 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id 7C78F42D53 for ; Sat, 6 May 2023 18:04:18 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-64395e2a715so2857219b3a.3 for ; Sat, 06 May 2023 09:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683389058; x=1685981058; 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=rGii1DYJOPSByciL9VGDTiVFe+/frdt+Pr9jAc4n7AL+ZbQetiQImDsxkJZsqcwGvZ NKlYSIh/VnHp3USGMjwqWJWBz9Ys2dPgtDMljJvrcTgMaG/j3xA8ao9aOj+F0C/VZDkZ VUoUb0so7gGMx3fBRmPtHZg4Xn2L87iuvs0FonxAFwKkWKENObxkLwJ4kchPictuSpUo xY4XTEZUyhTC64f3sxerdV4/GtoTJqlzLUq6TvhKFvY/j+ABzrCXX1stKkDSGacS8pLr otrdB6laigpVsyZsggca/OVCCeMKhO5egLt/1AXif/48o2IL1UKoQqzjCMJFmaUOoRCQ kyqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683389058; x=1685981058; 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=eMzZMhkCIkmXYAjPzKg6HNVAtGnPlpVZxpOVlQmZl9v5XzeIw1J4l9+cCVK3nrtmh+ 9SyiUmUifhkKWHne5YmR2DH7qP7PF1N1aBA2dMIVt9L+xBG0aNfxmk1EEd1D56DSZCcJ CY8W8XBB49eDZBD2ofel3apXJq6auGTEqRDsPDfFZslLpTRePDi2n4jAsyRFv/Abt9Yw 9fFD0KskayrOVRL5TmS2kqK8EMvwhBe0Ba/jRWOyYfdT+nZyiutPZyOJea3LJXkDdcRw +o4IB3CtDigORbq7qbM8wwEi4k1A/BlzuMknnKRYf1s362oRAikTNq0OOUixP/uBUdua StWw== X-Gm-Message-State: AC+VfDxWgnGDKOnFv6LabhwR3yeFbMXBdXxORcSi3t1nGSnTfCTAWIRC xSXOIhPHj8aFP1Ws45CijNzM5ES8zB+Lo3xbG8PTnQ== X-Google-Smtp-Source: ACHHUZ7WVEZmPJCpZ+CT+kEjrwBfFbqUN6HR5aphEU6Mq4fh0LsJmVR6FYQgE2Z+d6DkNWVv6xKkZA== X-Received: by 2002:a05:6a00:1346:b0:63b:4313:f8b5 with SMTP id k6-20020a056a00134600b0063b4313f8b5mr6012449pfu.23.1683389057857; Sat, 06 May 2023 09:04:17 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 09:04:17 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Gagandeep Singh , Hemant Agrawal Subject: [PATCH v2 12/14] crypto/caam_jr: use rte_pktmbuf_mtod_offset Date: Sat, 6 May 2023 09:04:01 -0700 Message-Id: <20230506160404.7423-13-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/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