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 92D7142DFC; Sat, 8 Jul 2023 03:57:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CD8C42D32; Sat, 8 Jul 2023 03:57:31 +0200 (CEST) Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by mails.dpdk.org (Postfix) with ESMTP id 420B542B8C for ; Sat, 8 Jul 2023 03:57:28 +0200 (CEST) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-1b0719dd966so2525075fac.1 for ; Fri, 07 Jul 2023 18:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688781447; x=1691373447; 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=NiQ2/UbcUn7iVszTHB7gbAqxzzP+TGnmFbwQRb5uaB0=; b=4NgJchL2ClErtHBhm73XOGdYI1nVbsRgUne50Z/pMscrMHe3DM7dDgg8yHp3wBGGiF xMf3YdiTX2EM4L/6DC8Zj0XiGAwPQhUt/dc9d0TdvLjbkeDN+sKLi3E5kGrtSb4JGhmg ztCQHq0RVXRx0SwkYU/+dDe0cicjOJ2zCdS0/3gUA5FNR+PY7R5pcFEk5bNEsTgvQFWD 3jwj1DjHwYwgKs4Y1/oDehuMKlEGD912OuWARSMVYLR3BMUh0cdR+JOA2a5BuyyQ1MLn m1QBqd4tFT9/CKBiGyaKgKRSkzP2QkE/VqNPnrpt7pwW2ro8rhiAmsfcyL5pjeY5Hjq7 HjOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688781447; x=1691373447; 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=NiQ2/UbcUn7iVszTHB7gbAqxzzP+TGnmFbwQRb5uaB0=; b=AbsT0mUXfjPCL8SywfzycnUTP8MY60UH0piQEIl5uJUmz1MlI7OWI/vNs4M6U+xnDq fn0o8wOiTY1tVbCjjiBc/gct0eGtZQ/MEu5G9ntRi0Emima2Qd9UC7QJhHbeWHSEyvXk 5DuOLZ8/6TF2STwce9LX5NEMqgLfcJd34NYBZ7uBMQHH57WRAFcm4K5aoYA0GsOedi3p r6B6HwGglOJdjZcifYbLHwei3N9+gbEbWLjruZrhiYC0l+IyW5satIhTDSy7tSnSc1b0 WpOHOsKPnDQyPWaur+8VAKdskgapMXy6gor/MZ6fj9r9pTm/VI4donrlFq9PP9v9+yLO ctIA== X-Gm-Message-State: ABy/qLZOV0O43WODaEd4CTIJ+Yn4mrMtr+fjcSlIOuW7mx1OuqRbWSa/ HijszXToW1yLtxl2C551VFlCYlCETipu7Ci0IC/xXcHw X-Google-Smtp-Source: APBJJlFIPhxEJPSSYiPxonVyh01IG/PUFRUyTCe7He5E/+SaipAOGl/6YkrlmEWg2A4paB+N0GoRLg== X-Received: by 2002:a05:6870:3453:b0:1a2:8f84:31ec with SMTP id i19-20020a056870345300b001a28f8431ecmr7895501oah.31.1688781447412; Fri, 07 Jul 2023 18:57:27 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id 24-20020a17090a035800b00263f5ac814esm2260269pjf.38.2023.07.07.18.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 18:57:27 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 06/11] net/tap: use rte_pktmbuf_motd_offset Date: Fri, 7 Jul 2023 18:57:13 -0700 Message-Id: <20230708015718.75565-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230708015718.75565-1-stephen@networkplumber.org> References: <20230505174813.133894-1-stephen@networkplumber.org> <20230708015718.75565-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/net/tap/rte_eth_tap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index bf98f7555990..968a1b6b45df 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -672,8 +672,8 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs, if (seg_len > l234_hlen) { iovecs[k].iov_len = seg_len - l234_hlen; iovecs[k].iov_base = - rte_pktmbuf_mtod(seg, char *) + - l234_hlen; + rte_pktmbuf_mtod_offset(seg, char *, + l234_hlen); tap_tx_l4_add_rcksum(iovecs[k].iov_base, iovecs[k].iov_len, l4_cksum, &l4_raw_cksum); -- 2.39.2