[dpdk-dev] Ring PMD: why are stats counters atomic?

2016-08-15 Thread Mauricio Vásquez
Finally I have some time to have a look to it. On Mon, May 16, 2016 at 3:16 PM, Bruce Richardson wrote: > On Mon, May 16, 2016 at 03:12:10PM +0200, Mauricio V?squez wrote: >> Hello Bruce, >> >> Although having this support does not harm anyone, I am not convinced that >> it is useful, mainly beca

[dpdk-dev] Redirect all packets to a specific VM pool

2016-07-11 Thread Mauricio Vásquez
Hello, To be more specific, what I am trying to do it to setup an environment where I have a physical NIC that has some Virtual Functions configured, then all the incoming traffic to the NIC should be forwarded to a specific Virtual Function. I was able to modify the "VMDQ and DCB Forwarding Samp

[dpdk-dev] Redirect all packets to a specific VM pool

2016-07-04 Thread Mauricio Vásquez
Hello, I have a setup with SR-IOV where I want to forward all the packets to a specific VM pool. I found that in some Intel NICs it is possible to set a field called default pool. (Flag DEF_PL within the PFVTCTL register). In order to setup this using DPDK, I used the default_pool field in the rt

[dpdk-dev] queue to VF assigment in SR-IOV

2016-06-21 Thread Mauricio Vásquez
Hello Alexander, On Mon, Jun 13, 2016 at 6:02 PM, Alexander Duyck wrote: > On Mon, Jun 13, 2016 at 4:56 AM, Mauricio V?squez > wrote: > > Hello Alexander, > > > > On Tue, Jun 7, 2016 at 11:31 PM, Alexander Duyck < > alexander.duyck at gmail.com> > > wrote: > >> > >> On Tue, Jun 7, 2016 at 1:49

[dpdk-dev] queue to VF assigment in SR-IOV

2016-06-13 Thread Mauricio Vásquez
Hello Alexander, On Tue, Jun 7, 2016 at 11:31 PM, Alexander Duyck wrote: > On Tue, Jun 7, 2016 at 1:49 PM, Mauricio V?squez > wrote: > > Dear All, > > > > I implemented a program that uses flow director to forward packets to a > > specific virtual function, however I faced the problem that I di

[dpdk-dev] queue to VF assigment in SR-IOV

2016-06-07 Thread Mauricio Vásquez
Dear All, I implemented a program that uses flow director to forward packets to a specific virtual function, however I faced the problem that I did not know which queue belongs to a VF. I found in [1] that in the case of Intel 82599, queues 0-7 belongs to VF0, 8-15 to VF1 and so on, I tested it bu

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Mauricio Vásquez
On Wed, May 18, 2016 at 5:43 PM, Thomas Monjalon wrote: > 2016-05-18 17:25, Mauricio V?squez: > > On Wed, May 18, 2016 at 5:01 PM, Thomas Monjalon < > thomas.monjalon at 6wind.com> > > wrote: > > > > > 2016-05-18 16:41, Mauricio V?squez: > > > > On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon <

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Mauricio Vásquez
On Wed, May 18, 2016 at 5:01 PM, Thomas Monjalon wrote: > 2016-05-18 16:41, Mauricio V?squez: > > On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon < > thomas.monjalon at 6wind.com > > > wrote: > > > > > 2016-05-17 22:02, Mauricio V?squez: > > > > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Mauricio Vásquez
On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon wrote: > 2016-05-17 22:02, Mauricio V?squez: > > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon < > thomas.monjalon at 6wind.com> > > wrote: > > > 2016-04-29 17:23, Mauricio Vasquez B: > > > > The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used in

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-17 Thread Mauricio Vásquez
Hello Thomas, On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon wrote: > 2016-04-29 17:23, Mauricio Vasquez B: > > The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used in some places > > to check if a port id is valid or not. This commit makes use of it in > > some new parts of the code. > > There

[dpdk-dev] Ring PMD: why are stats counters atomic?

