From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) by dpdk.org (Postfix) with ESMTP id 7442258E9 for ; Tue, 5 Nov 2013 11:41:37 +0100 (CET) Received: by mail-lb0-f174.google.com with SMTP id q8so6333296lbi.19 for ; Tue, 05 Nov 2013 02:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=i7NWIFF67irBoLwp2ozdl6FXCkeOmvrNiR5Dtstf+DY=; b=0b+xvMNchWa6L4hUS961sgO3v9FNMFbxf2KTlv89l7LwvATr72KOIcCiw6AFTbW3Rc lV9DXlETtBM3lHiwvC6tujt3pOm4atcJNrLwBZt+a3gJ820J1ZO1kB02TAT/WKcu5xR8 CG8KDRQsDdVa7UmoabMibtDqo3Emtcz7Yj+PfioTPc+v82ljoyVWIPa1pTD5uMEovhuQ p+Kr6St6Y7Vuss+AzdH0FiE5L/5/2cxyb2jimvSxrG0S35QSU0sOXq0ealvvNW1y8j5H +IvwbUDRympVgVwEIicutsYLUm/MtKbj9wviveQZXUmjmhgrM/X0k8KU3Pnf47pSN3bn tq6Q== MIME-Version: 1.0 X-Received: by 10.152.29.38 with SMTP id g6mr8632610lah.25.1383648150274; Tue, 05 Nov 2013 02:42:30 -0800 (PST) Received: by 10.114.183.13 with HTTP; Tue, 5 Nov 2013 02:42:30 -0800 (PST) In-Reply-To: <20131105103325.GA25808@debian> References: <20131105103325.GA25808@debian> Date: Tue, 5 Nov 2013 18:42:30 +0800 Message-ID: From: Jose Gavine Cueto To: Jose Gavine Cueto , "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] preallocation of void ** obj_p of rte_ring_dequeue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 10:41:37 -0000 Thank you, I've actually read the code & guide, but I wanted to make sure that what I understood was correct. Cheers, Pepe On Tue, Nov 5, 2013 at 6:33 PM, Cyril Cressent wrote: > On Tue, Nov 05, 2013 at 06:15:01PM +0800, Jose Gavine Cueto wrote: > > > > When using *static int rte_ring_dequeue( structe rte_ring * r, void ** > > obj_p )*, is the user presumed to allocate obj_p , or does this method > > allocates this obj_p ? > > This method doesn't allocate anything ; you have to allocate the object > you want to fill yourself. > > You can find more details about how to work with rings there: > > - DPDK Programmer's Guide (Chapter 5 - Ring Library) > - DPDK API Documentation for rte_ring.h > > Both of which are accessible at http://dpdk.org/doc > > Quite a few sample applications (examples/ directory in the DPDK > distribution) also make use of rings, notably the quota_watermark one, > so it's also a good place to look at. > > On a side note, it looks like the API reference page for rte_ring.h is > broken? It's missing a lot of functions. I'll look into it if I get a > chance. > http://dpdk.org/doc/api/rte__ring_8h.html#func-members > > Cyril > -- To stop learning is like to stop loving.