From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) by dpdk.org (Postfix) with ESMTP id 3916F156 for ; Tue, 12 Nov 2013 11:12:44 +0100 (CET) Received: by mail-la0-f42.google.com with SMTP id ec20so2548801lab.1 for ; Tue, 12 Nov 2013 02:13:39 -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 :cc:content-type; bh=8hRsErzjmeHpu7InK82WC7Vrl1JXv1NnEe/iXObrd/I=; b=rpUU37DBBr147o9Xmeqd/y3krFy9xOokquBeWK73Ft1M8j+z06qDNHKJq4Cv/MVqWd 5dqARql4wkjefLXmOV5MpF/O+ykFKWvj3SVRv1+BAkHvJLkJ/ZoSHy6wGA8gfF9W+Cqu 5Uynzh+dOKfEchn2YFz1/ABhKOS0BGhHbMzkHH4UUZLZqI2zXwO9oPGEe9E9I6OIrZDv vP01xLpMor2tbzzW5g73aN37/SUnDrNLzl/ktfC0uWtSbyqPln78beaXb+pLmT3nY+cQ cNZmlpBcNeHJofGqWRFAEegTdfsiOQwDl6OdiH+9npa30qF+2sLYClfQQm1LPtip/O5v 8aKg== MIME-Version: 1.0 X-Received: by 10.112.144.197 with SMTP id so5mr25999817lbb.22.1384251219173; Tue, 12 Nov 2013 02:13:39 -0800 (PST) Received: by 10.114.181.144 with HTTP; Tue, 12 Nov 2013 02:13:39 -0800 (PST) In-Reply-To: <008701cedf8f$31b7ce90$95276bb0$@com> References: <008701cedf8f$31b7ce90$95276bb0$@com> Date: Tue, 12 Nov 2013 18:13:39 +0800 Message-ID: From: Jose Gavine Cueto To: Etai Lev-Ran Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] raw frame to rte_mbuf 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, 12 Nov 2013 10:12:44 -0000 I see thanks for the tip. Cheers, Pepe On Tue, Nov 12, 2013 at 6:08 PM, Etai Lev-Ran wrote: > Hi Pepe, > > In addition, you may want to consider the frame's lifetime, to ensure > memory > is used and released > in a valid way. > When sending, it may be de-referenced by DPDK and consequently a memory > free > may be tried. > Hence, it is important that the raw buffer used for the ARP packet is > allocated with a > reference added (or, alternately, just add-ref to the packet and ensure > it'll not be freed by DPDK > directly). > > Regards, > Etai > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Prashant Upadhyaya > Sent: Tuesday, November 12, 2013 11:15 AM > To: Jose Gavine Cueto; dev@dpdk.org > Subject: Re: [dpdk-dev] raw frame to rte_mbuf > > Hi Pepe, > > Ofcourse a simple cast will not suffice. > Please look the rte_mbuf structure in the header files and let me know if > you still have the confusion. > There is a header and payload. Your raw frame will go in the payload. > > > Regards > -Prashant > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jose Gavine Cueto > Sent: Tuesday, November 12, 2013 1:49 PM > To: dev@dpdk.org > Subject: [dpdk-dev] raw frame to rte_mbuf > > Hi, > > In DPDK how should a raw ethernet frame converted to rte_mbuf * ? For > example if I have an ARP packet: > > void * arp_pkt > > how should this be converted to an rte_mbuf * for transmission, does a > simple cast suffice ? > > Cheers, > Pepe > > -- > To stop learning is like to stop loving. > > > > > > ============================================================================ > === > Please refer to http://www.aricent.com/legal/email_disclaimer.html > for important disclosures regarding this electronic communication. > > ============================================================================ > === > > -- To stop learning is like to stop loving.