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 85E5242DFC; Fri, 7 Jul 2023 22:39:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 941E842D32; Fri, 7 Jul 2023 22:39:22 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 240AE42D0D for ; Fri, 7 Jul 2023 22:39:19 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1b8ad8383faso15789885ad.0 for ; Fri, 07 Jul 2023 13:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688762358; x=1691354358; 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=OGSayFJofy8bhnDuu5frzEHVLNUTbgllxcszb5VKc10=; b=uk5WTEJpfkVt1SITk7jLjJ78IoXJCghjfjaXIqN3FLSLdOUNRaKDb5PxEordl2fhcl SviCGtzMEVsSh6VZOVMBAkP3S4rUYljN7G5v0WfA2G+/33QCwwyij/Li6DSM4cmkDOpi leRYinU+sUflKiMzw1iO0cwzkWfPMCg2Up/qUsF+C4q1MUr05MVIRN3ChuQroqT2PZCf 21vtkAZLOfKOkoZiX1CVrj5l3NSir79pdgm0BGtgjQ/vAZWhjxo3BjDs8j+tWwZAzZt5 Bqccsd47opE5xPVfb9BSrMN/kGkPwz/rnC2XbJ4dwW195vOK3ju1ZypC/pNnvz3NJjQC 1CSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688762358; x=1691354358; 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=OGSayFJofy8bhnDuu5frzEHVLNUTbgllxcszb5VKc10=; b=kh7Zqx6Q7aUBKl5Os7tkkF3sFWNtWVsy2eqgTDKzKfG2vPUtSoe1ZejOfgrGYvmqUY mpVUmZtktbkeFc7/fKunSOPhPgC6bD/FeaoHH1gm0fXhWRFp0EqRnuAEuVakWbdBvly+ /VxqmTPFPgH7iUOsoRBrz3ARhzM23pSXTmarDkx8j7w2B1lYp/zNv7kJDAhLjG1PZX5T OgGvG1wH6VYgwelmpLMXoJQcVtlpRyJxwuqhvhmMyzd0kBBBvICv2+Alh19ranXXxzGK YaGuGmV2xAiMO6OMr40HcJQTYdwnpEXy7fv4N/us0At2rEgfDL6fODHuDaO67rn6klzJ VxKg== X-Gm-Message-State: ABy/qLakTqEWbygopNBWCKQ4fib1ACDNGqPIWzze9t8DEbknTbSacmi8 YAgFCzRi+pUxxUoay9nG3dWGO6gCqvkxtQ1TXX7S9z5g X-Google-Smtp-Source: APBJJlFjCL8w3Tyytk6hqwoYeaajd0fGznHpBAcvWsSliApG+1/7DL1inzaNzMnt39QBg/+K17v7YA== X-Received: by 2002:a17:902:da8b:b0:1b8:6a47:705f with SMTP id j11-20020a170902da8b00b001b86a47705fmr6467266plx.69.1688762358089; Fri, 07 Jul 2023 13:39:18 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id t15-20020a170902b20f00b001b83db0bcf2sm3640493plr.141.2023.07.07.13.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 13:39:17 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru Subject: [PATCH v4 07/11] baseband/fpga: use rte_pktmbuf_offset Date: Fri, 7 Jul 2023 13:39:04 -0700 Message-Id: <20230707203908.64371-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230707203908.64371-1-stephen@networkplumber.org> References: <20230505174813.133894-1-stephen@networkplumber.org> <20230707203908.64371-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 Replace explicit packet offset computations with rte_pktmbuf_mtod_offset(). Signed-off-by: Stephen Hemminger --- drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c index f29565af8cca..465a65f3dca2 100644 --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c @@ -1543,8 +1543,7 @@ fpga_harq_write_loopback(struct fpga_queue *q, rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n"); } - input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_input, - uint8_t *, in_offset); + input = rte_pktmbuf_mtod_offset(harq_input, uint64_t *, in_offset); while (left_length > 0) { if (fpga_reg_read_8(q->d->mmio_base, @@ -1621,8 +1620,8 @@ fpga_harq_read_loopback(struct fpga_queue *q, } left_length = harq_in_length; - input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_output, - uint8_t *, harq_out_offset); + input = rte_pktmbuf_mtod_offset(harq_output, uint64_t *, + harq_out_offset); while (left_length > 0) { fpga_reg_write_32(q->d->mmio_base, -- 2.39.2