[dpdk-users] VIRTIO-USER & Hugepages
Good evening. I am testing a setup where vpp-native+vhost & testpmd+virtio-user in a container are setup to communicate. The data indication occurs in vhost, I could see the packet length being right. But all the contents of the packet are empty. Is there any limitation from the virtio-user driver part and/or VIRTIO_RING that would cause this. I am using 2MB hugepages with -file-prefix=vpp (in host ) & --file-prefix=testpmdtx (in container). Appreciate the insight. --GG
Re: [dpdk-users] General Questions
09/04/2020 17:32, Stephen Hemminger: > On Thu, 9 Apr 2020 20:57:19 +0530 > Shyam Shrivastav wrote: > > > From my experience as dpdk user > > > > On Thu, Apr 9, 2020 at 11:41 AM Cristofer Martins < > > cristofermart...@hotmail.com> wrote: > > > > > Well the reason i thought about using dpdk(together with a user space tcp > > > stack) is because my tcp code spend so much time with syscalls that > > > removing that would allow better throughput and latency. Is this a valid > > > reason? My software runs in single core(and most of time in cheap vps) so > > > i > > > want to extract the best i can from them. > > > > > > > Yes using dpdk instead of getting packets from kernel stack increases > > performance > > > > > > > > > The other question is, can dpdk runs alongside with the linux network > > > stack? I want to use dpdk in my special app but i still want to have ssh > > > and apps working as expected without any modification. > > > > > Interface used by dpdk is not available, at least another interface > > required for management/access & other network apps > > > > > > > > > > > > Thanks in advance. > > > > > This might be a good use case for AF_XDP with or without DPDK AF_XDP helps to use a device both with Linux stack and userland application. This capability is what we call the bifurcated model. The Mellanox drivers are also using a bifurcated model: the same device can send some packet flows to the kernel interface, and other (configured) packet flows to the DPDK interface.
Re: [dpdk-users] Calling timers from a library
On Thu, 9 Apr 2020 21:18:45 +0530 Archit Pandey wrote: > Thanks for the tip! > > This was what I experienced when I ran a separate function with periodic > calls to rte_timer_manage(). The code would deadlock and stop executing > after a few seconds. > > Is there a way to overcome this? Perhaps by passing the core numbers into > the library? The best advice is to stick to the DPDK threads. There are multiple ways to do multiple events in one thread.
Re: [dpdk-users] Calling timers from a library
Thanks for the tip! This was what I experienced when I ran a separate function with periodic calls to rte_timer_manage(). The code would deadlock and stop executing after a few seconds. Is there a way to overcome this? Perhaps by passing the core numbers into the library? -- Archit Pandey Senior Year Undergraduate Student Department of Computer Science and Engineering National Institute of Technology Karnataka Surathkal, India On Thu, 9 Apr 2020, 8:27 pm Stephen Hemminger, wrote: > On Thu, 9 Apr 2020 11:37:12 +0530 > Archit Pandey wrote: > > > Hello DPDK users, > > > > I'm building a library for DPDK which utilizes periodically called > > functions using the dpdk timer facility. Currently, I'm using the master > > core on an application to call timer_manage() and run the scheduled > timers. > > > > My doubt is whether its possible to call timer_manage() from inside the > > library to run the scheduled timers. This would allow for a much more > > streamlined design. An issue which comes to mind is that my library is > not > > aware of the cores it is being run on, hence I cannot use > > rte_eal_remote_launch() for a function that calls rte_timer_manage(). > > > > Any help on how I can do this would be greatly appreciated! > > > > Thanks and regards, > > > > In my experience, once you start running DPDK functions on > non-DPDK threads lots of things can break. The DPDK threads are pinned > to a core and therefore don't preempt each other. For non-DPDK threads > they are not pinned; therefore a DPDK library or other code using > rte_spinlocks can get preempted with and self-deadlock. >
Re: [dpdk-users] General Questions
On Thu, 9 Apr 2020 20:57:19 +0530 Shyam Shrivastav wrote: > From my experience as dpdk user > > On Thu, Apr 9, 2020 at 11:41 AM Cristofer Martins < > cristofermart...@hotmail.com> wrote: > > > Well the reason i thought about using dpdk(together with a user space tcp > > stack) is because my tcp code spend so much time with syscalls that > > removing that would allow better throughput and latency. Is this a valid > > reason? My software runs in single core(and most of time in cheap vps) so i > > want to extract the best i can from them. > > > > Yes using dpdk instead of getting packets from kernel stack increases > performance > > > > > The other question is, can dpdk runs alongside with the linux network > > stack? I want to use dpdk in my special app but i still want to have ssh > > and apps working as expected without any modification. > > > Interface used by dpdk is not available, at least another interface > required for management/access & other network apps > > > > > > > Thanks in advance. > > This might be a good use case for AF_XDP with or without DPDK
Re: [dpdk-users] General Questions
>From my experience as dpdk user On Thu, Apr 9, 2020 at 11:41 AM Cristofer Martins < cristofermart...@hotmail.com> wrote: > Well the reason i thought about using dpdk(together with a user space tcp > stack) is because my tcp code spend so much time with syscalls that > removing that would allow better throughput and latency. Is this a valid > reason? My software runs in single core(and most of time in cheap vps) so i > want to extract the best i can from them. > Yes using dpdk instead of getting packets from kernel stack increases performance > The other question is, can dpdk runs alongside with the linux network > stack? I want to use dpdk in my special app but i still want to have ssh > and apps working as expected without any modification. > Interface used by dpdk is not available, at least another interface required for management/access & other network apps > > Thanks in advance. >
Re: [dpdk-users] General Questions
On Thu, 9 Apr 2020 06:11:28 + Cristofer Martins wrote: > Well the reason i thought about using dpdk(together with a user space tcp > stack) is because my tcp code spend so much time with syscalls that removing > that would allow better throughput and latency. Is this a valid reason? My > software runs in single core(and most of time in cheap vps) so i want to > extract the best i can from them. > The other question is, can dpdk runs alongside with the linux network stack? > I want to use dpdk in my special app but i still want to have ssh and apps > working as expected without any modification. > > Thanks in advance. > If you are doing syscalls in your DPDK application, then you are defeating the point of DPDK and you are better off using the kernel networking stack.
Re: [dpdk-users] Calling timers from a library
On Thu, 9 Apr 2020 11:37:12 +0530 Archit Pandey wrote: > Hello DPDK users, > > I'm building a library for DPDK which utilizes periodically called > functions using the dpdk timer facility. Currently, I'm using the master > core on an application to call timer_manage() and run the scheduled timers. > > My doubt is whether its possible to call timer_manage() from inside the > library to run the scheduled timers. This would allow for a much more > streamlined design. An issue which comes to mind is that my library is not > aware of the cores it is being run on, hence I cannot use > rte_eal_remote_launch() for a function that calls rte_timer_manage(). > > Any help on how I can do this would be greatly appreciated! > > Thanks and regards, > In my experience, once you start running DPDK functions on non-DPDK threads lots of things can break. The DPDK threads are pinned to a core and therefore don't preempt each other. For non-DPDK threads they are not pinned; therefore a DPDK library or other code using rte_spinlocks can get preempted with and self-deadlock.