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 B2420A00C3; Tue, 14 Dec 2021 08:56:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A239C410E4; Tue, 14 Dec 2021 08:56:37 +0100 (CET) Received: from m12-16.163.com (m12-16.163.com [220.181.12.16]) by mails.dpdk.org (Postfix) with ESMTP id 31146406A2 for ; Tue, 14 Dec 2021 08:56:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=su3pH jKpHCtTimS5gmlJ2ZQL4IVsuE/JU/Z4/U4DeX8=; b=B6pk98fy4WtC12+QxfXEC UxNpYOYzZ1qInvOzB+gJn/LaBS4QDatzmyMlzOMo7xNUPhxEDmh2bDCz/0bdPyPR FiklPbKsDAvQAsMd2ik9xAnx3jU3B/MfDjIdw8aHkCroLDS5q7V5x53ThyvSRXS+ 0DSwOFIbmLxX5JW7fbFbnk= Received: from DESKTOP-ONA2IA7.localdomain (unknown [223.104.246.147]) by smtp12 (Coremail) with SMTP id EMCowABHp6MaTrhh84NLBw--.30113S4; Tue, 14 Dec 2021 15:56:25 +0800 (CST) From: Gaoxiang Liu To: dev@dpdk.org, Olivier Matz Cc: liugaoxiang@huawei.com, Gaoxiang Liu Subject: [PATCH] mbuf: delete dynamic fields copy in hdr copy Date: Tue, 14 Dec 2021 15:56:05 +0800 Message-Id: <20211214075606.979-1-gaoxiangliu0@163.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EMCowABHp6MaTrhh84NLBw--.30113S4 X-Coremail-Antispam: 1Uf129KBjvdXoWrKFyxXF4DAr1rCF4rGF4kZwb_yoWfCFX_uw 40qF4xAayUZr48Xw45ta4UK3ykZan7uFnY9w15trn7J34Yqwn5XFs8Ar4rWFZ0gFsrCa1f ur43ua48Kr4ftjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xREVWltUUUUU== X-Originating-IP: [223.104.246.147] X-CM-SenderInfo: xjdr5xxdqjzxjxq6il2tof0z/1tbi6wlpOlXlyiwsxQAAsO 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 Because dynamic fields are registered by the DPDK application, so it is up to the application to decide whether to copy the value of dynamic fields. So delete dynamic fields copy in __rte_pktmbuf_copy_hdr. It's more flexible for the DPDK application, and is useful for improving performance. Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") Signed-off-by: Gaoxiang Liu --- lib/mbuf/rte_mbuf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index dedf83c38d..e2dfd47442 100644 --- a/lib/mbuf/rte_mbuf.h +++ b/lib/mbuf/rte_mbuf.h @@ -1101,7 +1101,6 @@ __rte_pktmbuf_copy_hdr(struct rte_mbuf *mdst, const struct rte_mbuf *msrc) mdst->tx_offload = msrc->tx_offload; mdst->hash = msrc->hash; mdst->packet_type = msrc->packet_type; - rte_mbuf_dynfield_copy(mdst, msrc); } /** -- 2.32.0