[dpdk-dev] Get the socket id

2013-08-07 Thread dvr
hi,
   all
   I'm confused with the following code(Eal_memory.c in 
lib\librte_eal\linuxapp\eal directory, LINE 373):

   nodestr = strstr(buf," N");
   if(nodestr == NULL) {...}
   nodestr += 2;
   end = strstr(nodestr,"=");
   if(end == NULL) {...}
   // here nodestr = "0=1"
   end[0] = '\0';
   end = NULL;
  // here nodestr = "0"
   socket_id = strtoul(nodestr,&end,0);

   Through "printf", I know that:
   buf = "0020 default file=/mnt/dpdk/huge/rtemap_1 huge dirty=1 N0=1"
   And finally socket_id=0
   My question is :why we get the socket_id before "=" instead of after "=" ?
   and if we want to get the character after "N", isn't this code too complex?

   I will be very appreciate for any help.
   Regards!

Maria

-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] Is ”rte_mempool_mp_put_bulk()“ multi-producer safe?

2013-08-13 Thread dvr
hi,
all
I'm confused with some code about mempool:   

rte_mempool.h   ( lib/ librte_mempool ,about line 668) 
rte_mempool_mp_put_bulk();   //put serveral objects back in the 
mempool(multi-producers safe)
rte_mempool_sp_put_bulk();   //put serveral objects back in the mempool(NOT 
multi-producers safe)

rte_mempool.h   ( lib/ librte_mempool ,about line 563) 
__mempool_put_bulk()
{
 ..
 if(unlikely(cache_size==0 || is_mp==0))   
   goto ring_enqueue;
 ..
 //add in cache while there is enough room
while(cache_add_count>0) {
 cache_objs[cache_len]=*obj_table;
 obj_table++;
 cache_len++;
 n--;
 cache_add_count--;
}
 ..
   ring_enqueue:
..
   if(is_mp)
rte_ring_mp_enqueue_bulk();
   else
rte_ring_sp_enqueue_bulk();
..
}

My question is :rte_mempool_mp_put_bulk() and rte_mempool_sp_put_bulk() 
call the same function  __mempool_put_bulk() with different "is_mp" value. If 
is_mp=1, that is ,multi-producer, the code will add these objects in cache 
while there is enough room, when two thread enqueue objects at the same time, 
isn't it unsafe?but the annotation show this function is "multi-producer safe".
Another question: how many thread we can have on a core? just one?

Any help will be appreciate!
Regards
Maria
-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] Is there any instance about pipe-line model?

2013-08-27 Thread dvr
hi,
all,
I know that the "testpmd" application is used to receive and forward packet 
using run-to-completion model. However, I need to use pipe-line model in my 
program. That is, I want to receive packet on one core, and forward it on 
another core, because I have to deal with the packet between the two procedures.
Is there any instance about this case?
I'll be appreciate for any help.
Best Regards!
Maria
-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] A question about the installation of DPDK

2013-06-24 Thread dvr

hi,
  I'm studing Intel DPDK recently, but have a little problem,
  I know that running DPDK need network card driver - igb_uio,
  but after i unload the igb and load igb_uio, the network card can't be 
driven ,how could this be?
  Is there something wrong with my hardware? Or I need do some other 
configuration ?

 # rmmod igb
 # modprobe uio
 # insmod /build/kmod/igb_uio.ko

 # ethtool -i eth0
 cannot get driver information: no such device

network card ? Intel  82575EB Gigabit Network Connection
  driver:igb
  version:3.2.10-k
  bus-info::07:00.0

   Kernel: 2.6.32

  I'm looking foward for your replay, thank you!
   Best wishes?

Maria







-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] The packages needed on CenOS

2013-06-24 Thread dvr

hi,all

 I installed andconfigured DPDK follow the steps described in DPDK Getting 
Started Guide.

but when I perfom the testpmd ,the following error message appers:

 No probed ethernet devices - check that CONFIG_RTE_LIBRTE_IGB_PMD=y and 
CONFIG_RTE_LIBRTE_IXGBE_PMD=y in your configuration file.

How could this happen?

I see that there are some packages needed when using Fedora 14, but the 
system I used is CenOS

the kernel-version is :2.6.32-279.el6.x86_64

Is there any package I need to install on this system?

Thank very much for any replay!

Regards

Maria
-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] The type of ethernet card that DPDK require

2013-06-28 Thread dvr
hi,all
 I'm confused which type of ethernet card that DPDK require.
 After I insmod igb_uio.ko, it seems that this driver cann't make my 
enternet card driven.

Then I find the following code writen in igb_uio.c:

static struct pci_device_id igbuio_pci_ids[]={
#define RET_PCI_DEV_ID_DECL(vend,dev){PCI_DEVICE(vend,dev)};
#include 
{0,},
};

  And in rte_pci_dev_ids.h:

#ifdef RTE_LIBRTE_IGB_PMD
#define E1000_DEV_ID_82576  0x10c9
??

#ifdef RTE_LIBRTE_IXGBe\E_PMD
#define IXGBE_DEV_ID_82598  0x10b6
??

my ethernet card ?82575EB, which wasn't in the list above
driver?igb?3.2.10-k

I will be grateful for any help.
Best Regards

Maria

-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] Can dpdk running on a virtual machine?

2013-09-02 Thread dvr
hi,
all,
Doesn't anyone knows whether dpdk can run on a virtual machine? I tried to 
install dpdk on a virtual machine, and I can implement ?HelloWorld? 
successfully. However, if I want to execute "Test-pmd", what should I do? How 
to config virtual ports and cores?
Any help will be appreciate.
Best Regards.
Maria
-- next part --
An HTML attachment was scrubbed...
URL: 



[dpdk-dev] About install dpdk on virtual machine - vmxnet3-usermap

2013-09-11 Thread dvr
hi,all
   I'm trying to install dpdk on virtual machine. Does the hypervisior must be 
"KVM" or "ESXi 5.0" ? I use ESX 4.1 instead, and encounter some problems:
According to the document "vmxnet3-usermap" on the official website, I 
can't find the "vmx3" folder, and after ?make?, I can't find the 
"vmxnet3-usermap.ko" in "kmod" subdirectory.
My dpdk version is :dpdk-1.3.1r2.
I can install dpdk and run "testpmd" successfully, but after I input 
"testpmd > start tx_first" , the network connection (between my pc and the pc 
installed ESX 4.1) interrupted. How could this happen?
Another question: there are two ports on my virtual machine, after I insmod 
igb_uio.ko ,they both can't connect to outer net, how can I transmit packets to 
them?
Any help will be appreciate.
Best Regards.
Maria



[dpdk-dev] About "Multi-process" sample application

2013-09-12 Thread dvr
hi,all
I tried to run multi-process sample application step by step according to 
the document of "sample_application_user_guide.pdf", but encount a problem: 
only the first rx_queue can receive packages, the other three rx_queue have no 
package at all. How could this happen? Did I need to do some other 
configuration?
Any help will be appreciate.
Best regards.
Maria



[dpdk-dev] Receive packet one by one instead of a bulk of 16

2013-09-16 Thread dvr
hi all,


In "testpmd", the default nb_pkt_per_burst value is 16, that is, receive 16 
packets one time and then forward.
Now, I set nb_pkt_per_burst=1, and after the packet received, delay 50us, 
because I have to add some packet processing steps between receive and 
transmit. However, in this situation, I lost 20% packets. How could this 
happen? And what should I do to have an effect?
Any help will be appreciated.


Best Regards.
Maria