From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by dpdk.org (Postfix) with ESMTP id 4821668B1 for ; Mon, 24 Jun 2013 07:03:00 +0200 (CEST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.14.5/8.14.3) with ESMTP id r5O53Cq1017122 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 23 Jun 2013 22:03:12 -0700 (PDT) Received: from ALA-MBA.corp.ad.wrs.com ([169.254.2.88]) by ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) with mapi id 14.02.0342.003; Sun, 23 Jun 2013 22:03:12 -0700 From: "Wiles, Roger Keith" To: Peter Chen Thread-Topic: [dpdk-dev] Sending & Receiving Packets Thread-Index: AQHOcJa++ToMtBu+hEmJiK1ZJ/mU5ZlExGkA Date: Mon, 24 Jun 2013 05:03:11 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.40.165] Content-Type: multipart/alternative; boundary="_000_CED3AAF9FD13441C9A83145F3E0EBB7Fwindrivercom_" MIME-Version: 1.0 Cc: "" Subject: Re: [dpdk-dev] Sending & Receiving Packets 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: Mon, 24 Jun 2013 05:03:00 -0000 --_000_CED3AAF9FD13441C9A83145F3E0EBB7Fwindrivercom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Peter, When DPDK is running on the server it takes control of the ports, which mea= ns the network stack that would answer a ping (ICMP Echo) would not be atta= ched to the port any more. You would have to add code to DPDK as an applica= tion to receive the ICMP Echo packet and respond with a ICMP Reply packet. = The other method would be to attach a network stack as the application to D= PDK and use that network stack to receive and send packets. Writing a simple DPDK application to receive packets off the ports and look= for ICMP Echo request and to respond with a ICMP Echo reply is not that ha= rd as I do that work in Pktgen. If you want to do more then just grab packe= ts and determine if you need to send out a packet you would need to port so= me stack on top of DPDK like lwIP. You can this other ways, but it would ta= ke a bit more text to describe. Have a look at Pktgen on GitHub and you can look at that code for a basic e= xample. Thank you, ++Keith ------------------------------- Keith Wiles Principal Technologist for Networking cell 972-213-5533 Wind River Systems On Jun 23, 2013, at 11:52 PM, Peter Chen > wrote: I was wondering how I can send/receive packets from my computer to my serve= r which has dpdk running. Since what seems to happen is that dpdk binds to = the ethernet device, what would be its IP address? For example how would I send a ping from one computer to my server with dpd= k binded to the NIC? Would I send a packet with only MAC address and dpdk binded NIC would pick = it up and move the packet up to dpdk and then to the user space? Just kind = of confused how that works. I would be grateful for any help! Peter --_000_CED3AAF9FD13441C9A83145F3E0EBB7Fwindrivercom_ Content-Type: text/html; charset="iso-8859-1" Content-ID: <982A14C15ED61649A35E6D4FB08C54E7@local> Content-Transfer-Encoding: quoted-printable Hi Peter,

When DPDK is running on the server it takes control of the ports, whic= h means the network stack that would answer a ping (ICMP Echo) would not be= attached to the port any more. You would have to add code to DPDK as an ap= plication to receive the ICMP Echo packet and respond with a ICMP Reply packet. The other method would be to = attach a network stack as the application to DPDK and use that network stac= k to receive and send packets.

Writing a simple DPDK application to receive packets off the ports and= look for ICMP Echo request and to respond with a ICMP Echo reply is not th= at hard as I do that work in Pktgen. If you want to do more then just grab = packets and determine if you need to send out a packet you would need to port some stack on top of DPDK like= lwIP. You can this other ways, but it would take a bit more text to descri= be.

Have a look at Pktgen on GitHub and you can look at that code for a ba= sic example.

Thank you, ++Keith
-------------------------------
Keith Wiles
Principal Technologist for Networking
cell 972-213-5533
Wind River Systems






On Jun 23, 2013, at 11:52 PM, Peter Chen <peter.feifan.chen@gmail.com>
 wrote:

I was wondering how I can send/receive packets from my com= puter to my server which has dpdk running. Since what seems to happen is th= at dpdk binds to the ethernet device, what would be its IP address? 
For example how would I send a ping from one computer to my server with dpd= k binded to the NIC?

Would I send a packet with only MAC address and dpdk binded= NIC would pick it up and move the packet up to dpdk and then to the user s= pace? Just kind of confused how that works. I would be grateful for any hel= p!

Peter

--_000_CED3AAF9FD13441C9A83145F3E0EBB7Fwindrivercom_--