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 0578BA0032; Fri, 22 Jul 2022 17:52:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9952E4021E; Fri, 22 Jul 2022 17:52:30 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B90A240156 for ; Fri, 22 Jul 2022 17:52:29 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v3] ip_frag: add IPv4 fragment copy packet API Date: Fri, 22 Jul 2022 17:52:28 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D871DE@smartserver.smartshare.dk> In-Reply-To: <20220722074925.2e06fbd5@hermes.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v3] ip_frag: add IPv4 fragment copy packet API Thread-Index: Adid2kDxJ001knsBTNGI8QayoK5+qgACA8Sw References: <1654784398-11315-1-git-send-email-chcchc88@163.com> <1658494910-7869-1-git-send-email-chcchc88@163.com> <20220722074925.2e06fbd5@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Huichao Cai" Cc: , "Stephen Hemminger" , , "Olivier Matz" 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 > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, 22 July 2022 16.49 >=20 > On Fri, 22 Jul 2022 21:01:50 +0800 > Huichao Cai wrote: >=20 > > Some NIC drivers support MBUF_FAST_FREE(Device supports optimization > > for fast release of mbufs. When set application must guarantee that > > per-queue all mbufs comes from the same mempool and has refcnt =3D = 1) > > offload. In order to adapt to this offload function, add this API. > > Add some test data for this API. > > > > Signed-off-by: Huichao Cai >=20 > The code should just be checking that refcnt =3D=3D 1 directly. >=20 > There are cases where sender passes a cloned mbuf. This is = independent > of the fast free optimization. >=20 > Similar to what Linux kernel does with skb_cow(). Olivier just confirmed that MBUF_FAST_FREE requires that the mbufs are = direct and non-segmented, although these requirements are not yet = documented. This means that you should not generate segmented mbufs with this patch. = I don't know what to do instead; probably fail with an appropriate = errno.