From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v3] mbuf/ip_frag: Move mbuf chaining to common code Date: Tue, 13 Oct 2015 15:11:49 +0200 Message-ID: <561D0315.7090703@6wind.com> References: <20150831144110.4a7afa27@miho> <55ED3D9A.7070607@6wind.com> <2601191342CEEE43887BDE71AB97725836A83CBA@irsmsx105.ger.corp.intel.com> <55ED5A6A.1000803@6wind.com> <55ED69BA.4010803@netinsight.net> <20150907134324.2d418bd4@miho> <20150907145009.43cb1634@miho> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: Simon Kagstrom Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id B1D485927 for ; Tue, 13 Oct 2015 15:11:55 +0200 (CEST) In-Reply-To: <20150907145009.43cb1634@miho> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Simon, On 09/07/2015 02:50 PM, Simon Kagstrom wrote: > Chaining/segmenting mbufs can be useful in many places, so make it > global. > > Signed-off-by: Simon Kagstrom > Signed-off-by: Johan Faltstrom > > [...] > > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -1775,6 +1775,40 @@ static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m) > } > > /** > + * Chain an mbuf to another, thereby creating a segmented packet. > + * > + * Note: The implementation will do a linear walk over the segments to find > + * the tail entry. For cases when there are many segments, it's better to > + * chain the entries manually. > + * > + * @param head the head of the mbuf chain (the first packet) > + * @param tail the mbuf to put last in the chain > + * > + * @return 0 on success, -EOVERFLOW if the chain is full (256 entries) > + */ Small nit about the API comment, it should be: @param head The head of the mbuf chain (the first packet). ... (note the uppercase and the dot at the end, see the other functions in the file) I know Thomas usually fixes this kind of stuff when he pushes the patches, but it's better if we can avoid him this load :) Regards, Olivier