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 9DEBB4601F; Wed, 8 Jan 2025 17:57:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C1C840150; Wed, 8 Jan 2025 17:57:47 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id 73E574014F for ; Wed, 8 Jan 2025 17:57:45 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2ee989553c1so8650a91.3 for ; Wed, 08 Jan 2025 08:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1736355464; x=1736960264; 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=l/rTf/AQp/j8e/4jMWbIngiCSRI0hmFhH/MSpCBHT/o=; b=OmEH6gedDLVzqjJ8aksnKIRxCDZgoll14PzhtSdfrytxemAuuKFXrRURcPZeHw2mDP 8Ftjm0xAHd1ApudY6NCU7N9z0AUznR2ey0jUDoyC+n9bsICVHbM6gncVtlPgw69Ws7ji Lr73F1qYK7KHTruhJ9v6aL7ueQNYMY35tDafF2dYOjhoSeOLZVQfsLTsvSxKtL/h/GRU aj/nKXxS0z/CVvJcqEGCjsw1MuIagaNQdA1HbFqpr4SF2vZ933nvwvV15m4k4lKjj9re r5nH9qW1LV1I2lC62nOZYrZ7mPPEKWxVGlsHVrwGP3oSdpNeGEu9/l9Hlb8FIMBYKCKy 0/nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736355464; x=1736960264; 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=l/rTf/AQp/j8e/4jMWbIngiCSRI0hmFhH/MSpCBHT/o=; b=LaH1BNrcs0OWDBkGkt09s1TDF7PXa7d7AuS5+uKqgNZ1GaegDpGcgpn8oc78AxArwj 39gbV3rtgZGY/gaK2M7zawBMjixcAzhrpBFcb3/F+vKaXxsggFax3vSTbpOHss7n+w3t FvMp2Ek+/JRlcczL/ytKPnYUG2pL3OwG8K0tzKQTgVIJQTPq3HLSijIRQ+ElAXK5yAJS QCFcuefZtSEHtLuSO1sqngA3VCDJInxExcatvih3xQXLFbkqynFyFXRC0WcgGapSsLrb q8hn2zd7S1aONYVdIV05yc8CmzR/3BfpqJrxSQ2bUTAR98W1jhsSwW/4BVZNO9p2lrVa Zgeg== X-Gm-Message-State: AOJu0YxwwV2DM1Ahs79IYAo2prhO+F6EtLxXmm5ZXKlG/ndgbqZ/YQYA I2rabDQq8yRYRmGgW4RZwjTR/bU9gWGlmTxlGShP4eAgi9GkkJ00Dd0wW7XZ530= X-Gm-Gg: ASbGncveXPOsmVgcK6p4+tkMQ1zz7UvczbqNt2pmdVIHbq9hAMsRR2oe/+ZeKQ9MTbX CTVAWIaCsqGjmHJ32yUxpjntBCiyR2cqmzYW8+enyorGcYFTq29UjxitQuWFAccTdPB+Yy2/EzS E972BnkXo6cWr2/pIRsLrsmW5BzY1ALvETI87X8QzvHwkXdmzQh/MKtuD5qhyOX4POSPx6xu+FH ohlgQkCN4QI9TMNoT/2a8S7SRYhS40dtVXowBvhMh0eOq9Vj58D6jauXmmSAXbkWYHvId1BOeTd HX0ipJrQ X-Google-Smtp-Source: AGHT+IE8xdy6SS2w/sq1rs4RIJJqTYnI/FJnQ4NkGKH5Rn+eza+/lmT8BvFRXtMyQizcjmcsnGK2CA== X-Received: by 2002:a17:90b:3a4c:b0:2ee:c9b6:c266 with SMTP id 98e67ed59e1d1-2f548f24967mr4981037a91.13.1736355464354; Wed, 08 Jan 2025 08:57:44 -0800 (PST) Received: from pi5 (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f54a2ad2c5sm1773243a91.26.2025.01.08.08.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 08:57:44 -0800 (PST) Date: Wed, 8 Jan 2025 08:57:40 -0800 From: Stephen Hemminger To: Jie Hai Cc: , , , , , Chengwen Feng , "Wei Hu (Xavier)" , Huisong Li , Subject: Re: [PATCH 1/3] net/hns3: fix simple Tx path incorrect free the mbuf Message-ID: <20250108085740.65815a35@pi5> In-Reply-To: <29acb21d-a6d9-04bd-d528-10d1ccf3f7ce@huawei.com> References: <20241230065405.18552-1-haijie1@huawei.com> <20241230065405.18552-2-haijie1@huawei.com> <20241230095530.7cb2f643@pi5> <29acb21d-a6d9-04bd-d528-10d1ccf3f7ce@huawei.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 8 Jan 2025 10:40:43 +0800 Jie Hai wrote: > On 2024/12/31 1:55, Stephen Hemminger wrote: > > On Mon, 30 Dec 2024 14:54:03 +0800 > > Jie Hai wrote: > > > >> From: Jie Hai > >> To: , , , , , Chengwen Feng , "Wei Hu (Xavier)" , Huisong Li > >> CC: , > >> Subject: [PATCH 1/3] net/hns3: fix simple Tx path incorrect free the mbuf > >> Date: Mon, 30 Dec 2024 14:54:03 +0800 > >> X-Mailer: git-send-email 2.22.0 > >> > >> From: Dengdui Huang > >> > >> When RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload is not set, > >> use rte_pktmbuf_free_seg() to free the mbuf. > >> > >> Fixes: 7ef933908f04 ("net/hns3: add simple Tx path") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Dengdui Huang > >> Signed-off-by: Jie Hai > > > > What about the fast free case which is using rte_mempool_put_bulk when > > it should use rte_pktmbuf_free_bulk instead? > > > > > Hi, Stephen Hemminger, > > During the fast free case, the performance of using > rte_mempool_put_bulk is higher than that of using > rte_pktmbuf_free_bulk because other references > to mbuf do not need to be considered. So it's better > to not change. > > Thanks, > Jie Hai The problem is that having an open coded version of this buried in one driver is a long term potential problem. If you really think that optimizing free like this is noticeable, then why not make a new function "rte_pktmuf_fast_free_bulk" and put it in the regular mbuf library.