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 D97FE4606E; Tue, 14 Jan 2025 18:39:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C92E40299; Tue, 14 Jan 2025 18:39:43 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id B947B40298 for ; Tue, 14 Jan 2025 18:39:41 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-21636268e43so135846675ad.2 for ; Tue, 14 Jan 2025 09:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1736876380; x=1737481180; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=9J8gGfAUTcdMfLssxj6cObqURX+xFVmeWHnVVXNo3IU=; b=iyk8y6+3skHUr9bMwe9QgnMSNZGfqNwgkLVBET4Mp4rij2VgzA8lzIruilQP5PUKgj m3NDDKB3b/Qtl6OTLkMPvQ4k3WQlqp+vUsBxegLZ60MrZM9pguKSLxIa2AjWL0roFZir yUYU0ErwwxfgWTyVGEgqyg9sEB/esHOQZFhkoS24pgGWT2+JBhlAO77lvCFmkr3EZJH+ FPfmpF66bzBqB3B6QOAg3i1DWHuDvMLlCBTH4exWFN2sxOm4oR31Eh+v695bBuUjnrVd oPL1pN21VFoQA+vlv8ivyjufwsQRnyKjd4vMiNkZtWzAFCK+/xfsC0RtZ+TTG+LSYbC3 hg6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736876380; x=1737481180; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9J8gGfAUTcdMfLssxj6cObqURX+xFVmeWHnVVXNo3IU=; b=HHbQpZfYHXAP+WUfV43HP9TRAHbz7pmwu/yRrs1DHfy+LmeAeycxEvVFL/LOP4nhIr 0fihnbOXxLFACBOEIovb/MhV28ZCfn4FxGTFfsJlGFx6c1/zlDWdBqSqfft05amze+SV 42iyLW1LKaV1g21OKvzgELC7PzpVJunb6kRiTgyeaEzUYnF/3yr0HWqUkkzhEA6ANs/g ccUO03TxNcpXsaKXXpl1O2FUvRsLzlyoUtc7N/ZWjirlgL9MJmmqRLPY7WB7qC6WW6xt nObecJtbV6OYMGZ1s5D29tGTX60+yoo7FqWCTyhnXKdn2Fwj2uDgZju56yghaGjVWn0k L6dg== X-Forwarded-Encrypted: i=1; AJvYcCW/BAJnxm6/QFBzxs3PJnQdHTV+O3q2hE0PqGqnls0RWpBRz3FcE1RVg6haNEgGje5aMwM=@dpdk.org X-Gm-Message-State: AOJu0YzK0EATuiUYgXllgOYihylJqogBWXhHM5OVw9kAJh124lPe6M+p E1k3BBur5ngtNt34x64KVrNt/Rrn8VXeeH2pTJnkLGXJH8gYSoAqR2vcJqfatw4= X-Gm-Gg: ASbGncuDXlHry9ei10W6m+i+iYBed356VARoaLYb32dApMPknkDmRXxncO0X3vDqF7I QNAfvbWUDtMGj/6SU3kEmFAJMuz3lc38jdka57+6WmdJw6XoJS676m9z32rzdCzruXaGmACG7Qk p92ZFWeejFmGPa/x9YPmWRv3atvwMoWjr/pvkM27uN8UJadhhPajWthTXw0spnhRS/WqwK7VqWS zPmC6/egfQ10Wj9w+py6KNr7CL60MJqNt+F0ZgR2yORZTsvfX7gj+djSdggYleI7DVNkAtGfEWc Rfk5iAnyOfb7tzU6mSkdpRz6FwMrnu1z4g== X-Google-Smtp-Source: AGHT+IEWfoAaShe9F7Nk8oR4a4pqk50uh8d7txjFSdWpzteoRN7h5w5TmvAa4mWsv+o3ipRvkWMVjw== X-Received: by 2002:a05:6a21:3a8a:b0:1e1:a647:8a54 with SMTP id adf61e73a8af0-1e88cfd1dc4mr39285161637.20.1736876380654; Tue, 14 Jan 2025 09:39:40 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72d7bb13dd6sm1443452b3a.45.2025.01.14.09.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 09:39:40 -0800 (PST) Date: Tue, 14 Jan 2025 09:39:38 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Slava Ovsiienko , Shahaf Shuler , Olivier Matz , dev@dpdk.org Subject: Re: [PATCH v2] mbuf: add fast free bulk function Message-ID: <20250114093938.6a8c4e19@hermes.local> In-Reply-To: <20250114163951.125667-1-mb@smartsharesystems.com> References: <20250114162544.125448-1-mb@smartsharesystems.com> <20250114163951.125667-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Tue, 14 Jan 2025 16:39:51 +0000 Morten Br=C3=B8rup wrote: > mbuf: add fast free bulk function >=20 > When putting an mbuf back into its mempool, there are certain requirements > to the mbuf. Specifically, some of its fields must be initialized. >=20 > These requirements are in fact invariants about free mbufs, held in > mempools, and thus also apply when allocating an mbuf from a mempool. > With this in mind, the additional assertions in rte_mbuf_raw_free() were > moved to __rte_mbuf_raw_sanity_check(). > Furthermore, the assertion regarding pinned external buffer was enhanced; > it now also asserts that the referenced pinned external buffer has > refcnt =3D=3D 1. >=20 > The description of RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE was updated to > include the remaining requirements, which were missing here. >=20 > And finally: > A new rte_mbuf_fast_free_bulk() inline function was added for the benefit > of ethdev drivers supporting fast release of mbufs. > It asserts these requirements and that the mbufs belong to the specified > mempool, and then calls rte_mempool_put_bulk(). >=20 > Signed-off-by: Morten Br=C3=B8rup Since it is a new function it should be marked experimental for now.