From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by dpdk.org (Postfix) with ESMTP id F28252C8 for ; Tue, 13 Dec 2016 22:41:19 +0100 (CET) Received: by mail-pg0-f42.google.com with SMTP id 3so73320pgd.0 for ; Tue, 13 Dec 2016 13:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F9rcSCjY2RkgMdnryU07jw+D/WnBF9XU7ubGEf2PILM=; b=R2VGTtH1iQJlSWmJpycS3+X6TCRmpRacfqtzcSvvJZSD8J39Bbxr+ypQ+7EaXMDhkC TqKW0bUwuhAWAKybEy8gfQYj0I6vv6HHimCfO3tGCFYw5YRbYn3k8mXAA2dbo6bino+C 93Mis9lHsPycxsqjFWQYSYpVpgcXGniHdV4H+OGRc2eTSOnAJJtcuiusHBGPBRk6W3ev drfL/U35O5FCqU7uQJiXKjwXknVtli1MXIbQbng0WuUvXnmnsqVz8UaCqMuGeM7LzHD2 /q/HoUgpm+GlcxVYWxvUglKrifqPevwsUyAhzxpIbwNJOjwgtR3em5YS7qVwk3jgYaz6 W4XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F9rcSCjY2RkgMdnryU07jw+D/WnBF9XU7ubGEf2PILM=; b=YEKpATReh7UhsjOZixFbjxbmiH/WdwvUwjUMUI/X9S8ILyS5jYcvJsZL3RP6fYkZ/6 nIwLj8ZowOqdR6qXDBtaouG1ZlAElFHCkaQAFoRLVeYwkPQ9W/iIcIE1zgCwvA0cguju 7HBb1BL9vHd/ZsmZgcdDUE6fi0hcbBgDqWj0lLtFLtARYNsfZPgjIxCqf/8Uax0rHNN7 dmNgfIEst0X0fzhEJWItfpk+E5Kdh9x0eEeDOvv8JQQa8FQgymc4ZukQC+HzECBYwqgJ mrrWEZZvC91yBp3m6Znh+PYe7XsHppLXxEZTvmkGspL/92xoW265tO2EbArauDrse80m 1vuw== X-Gm-Message-State: AKaTC024ftYJsY8dc95exGPgR6CnuZDnf5mB/bRA7yHx4Tz60fJcmtQNaUL56nAUbLYdnQ== X-Received: by 10.98.196.199 with SMTP id h68mr103262816pfk.120.1481665278884; Tue, 13 Dec 2016 13:41:18 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id m19sm82074158pfi.24.2016.12.13.13.41.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Dec 2016 13:41:18 -0800 (PST) Date: Tue, 13 Dec 2016 13:41:11 -0800 From: Stephen Hemminger To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: dev@dpdk.org Message-ID: <20161213134111.267100b4@xeon-e3> In-Reply-To: <0af54798c5e025c95e1315ef9b33f4c930177f24.1481590851.git.mirq-linux@rere.qmqm.pl> References: <0af54798c5e025c95e1315ef9b33f4c930177f24.1481590851.git.mirq-linux@rere.qmqm.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 02/13] mbuf: rte_pktmbuf_free_bulk() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 21:41:20 -0000 On Tue, 13 Dec 2016 02:08:15 +0100 (CET) Micha=C5=82 Miros=C5=82aw wrote: > Signed-off-by: Micha=C5=82 Miros=C5=82aw >=20 > --- > lib/librte_mbuf/rte_mbuf.h | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index ead7c6e..a95d99f 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -1248,6 +1248,21 @@ static inline void rte_pktmbuf_free(struct rte_mbu= f *m) > } > =20 > /** > + * Free multiple packet mbufs back into their original mempool(s). > + * > + * @param mp > + * Pointer to array of packet mbufs to be freed. > + * @param n > + * Count of packet mbufs to free. > + */ > +static inline void rte_pktmbuf_free_bulk(struct rte_mbuf **mp, uint32_t = n) > +{ > + uint32_t i; > + for (i =3D 0; i < n; ++i) > + rte_pktmbuf_free(mp[i]); > +} Why not do something smarter that uses mempool_put_bulk?