2016-05-16 Thread Mauricio Vásquez
Hello Bruce, Although having this support does not harm anyone, I am not convinced that it is useful, mainly because there exists the single-thread limitation in other PMDs. Then, if an application has to use different kind of NICs (i.e, different PMDs) it has to implement the locking strategies.

[dpdk-dev] Ring PMD: why are stats counters atomic?

2016-05-10 Thread Mauricio Vásquez
Hello, Per-queue stats counters are defined as rte_atomic64_t, in the tx/rx functions, they are atomically increased if the rings have the multiple consumers/producer flag enabled. According to the design principles, the application should not invoke those functions on the same queue on different

[dpdk-dev] ivshmem is secure or not ? why ?

2016-04-22 Thread Mauricio Vásquez
Hello Yangyongqiang, On Fri, Apr 22, 2016 at 9:55 AM, Yangyongqiang (Tony, Shannon) < yangyongqiang at huawei.com> wrote: > From http://dpdk.org/doc/guides/prog_guide/ivshmem_lib.html, I get this > : different vms can use different metadatas, so different vms can have > different memory shared w

[dpdk-dev] [PATCH] mem: fix freeing of memzone used by ivshmem

2016-04-15 Thread Mauricio Vásquez
This patch does not compile when ivshmem is disabled: compile error: CC malloc_heap.o /home/patchWorkOrg/compilation/lib/librte_eal/common/eal_common_memzone.c(353): error #177: label "error" was declared but never referenced error: ^ I'll send a v2 solving this issue On Thu, Apr 14, 2

[dpdk-dev] [PATCH] ivshmem: fix race condition

2016-04-01 Thread Mauricio Vásquez
Hi Anatoly, On Fri, Apr 1, 2016 at 11:01 AM, Burakov, Anatoly wrote: > Hi Mauricio, > > > The memory zone could be freed just after adding it to the metadata > > file and just before marking it as not freeable. > > This patch changes the locking logic in order to prevent it. > > Just a nit: if t

[dpdk-dev] Question about cd10c42eb5bc ("mem: fix ivshmem freeing")

2016-04-01 Thread Mauricio Vásquez
Sure: http://dpdk.org/ml/archives/dev/2016-April/036884.html, On Wed, Mar 30, 2016 at 2:10 PM, Burakov, Anatoly wrote: > Hi Mauricio, > > > > Good points. Would you be willing to prepare a patch to fix these issues? > > > > Thanks, > > Anatoly > > > > *From:* Mauricio V?squez [mailto:mauricio.va

[dpdk-dev] Question about cd10c42eb5bc ("mem: fix ivshmem freeing")

2016-03-30 Thread Mauricio Vásquez
Hi Anatoly, Thank you very much, I did not take into account that detail. I have two additional concerns about it: 1. I think it is possible to have a race condition. The memzone is marked as not freeable after it has been added to the ivshmem device, then it is possible to free the memzone just

[dpdk-dev] Question about cd10c42eb5bc ("mem: fix ivshmem freeing")

2016-03-30 Thread Mauricio Vásquez
Dear All, I was looking at that patch, I can understand its functionality but not its implementation.. Why to calculate idx?, Just doing "mz->ioremap_addr = mz->phys_addr" would not be sufficient? After all, the goal is to mark the memzone as used by ivshmem to forbid freeing it. Please correct

[dpdk-dev] [PATCH] mempool: allow for user-owned mempool caches

2016-03-25 Thread Mauricio Vásquez
Hello to everybody, I find this proposal very interesting as It could be used to solve an issue that has not been mentioned yet: using memory pools shared with ivshmem. Currently, due to the per lcore cache, it is not possible to allocate and deallocate packets from the guest as it will cause cach

[dpdk-dev] [PATCH v2] ring: check for zero objects mc dequeue / mp enqueue

2016-03-18 Thread Mauricio Vásquez
Hi, On Fri, Mar 18, 2016 at 11:35 AM, Thomas Monjalon wrote: > 2016-03-18 11:27, Olivier Matz: > > On 03/18/2016 11:18 AM, Bruce Richardson wrote: > > >>> + /* Avoid the unnecessary cmpset operation below, which is > also > > >>> +* potentially harmful when n equals 0. */ > > >>>

