From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) by dpdk.org (Postfix) with ESMTP id A0855156 for ; Tue, 12 Nov 2013 11:08:06 +0100 (CET) Received: by mail-we0-f171.google.com with SMTP id t61so2379977wes.16 for ; Tue, 12 Nov 2013 02:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:thread-index :content-language; bh=8MoWmgqfESmNv3aYnXQmDWcIu1hTljOuO8I0ClCHOPI=; b=rpr+sBwggMn5ez0O36TPwsluwx96Xx+kwDLviPpN9GZjiMA0kUHmHxAruRWxlvcm5m GPcSdLfcniGub5H34C775EbA1/P9zpZO5dKsvddwIw5CyoLt3YvDM05a5cs+tLFFHf0f 7SN6Xat0vPOFth14kIEmsvAI3As/vQyQBu+NUeS2vi7cS2bmG7M7fgiLVNDC1gwyEPBJ K+hhCjj/SmgO8Xl3tuoDAAhp/+4IEw8geb4DFvhL5SaKZ9VzoNPT6Hs/fryIcC7c9Xjd 5yVbirt7Ay17Zu9y2d4prFa9/j9I5O4bN0Jp0p5uu3/VG/lTplDZMZ1ItjwoTy+Kzgkw Rtng== X-Received: by 10.180.188.48 with SMTP id fx16mr7324454wic.61.1384250936730; Tue, 12 Nov 2013 02:08:56 -0800 (PST) Received: from elevranwin7 (bzq-109-66-162-27.red.bezeqint.net. [109.66.162.27]) by mx.google.com with ESMTPSA id i8sm42852922wiy.6.2013.11.12.02.08.52 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Nov 2013 02:08:55 -0800 (PST) From: "Etai Lev-Ran" To: "'Jose Gavine Cueto'" References: In-Reply-To: Date: Tue, 12 Nov 2013 12:08:42 +0200 Message-ID: <008701cedf8f$31b7ce90$95276bb0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac7ff+L8OV+vOiwPTYuCOPymE4evHwAB5YdgAAHIbBA= Content-Language: en-us 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:08:06 -0000 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. ============================================================================ ===