[dpdk-dev] [PATCH 0/4] check if any kernel driver is manipulating the virtio device

2015-12-28 Thread Peter Xu
On Fri, Dec 25, 2015 at 02:38:08AM +0800, Huawei Xie wrote: > virtio PMD doesn't set RTE_PCI_DRV_NEED_MAPPING in drv_flags of its > eth_driver. It will try igb_uio and PORT IO in turn to configure > virtio device. Even user in guest VM doesn't want to use virtio for > DPDK, virtio PMD will take

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-23 Thread Peter Xu
On Wed, Dec 23, 2015 at 10:01:35AM +0800, Yuanhan Liu wrote: > On Tue, Dec 22, 2015 at 05:56:41PM +0800, Peter Xu wrote: > > On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: > > > Actually, you are right. I mentioned in the last email that this is > >

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-23 Thread Peter Xu
On Wed, Dec 23, 2015 at 10:09:49AM +0800, Yuanhan Liu wrote: > Why can't we simply quit at pci_scan_one, once finding that it's not > bond to uio (or similar stuff)? That would be generic enough, that we > don't have to do similar checks for each new pmd driver. > > Or, am I missing something?

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-23 Thread Peter Xu
On Tue, Dec 22, 2015 at 04:38:30PM +, Xie, Huawei wrote: > On 12/22/2015 7:39 PM, Peter Xu wrote: > > I tried to unbind one of the virtio net device, I see the PCI entry > > still there. > > > > Before unbind: > > > > [root at vm proc]# lspci -k -s 00:03

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Peter Xu
On Tue, Dec 22, 2015 at 10:47:21AM +, Xie, Huawei wrote: > On 12/22/2015 5:57 PM, Peter Xu wrote: > > On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: > >> Actually, you are right. I mentioned in the last email that this is > >> for configuration pa

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Peter Xu
On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: > Actually, you are right. I mentioned in the last email that this is > for configuration part. To answer your question in this email, you > will not be able to go that further (say initiating virtio pmd) if > you don't unbind the origin

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Peter Xu
On Tue, Dec 22, 2015 at 03:00:29PM +0800, Yuanhan Liu wrote: > On Tue, Dec 22, 2015 at 11:50:41AM +0800, Peter Xu wrote: > > Hi, > > > > I got a question related to how virtio pmd driver work without > > UIO layer. > > > > I see that in virtio

[dpdk-dev] [PATCH v2 5/6] vhost: claim that we support GUEST_ANNOUNCE feature

2015-12-22 Thread Peter Xu
On Thu, Dec 17, 2015 at 11:12:00AM +0800, Yuanhan Liu wrote: > It's actually a feature already enabled in Linux kernel. What we need to > do is simply to claim that we support such feature, and nothing else. > > With that, the guest will send GARP messages after live migration. > >

[dpdk-dev] [PATCH v2 3/6] vhost: log used vring changes

2015-12-22 Thread Peter Xu
On Tue, Dec 22, 2015 at 03:13:49PM +0800, Yuanhan Liu wrote: > On Tue, Dec 22, 2015 at 02:55:52PM +0800, Peter Xu wrote: > > On Thu, Dec 17, 2015 at 11:11:58AM +0800, Yuanhan Liu wrote: > > > +static inline void __attribute__((always_inline)) > > > +vhost_log_used_v

[dpdk-dev] [PATCH v2 3/6] vhost: log used vring changes

2015-12-22 Thread Peter Xu
On Tue, Dec 22, 2015 at 07:07:25AM +, Xie, Huawei wrote: > On 12/22/2015 2:56 PM, Peter Xu wrote: > > Got a question here: > > > > I see that we are logging down changes when we are marking > > used_vring. Do we need to log down buffer copy in rte_memcpy() too?

[dpdk-dev] [PATCH v2 3/6] vhost: log used vring changes

2015-12-22 Thread Peter Xu
On Thu, Dec 17, 2015 at 11:11:58AM +0800, Yuanhan Liu wrote: > +static inline void __attribute__((always_inline)) > +vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq, > + uint64_t offset, uint64_t len) > +{ One thing optional: I feel it a little bit

[dpdk-dev] [PATCH v2 2/6] vhost: introduce vhost_log_write

2015-12-22 Thread Peter Xu
On Thu, Dec 17, 2015 at 11:11:57AM +0800, Yuanhan Liu wrote: > +static inline void __attribute__((always_inline)) > +vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len) > +{ > + uint64_t page; > + > + if (likely(((dev->features & (1ULL << VHOST_F_LOG_ALL)) == 0) || > +

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Peter Xu
Hi, I got a question related to how virtio pmd driver work without UIO layer. I see that in virtio PMD driver, DPDK will first try to init the device using UIO interfaces. If it fails, it will try to init by manipulating IO ports directly (see virtio_resource_init()). For the ioport case, is it

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-16 Thread Peter Xu
On Tue, Dec 15, 2015 at 04:07:57PM +0100, Thibaut Collet wrote: > After a migration, to avoid netwotk outage, all interfaces of the guest > must send a packet to update switches mapping (ideally a GARP). > As some interfaces do not do it QEMU does it in behalf of the guest by > sending a RARP (his

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-15 Thread Peter Xu
On Tue, Dec 15, 2015 at 11:45:56AM +0300, Pavel Fedin wrote: > To tell the truth, i don't know. I am also learning qemu internals on the > fly. Indeed, i see that it should announce itself. But > this brings up a question: why do we need special announce procedure in > vhost-user then? I have

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-15 Thread Peter Xu
On Tue, Dec 15, 2015 at 04:23:24PM +0800, Yuanhan Liu wrote: > On Mon, Dec 14, 2015 at 11:58:42AM +0800, Peter Xu wrote: > > If ping to guest from outside, when the migration finishes on the > > target side of qemu, qemu_self_announce() will be called. > > It's supposed to

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-14 Thread Peter Xu
On Mon, Dec 14, 2015 at 09:21:15PM +0800, Yuanhan Liu wrote: > Peter, > > Thanks for your input, and that sounds reasonable. You just reminded > me that the host1's NIC is indeed different with host2's NIC: the ovs > bridge mac address is different. > > I then had a quick try, setting the two

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-14 Thread Peter Xu
On Mon, Dec 14, 2015 at 08:09:37PM +0800, Yuanhan Liu wrote: > It seems that we have exactly the same test environment set up: I have > one server (where I normally do vhost test there) and one desktop (my > dev box), > > On both hosts, there is an ovs bridge, with IP address 192.168.100.1 >

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-14 Thread Peter Xu
On Mon, Dec 14, 2015 at 10:30:54AM +0300, Pavel Fedin wrote: > Hello! Hi, Pavel! > > > When doing the ping, was it from the guest (to another host) or to > > the guest (from another host)? > > > > In any case, I still could not understand why the ping loss happened > > in this test. > > > >

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-14 Thread Peter Xu
On Fri, Dec 11, 2015 at 01:22:23PM +0300, Pavel Fedin wrote: > BTW, it works, and it was my bad. openvswitch was configured incorrectly on > the other side, vhost port number was different for > some reason, while ruleset was the same. I reconfigured it and now everything > migrates correctly,