[dpdk-dev] [PATCH v2] ring: check for zero objects mc dequeue / mp enqueue

2016-03-17 Thread Mauricio Vásquez
Hi Lazaros, On Thu, Mar 17, 2016 at 4:49 PM, Lazaros Koromilas wrote: > Issuing a zero objects dequeue with a single consumer has no effect. > Doing so with multiple consumers, can get more than one thread to succeed > the compare-and-set operation and observe starvation or even deadlock in > th

[dpdk-dev] virtio PMD is not working with master version

2016-02-25 Thread Mauricio Vásquez
Hello, I am trying to connect two virtual machines through Open vSwitch using vhost-user ports, on the host side everything looks fine. When using the standard virtio drivers both virtual machines are able to exchange traffic, but when I load the virtio PMD and run a DPDK application it shows the

[dpdk-dev] [PATCH] doc: fix vhost bad section number references

2016-02-22 Thread Mauricio Vásquez
Hi John, I'll check for other hard-coded references like this, so, I think it is better to drop this patch. I'll include the doc name in the reference and send it in a patch series. On 22 February 2016 at 10:56, Mcnamara, John wrote: > > -Original Message- > > From: dev [mailto:dev-bou

[dpdk-dev] rings PMD detaching

2016-02-01 Thread Mauricio Vásquez
Hello Everybody, I was wondering if there were a way to detach (delete) a ring pmd device created with rte_eth_from_rings. I realized that rte_eth_dev_detach does not work in this case because there is a comparison between the device's name and the driver's name in rte_eal_vdev_uninit, then devic

[dpdk-dev] [PATCH] ring: Fix memory leakage in rte_pmd_ring_devuninit()

2015-11-20 Thread Mauricio Vásquez
On 20 November 2015 at 13:42, Richardson, Bruce wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Mcnamara, John > > Sent: Friday, November 20, 2015 12:32 PM > > To: Mauricio Vasquez B ; > > dev at dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] ri

[dpdk-dev] Why rte_eal_ivshmem_obj_initd() does not add memory pools to rte_mempool_tailq list?

2015-10-16 Thread Mauricio Vásquez
Hi Anatoly, Thank you very much for your answer, it clarifies it for me. I absolutely agree with you that adding mempools support should not be implemented until a solution for mempool cache corruption is found. Mauricio, On 16 October 2015 at 15:00, Burakov, Anatoly wrote: > Hi Mauricio > > >

[dpdk-dev] Why rte_eal_ivshmem_obj_initd() does not add memory pools to rte_mempool_tailq list?

2015-10-15 Thread Mauricio Vásquez
Dear DPDK community, Some time ago I was trying to map a memory pool into a guest using IVSHMEM as described here: http://comments.gmane.org/gmane.comp.networking.dpdk.devel/17779 After some time I decided to review the code of eal_ivshmem.c, I noticed that in the function rte_eal_ivshmem_obj_in

[dpdk-dev] IVSHMEM hotplug support in DPDK

2015-07-14 Thread Mauricio Vásquez
Hi All, I am trying to understand if there is support for hotplugging of IVSHMEM devices in dpdk. I set up a simple experiment where I hotplugged an ivshmem device into a VM using the device_add command plus the command line generated by rte_ivshmem_metadata_cmdline_generate in QEMU monitor. It a

[dpdk-dev] dpdk 2.0.0: Issue mapping mempool into guest using IVSHMEM

2015-05-19 Thread Mauricio Vásquez
Thank you for your answer Bruce, I think you refer to the example "l2fwd-ivshmem", Don't you? I compiled and run it, it works. I was reviewing the code and I found that the function rte_mempool_lookup is not used in the guest. In the host a structure containing pointers to the rings is allocated

[dpdk-dev] dpdk 2.0.0: Issue mapping mempool into guest using IVSHMEM

2015-05-18 Thread Mauricio Vásquez
Hi all, I'm trying to map a mempool into a guest using the IVSHMEM library but the mempool is not visible from the guest. The code I'm running is quite simple, on the host I run a primary DPDK process that creates the mempool, creates a metadata file and then adds the mempool to it. The code is: