[dpdk-dev] sending and receiving packets

Gal Sagie gal.sagie at gmail.com
Thu Oct 17 17:27:58 CEST 2013


Assigning an IP is a function of the network stack, DPDK and the NIC does
not need to be aware of that.
DPDK is just used to poll packets from the NIC and insert them into the
network stack start point inside rump kernels

In the tcp_http_get example it is assumed you are connected to a DHCP
server , this call is used to obtain an IP for the interface
using DHCP :
 if ((e = rump_pub_netconfig_dhcp_ipv4_oneshot("dpdk0")) != 0)

If you look at the udp echo server example, you can see how to set the IP
address statically using this call:

if (rump_pub_netconfig_ipv4_ifaddr(IFNAME,
            IF_ADDR, "255.255.255.0") != 0)




On Thu, Oct 17, 2013 at 4:26 PM, Gopi Krishna B <gopi97468 at gmail.com> wrote:

>
>
> On Thu, Oct 17, 2013 at 3:01 PM, Gal Sagie <gal.sagie at gmail.com> wrote:
>
>> Rump kernels is a flexible kernel architecture which runs in user space
>> and is a very interesting project, you can read more about it
>> here => http://www.netbsd.org/docs/rump/#rump-about
>> It is currently part of the NetBSD source tree.
>>
>> A project was made to integrate Intel DPDK inside Rump kernel networking
>> layer. (in order to provide a networking stack and user space on top of
>> DPDK)
>> You can read more about it here =>
>> https://github.com/anttikantee/dpdk-rumptcpip
>>
>> By using this you can run TCP Server inside rump kernel client and
>> interface with the physical port using DPDK.
>>
>> Gopi, you didnt give enough information what exactly you are trying to
>> do, you can look at the examples in the dpdk-rumptcpip
>> maybe its best you first try to run them and see everything works.
>>  In order to write a TCP server application on top of Rump kernel you
>> either need to use the rump system call API's (starts with rump_..) or
>> use the libhijack  (You can read more about it in the rump kernels page)
>>
>> Gal
>>
>>>
>>> Hi
> I realized that there are some sample examples available in
> dpdk-rumptcpip, and am currently trying the tcp_http_get example.
>
> But the basic question still remains for me, without assigning an
> IPaddress to the NIC which DPDK is controlling, how does the communication
> happen. In more detail, what is the src_ipaddr in the packet being sent out.
>
> --
> Regards
> Gopi Krishna
>
>
>
>


-- 
Best Regards ,

The G.


More information about the dev mailing list