From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EAFFA04F3; Fri, 3 Jan 2020 11:49:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 625771D155; Fri, 3 Jan 2020 11:49:07 +0100 (CET) Received: from mail.thalheim.io (mail.thalheim.io [95.216.112.61]) by dpdk.org (Postfix) with ESMTP id D37E21C06A for ; Sat, 28 Dec 2019 10:40:52 +0100 (CET) Received: from turingmachine (unknown [IPv6:2001:67c:20a1:1192:3ca4:7aa4:adf9:4231]) by mail.thalheim.io (Postfix) with ESMTPSA id 7621E72AB84; Sat, 28 Dec 2019 09:40:51 +0000 (UTC) References: <20191226125410.25591-1-olivier.matz@6wind.com> User-agent: mu4e 1.2.0; emacs 26.3 From: =?utf-8?Q?J=C3=B6rg?= Thalheim To: Olivier Matz Cc: dev@dpdk.org In-reply-to: <20191226125410.25591-1-olivier.matz@6wind.com> Date: Sat, 28 Dec 2019 09:40:46 +0000 Message-ID: <87y2uwlrdt.fsf@thalheim.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: ORIGINATING; auth=pass smtp.auth=joerg@higgsboson.tk smtp.mailfrom=joerg@thalheim.io X-Mailman-Approved-At: Fri, 03 Jan 2020 11:49:00 +0100 Subject: Re: [dpdk-dev] [PATCH] mbuf: document how to set length when attaching ext buffer 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Looks good to me! Olivier Matz writes: > From: J=C3=B6rg Thalheim > > Enhance API documentation of rte_pktmbuf_attach_extbuf() to > explain that the attached mbuf is initialized with length =3D 0. > > Link: https://bugs.dpdk.org/show_bug.cgi?id=3D362 > > Signed-off-by: J=C3=B6rg Thalheim > Signed-off-by: Olivier Matz > --- > > Hi, > > This patch is a slight reword of a patch submitted in bug id 362 by J=C3= =B6rg > Thalheim. > > @J=C3=B6rg, feel free to comment if I missed something. > > Thanks > Olivier > > > lib/librte_mbuf/rte_mbuf.h | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index 219b110b7..2d4bda251 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -924,10 +924,14 @@ rte_pktmbuf_ext_shinfo_init_helper(void *buf_addr, = uint16_t *buf_len, > * provided via shinfo. This callback function will be called once all t= he > * mbufs are detached from the buffer (refcnt becomes zero). > * > - * The headroom for the attaching mbuf will be set to zero and this can = be > - * properly adjusted after attachment. For example, ``rte_pktmbuf_adj()`` > + * The headroom length of the attaching mbuf will be set to zero and this > + * can be properly adjusted after attachment. For example, ``rte_pktmbuf= _adj()`` > * or ``rte_pktmbuf_reset_headroom()`` might be used. > * > + * Similarly, the packet length is initialized to 0. If the buffer conta= ins > + * data, the user has to adjust ``data_len`` and the ``pkt_len`` field of > + * the mbuf accordingly. > + * > * More mbufs can be attached to the same external buffer by > * ``rte_pktmbuf_attach()`` once the external buffer has been attached by > * this API.