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 6F363A04A8; Wed, 26 Jan 2022 14:13:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10ABD4272A; Wed, 26 Jan 2022 14:13:37 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 37CEA42716 for ; Wed, 26 Jan 2022 14:13:36 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id c190-20020a1c9ac7000000b0035081bc722dso4036823wme.5 for ; Wed, 26 Jan 2022 05:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GGZXvcWxNfPWy0p1jfdY79II/ZVYqY2P88HYPh9C1dk=; b=buWO/x1a0kobPKgxpB4C3Bdgo0CuRP9F/r0Mu/b24hhvtzIiUfp5Mvy69ewpU57uDB zJvZ8n+w6dSl3xzOKIPpemHU7vjNEC8TKCTS8QJZz2pCaZwHQYPTW4L26ciYMDSAppp3 4n2MYG0n/pUKPyVvba0cWZSex13SL2uCS5AiWNVIgzevjsqeDjcyfq1SFz3bAzMPM8k2 mW/uuBV9ZnWg3mT2pFVpHZAJvxzNNgjQuOITTJJvix23uTwgH54UmOCAqM+tKjfiUmdG qOQkZm7y2iQgwJ0p7i7auZQj+z9MDPJHKFSspJwK5QX0IdFeNPoPtfo23+WBHEvg36B0 JAWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GGZXvcWxNfPWy0p1jfdY79II/ZVYqY2P88HYPh9C1dk=; b=e7vVCoKHDnnXIl68MPqc3x11Z3WE17MW2/SjSMmhzt6jnA/HHcndhp7wzWqaRfwY/z hEpHgKapYMMCoq34s7tfT2080KbL3rseZoDxD3kYK9Ng/Bb3c9eR7GrFsjUQceckMAw7 iGOg/tPTAwZ53K8Ag2KnunjeglWbE1eGF/MGLRjP63IsKjyYHKpOfdQz/tpzNKOPKvR4 Ed/d5HzpS9TOvKN3kj71E03pNycVERtnE6DTRdTkiep4YikoobyoAMJ5poMbXtnVZb4E sU/aPqNOEwue6Cmk9QRz4Opj1UlL0xMAdCf6E4Dm4FDhToDQ8pR+gahFt3+gZjox7YuL B8Bg== X-Gm-Message-State: AOAM533XUckaP10A+pnkmNfPjxQXTnrXA+W9E/0xhuBuD+fxHTeQqwuu 5g/BTKR+77mL0qS5uAWXvl0ajw== X-Google-Smtp-Source: ABdhPJwj9q2ROpeoXmdlhxZ2nMmju0u8FqE5YI3f4m2X9bUIX2wkOHKYVOcp+M6A3TNaHEf33AYpeA== X-Received: by 2002:a05:600c:3d94:: with SMTP id bi20mr7406427wmb.14.1643202815963; Wed, 26 Jan 2022 05:13:35 -0800 (PST) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id p26sm3380476wms.2.2022.01.26.05.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 05:13:35 -0800 (PST) Date: Wed, 26 Jan 2022 14:13:34 +0100 From: Olivier Matz To: Thomas Monjalon Cc: liugaoxiang@huawei.com, dev@dpdk.org, Gaoxiang Liu Subject: Re: [PATCH] mbuf: delete dynamic fields copy in hdr copy Message-ID: References: <20211214075606.979-1-gaoxiangliu0@163.com> <1737658.3VsfAaAtOV@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1737658.3VsfAaAtOV@thomas> 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 Hi, On Tue, Jan 11, 2022 at 05:45:49PM +0100, Thomas Monjalon wrote: > 14/12/2021 08:56, Gaoxiang Liu: > > 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. > > Yes, removing operations will improve the performance, > but it looks wrong. > This is copying all dynamic fields, not matter which one is registered. > We cannot ask the application to manage dynamic fields copy, > especially if the copy is done inside a library. +1 Dynamic fields/flags can be registered by applications, libraries, drivers, ... There is no entity that is aware of which field/flag has to be copied, so the only possibility is to copy all of them.