From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Etai Lev-Ran" Subject: Re: raw frame to rte_mbuf Date: Tue, 12 Nov 2013 12:08:42 +0200 Message-ID: <008701cedf8f$31b7ce90$95276bb0$@com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "'Jose Gavine Cueto'" Return-path: In-Reply-To: Content-Language: en-us List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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-VfR2kkLFssw@public.gmane.org] On Behalf Of Prashant Upadhyaya Sent: Tuesday, November 12, 2013 11:15 AM To: Jose Gavine Cueto; dev-VfR2kkLFssw@public.gmane.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-VfR2kkLFssw@public.gmane.org] On Behalf Of Jose Gavine Cueto Sent: Tuesday, November 12, 2013 1:49 PM To: dev-VfR2kkLFssw@public.gmane.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. ============================================================================ ===