From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from GWS05.hcl.com (gws05.hcl.com [203.105.185.23]) by dpdk.org (Postfix) with ESMTP id EE71C4AC7 for ; Tue, 15 Mar 2016 10:06:53 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.24,338,1454956200"; d="scan'208";a="154381569" Received: from unknown (HELO NDA-CORP-HT03.CORP.HCL.IN) ([10.248.64.35]) by GWS05.hcl.com with ESMTP/TLS/AES128-SHA; 15 Mar 2016 14:32:20 +0530 Received: from NDA-HCLT-CSHT06.HCLT.CORP.HCL.IN (10.98.132.31) by NDA-CORP-HT03.CORP.HCL.IN (10.248.64.35) with Microsoft SMTP Server (TLS) id 14.3.235.1; Tue, 15 Mar 2016 14:36:12 +0530 Received: from NDA-HCLT-MBS03.HCLT.CORP.HCL.IN ([10.98.132.18]) by NDA-HCLT-CSHT06.HCLT.CORP.HCL.IN ([10.98.132.31]) with mapi id 14.03.0235.001; Tue, 15 Mar 2016 14:36:12 +0530 From: Vivek Gupta To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] Client Server Application using DPDK API Thread-Index: AdF54A5PaJOwzDWBRneQpBafKUz2OAAFL9cAASjo+MA= Date: Tue, 15 Mar 2016 09:06:12 +0000 Message-ID: <488FF59D9020184C9DCF4B4A0DA47814255404B2@NDA-HCLT-MBS03.hclt.corp.hcl.in> References: <488FF59D9020184C9DCF4B4A0DA4781425535B44@NDA-HCLT-MBS03.hclt.corp.hcl.in> <56E052DA.8000901@intel.com> In-Reply-To: <56E052DA.8000901@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.98.134.12] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 15 Mar 2016 10:11:16 +0100 Subject: Re: [dpdk-dev] Client Server Application using DPDK API 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, 15 Mar 2016 09:06:54 -0000 Hi I am developing a network program using DPDK API. I want to extract the dat= a which is there is rte_mbuf structure. Referred to rte_mbuf structure manual but confused with fields = uint16_t buf_len; /**< Length of segment buffer. */ uint16_t data_len; /**< Amount of data in segment buffer. */ Can someone help me to understand how to extract data from buffer? Thanks & regards Vivek Gupta -----Original Message----- From: Remy Horton [mailto:remy.horton@intel.com] = Sent: Wednesday, March 09, 2016 10:14 PM To: Vivek Gupta Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Client Server Application using DPDK API 'noon, On 09/03/2016 08:45, Vivek Gupta wrote: > Hi > > I want to write a Client Server application using DPDK API on a single = > machine. What are the basic building block for that. How can we write = > such application? examples/l2fwd/main.c and examples/ethtool/ethtool-app/main.c are probably = the easier examples to follow. In terms of function calls, it is pretty muc= h: rte_eal_init(..); for (each port) { rte_pktmbuf_pool_create(..); rte_eth_dev_configure(..); rte_eth_dev_rx_queue_setup(..); rte_eth_dev_tx_queue_setup(..); rte_eth_dev_start(..); } while(1) { rte_eth_rx_burst(..); /* incoming frames */ rte_eth_tx_burst(..); /* outgoing frames */ } Bear in mind that DPDK deals with MAC frames rather than higher level IP pa= ckets, which may be an issue if you intend to use TCP/IP based application = protocols. > ::DISCLAIMER:: Avoid using confidentality disclaimers on mailing list emails. It tends to = "annoy" people.. :) Regards, ..Remy ::DISCLAIMER:: ---------------------------------------------------------------------------= ------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and inte= nded for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as informa= tion could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in trans= mission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability = on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the = author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, disse= mination, copying, disclosure, modification, distribution and / or publication of this message without the prior written= consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please= delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses = and other defects. ---------------------------------------------------------------------------= -------------------------------------------------------------------------