[dpdk-dev] [PATCH v2 0/5] add dpdk packet capture support for tcpdump

2016-02-18 Thread Pavel Fedin
ave. Not directly related, but could we have some interface to tcpdump or wireshark? Would be good to have ability to dump packets in real time. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH v2 4/5] lib/librte_eal: add tcpdump support in primary process

2016-02-17 Thread Pavel Fedin
= 0? This would at least be a quick way to disable filtering. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH v2 2/5] drivers/net/pcap: add public api to create pcap device

2016-02-17 Thread Pavel Fedin
e-apply/patch:333: new blank line at EOF. + --- cut --- I guess the last empty line is not needed Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] PING: [PATCH v2] pmd/virtio: fix cannot start virtio dev after stop

2016-02-04 Thread Pavel Fedin
Hello! Are there any news about this patch? We have got this problem for the second time, it reproduces every time we try to use ovs-dpdk inside virtual machine with virtio-net adapter. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia > -Origi

[dpdk-dev] [RESEND PATCH] vhost_user: Make sure that memory map is set before attempting address translation

2016-01-15 Thread Pavel Fedin
oning it can..."? I lack fantasy, really, and to tell the truth i don't care that much about the exact phrasing, i'm OK with everything. > Anyway, check is OK. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RESEND PATCH] vhost_user: Make sure that memory map is set before attempting address translation

2016-01-13 Thread Pavel Fedin
v/2016-January/031169.html. See the RFC discussion thread. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RESEND PATCH] vhost_user: Make sure that memory map is set before attempting address translation

2016-01-13 Thread Pavel Fedin
Malfunctioning virtio clients may not send VHOST_USER_SET_MEM_TABLE for some reason. This causes NULL dereference in qva_to_vva(). Signed-off-by: Pavel Fedin Acked-by: Yuanhan Liu --- lib/librte_vhost/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib

[dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation

2016-01-13 Thread Pavel Fedin
s good to me. Should i repost, or can you just drop this tag by yourself when applying? Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 0/4] virtio support for container

2016-01-12 Thread Pavel Fedin
Hello! > Could anyone please point out, how it can be tested further(how can > traffic be sent across host and container) ? Have you applied all three fixes discussed here? Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation

2016-01-12 Thread Pavel Fedin
Malfunctioning virtio clients may not send VHOST_USER_SET_MEM_TABLE for some reason. This causes NULL dereference in qva_to_vva(). Change-Id: Ibc8f6637fb5fb9885b02c316adf18afd45e0d49a Signed-off-by: Pavel Fedin --- lib/librte_vhost/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-12 Thread Pavel Fedin
The patch unconditionally changes that to SHARED. That's all. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-12 Thread Pavel Fedin
porary workaround for "more than 8 regions" problem. b) It's not compatible with physical hardware anyway. So i think that we could easily use "--no-huge --shared-mem" combination. We could address hugepages compatibility problem later. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-12 Thread Pavel Fedin
s used, because shared memory is mandatory in this case. b) (c) above again raises a question: doesn't it make CONFIG_RTE_EAL_SIGLE_FILE_SEGMENTS obsolete? Or may be we could use that one instead of --single-file (however i'm not a fan of compile-time configuration like this)? Kind regards, Pav

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-12 Thread Pavel Fedin
t of the #ifdef ? Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-12 Thread Pavel Fedin
u mean, use "--no-hugepages --shared-mem" together, right? Yes. This would be perfectly backwards-compatible because. Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 0/4] virtio support for container

2016-01-12 Thread Pavel Fedin
his. I suggest to temporarily move hw->guest_features assignment out of virtio_negotiate_features() into the caller, where we have eth_dev->dev_type, and can choose the right set depending on it. With all mentioned fixes i've got the ping running. Tested-by: Pavel Fedin Kind reg

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-12 Thread Pavel Fedin
i'm still unhappy about ABI breakage here. I think we could easily add --shared-mem option, which would simply change mapping mode to SHARED. So, we could use it with both hugepages (default) and plain mmap (with --no-hugepages). Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 0/4] virtio support for container

2016-01-12 Thread Pavel Fedin
host state reverts back from "now ready for processing" to "not ready for processing". I guess this is the reason for the problem. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 4/4] virtio/vdev: add a new vdev named eth_cvio

2016-01-12 Thread Pavel Fedin
>buf_physaddr + > - RTE_PKTMBUF_HEADROOM - sizeof(struct virtio_net_hdr)); > + start_dp[i].addr = RTE_MBUF_DATA_DMA_ADDR(sw_ring[i], > rxvq->offset) > + - sizeof(struct virtio_net_hdr); > start_dp[i].len = s

[dpdk-dev] [PATCH 0/4] virtio support for container

2016-01-12 Thread Pavel Fedin
10:27:43 nfv_test_x86_64 ovs-vswitchd[18858]: VHOST_CONFIG: (0) Failed to find desc ring address. --- cut --- Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH v2] pmd/virtio: fix cannot start virtio dev after stop

2016-01-11 Thread Pavel Fedin
Tested-by: Pavel Fedin Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -Original Message- > From: Jianfeng Tan [mailto:jianfeng.tan at intel.com] > Sent: Monday, January 11, 2016 9:16 AM > To: dev at dpdk.org > Cc: p.fedin

[dpdk-dev] [PATCH 0/4] virtio support for container

2016-01-11 Thread Pavel Fedin
de libvirt-lxc. I got the following: a) With hugepages - "abort with 256 hugepage files exceed the maximum of 8 for vhost-user" - i set -m 512 b) With --single-file - ovs runs, but doesn't get any packets at all. When i try to ping the container from within host side, it counts drops on vhost-user p

[dpdk-dev] [PATCH 3/4] virtio/vdev: add ways to interact with vhost

2016-01-11 Thread Pavel Fedin
ndle TSO with ECN bits. */ > +#define TUN_F_UFO0x10/* I can handle UFO packets */ > + > +#define PATH_NET_TUN "/dev/net/tun" > + > +#endif > diff --git a/drivers/net/virtio/virtio_ethdev.h > b/drivers/net/virtio/virtio_ethdev.h > index ae2d47d..9e1ecb3 10

[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

2016-01-11 Thread Pavel Fedin
t;final_va = addr; > + hugepage->physaddr = rte_mem_virt2phy(addr); > + hugepage->size = pagesize; > + hugepage->socket_id = socket_id; > + hugepage->file_id = 0; > + hugepage->memseg_id = 0; > +#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS > + hugepage->repeated = internal_config.memory / pagesize; > +#endif > + strncpy(hugepage->filepath, filepath, MAX_HUGEPAGE_PATH); > + > close(fd); > > return 0; > -- > 2.1.4 Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH] pmd/virtio: fix cannot start virtio dev after stop

2016-01-11 Thread Pavel Fedin
h_dev *dev) > > PMD_INIT_LOG(DEBUG, "stop"); > > + hw->started = 0; > + 'hw' is not declared in this function, you have to add it. > if (dev->data->dev_conf.intr_conf.lsc) > rte_intr_disable(>pci_dev->intr_handle); > > -- > 2.1.4 Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH 3/4] virtio/vdev: add ways to interact with vhost

2016-01-11 Thread Pavel Fedin
.h > +++ b/drivers/net/virtio/virtio_pci.h > @@ -147,7 +147,6 @@ struct virtqueue; > * rest are per-device feature bits. > */ > #define VIRTIO_TRANSPORT_F_START 28 > -#define VIRTIO_TRANSPORT_F_END 32 I understand that this #define is not used, but... May be we should do this cleanup as a separate patch? Otherwise it's hard to track this change (i believe this definition had some use in the past). > > /* The Guest publishes the used index for which it expects an interrupt > * at the end of the avail ring. Host should ignore the avail->flags field. > */ > @@ -165,6 +164,7 @@ struct virtqueue; > > struct virtio_hw { > struct virtqueue *cvq; > +#define VIRTIO_VDEV_IO_BASE 0x > uint32_tio_base; > uint32_tguest_features; > uint32_tmax_tx_queues; > @@ -174,6 +174,21 @@ struct virtio_hw { > uint8_t use_msix; > uint8_t started; > uint8_t mac_addr[ETHER_ADDR_LEN]; > +#ifdef RTE_VIRTIO_VDEV > +#define VHOST_KERNEL 0 > +#define VHOST_USER 1 > + int type; /* type of backend */ > + uint32_tqueue_num; > + char*path; > + int mac_specified; > + int vhostfd; > + int backfd; /* tap device used in vhost-net */ > + int callfds[VIRTIO_MAX_VIRTQUEUES * 2 + 1]; > + int kickfds[VIRTIO_MAX_VIRTQUEUES * 2 + 1]; > + uint32_tqueue_sel; > + uint8_t status; > + struct rte_eth_dev_data *data; > +#endif Actually i am currently working on this too, and i decided to use different approach. I made these extra fields into a separate structure, changed 'io_base' to a pointer, and now i can store there a pointer to this extra structure. Device type can easily be determined by (dev->dev_type == RTE_ETH_DEV_PCI) check, so you don't need VIRTIO_VDEV_IO_BASE magic value. > }; > > /* > @@ -229,6 +244,39 @@ outl_p(unsigned int data, unsigned int port) > #define VIRTIO_PCI_REG_ADDR(hw, reg) \ > (unsigned short)((hw)->io_base + (reg)) > > +#ifdef RTE_VIRTIO_VDEV > +uint32_t virtio_ioport_read(struct virtio_hw *, uint64_t); > +void virtio_ioport_write(struct virtio_hw *, uint64_t, uint32_t); > + > +#define VIRTIO_READ_REG_1(hw, reg) \ > + (hw->io_base != VIRTIO_VDEV_IO_BASE) ? \ > + inb((VIRTIO_PCI_REG_ADDR((hw), (reg \ > + :virtio_ioport_read(hw, reg) > +#define VIRTIO_WRITE_REG_1(hw, reg, value) \ > + (hw->io_base != VIRTIO_VDEV_IO_BASE) ? \ > + outb_p((unsigned char)(value), (VIRTIO_PCI_REG_ADDR((hw), (reg \ > + :virtio_ioport_write(hw, reg, value) > + > +#define VIRTIO_READ_REG_2(hw, reg) \ > + (hw->io_base != VIRTIO_VDEV_IO_BASE) ? \ > + inw((VIRTIO_PCI_REG_ADDR((hw), (reg \ > + :virtio_ioport_read(hw, reg) > +#define VIRTIO_WRITE_REG_2(hw, reg, value) \ > + (hw->io_base != VIRTIO_VDEV_IO_BASE) ? \ > + outw_p((unsigned short)(value), (VIRTIO_PCI_REG_ADDR((hw), (reg \ > + :virtio_ioport_write(hw, reg, value) > + > +#define VIRTIO_READ_REG_4(hw, reg) \ > + (hw->io_base != VIRTIO_VDEV_IO_BASE) ? \ > + inl((VIRTIO_PCI_REG_ADDR((hw), (reg \ > + :virtio_ioport_read(hw, reg) > +#define VIRTIO_WRITE_REG_4(hw, reg, value) \ > + (hw->io_base != VIRTIO_VDEV_IO_BASE) ? \ > + outl_p((unsigned int)(value), (VIRTIO_PCI_REG_ADDR((hw), (reg \ > + :virtio_ioport_write(hw, reg, value) I also decided to add two fields to 'hw', where pointers to these accessors are stored. I think this should be faster, however, yes, this is not performance-critical code because it's executed only during initialization. > + > +#else /* RTE_VIRTIO_VDEV */ > + > #define VIRTIO_READ_REG_1(hw, reg) \ > inb((VIRTIO_PCI_REG_ADDR((hw), (reg > #define VIRTIO_WRITE_REG_1(hw, reg, value) \ > @@ -244,6 +292,8 @@ outl_p(unsigned int data, unsigned int port) > #define VIRTIO_WRITE_REG_4(hw, reg, value) \ > outl_p((unsigned int)(value), (VIRTIO_PCI_REG_ADDR((hw), (reg > > +#endif /* RTE_VIRTIO_VDEV */ > + > static inline int > vtpci_with_feature(struct virtio_hw *hw, uint32_t bit) > { > -- > 2.1.4 Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-31 Thread Pavel Fedin
art(), which should in turn call virtio_dev_vring_start(), which calls vring_init(). So, VIRTQUEUE_NUSED() dies badly because vq->vq_ring all contains NULLs. See you all after 10th. And happy New Year again! Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-31 Thread Pavel Fedin
eads it (and who doesn't) :) Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-31 Thread Pavel Fedin
ed, fd number is not corrupted. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-31 Thread Pavel Fedin
Here you ignore errors. And this particular request for some reason ends up in EBADF. The most magic part is that sometimes it just works... Not sure if i can finish it today, and here in Russia we have New Year holidays until 11th. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-31 Thread Pavel Fedin
_TABLE (i don't know why yet) b) set_vring_addr() does not make sure that dev->mem is set. I am preparing a patch to fix (b). Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-31 Thread Pavel Fedin
ation sequence without sending VHOST_USER_SET_MEM_TABLE, therefore host-side ovs tries to refer old addresses and dies badly. Those messages about memory pool already being present are perhaps OK. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [RFC 0/5] virtio support for container

2015-12-30 Thread Pavel Fedin
at localhost.localdomain (Wed 2015-12-30 11:13:00 MSK): ovs-vswitchd[560]: RING: Cannot reserve memory --- cut --- How can i debug this? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-22 Thread Pavel Fedin
inking about patching qemu once, but... The changeset seemed too complicated, and i imagined the situation described in the above sentence, so decided to abandon it. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] [PATCH v2 0/6] vhost-user live migration support

2015-12-21 Thread Pavel Fedin
Works fine. Tested-by: Pavel Fedin Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Thursday, December 17, 2015 6:12 AM > To: dev at dpdk.org >

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

2015-12-16 Thread Pavel Fedin
65537-edge virtio1-input.0 31: 1 0 0 0 PCI-MSI 65538-edge virtio1-output.0 Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-16 Thread Pavel Fedin
or some reason. So, let it stay this way. Please include this bit into your v2. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-16 Thread Pavel Fedin
ets both src and dst to 0.0.0.0). Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-15 Thread Pavel Fedin
TIONS_KIND_NIC interfaces. I expect these are fully emulated hardware controllers. virtio uses another type (see enum NetClientOptionsKind). So, we can happily ignore qemu_announce_self(), it does not do anything for us. Thanks for pointing it out. Kind regards, Pavel Fedin Expert Engineer Samsung

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

2015-12-15 Thread Pavel Fedin
a bug in guest? It's very strange, because in these sessions i see only one difference in IPv6 packets: 4 0.858957 :: -> ff02::1:ff3b:831a ICMPv6 78 Neighbor Solicitation for fe80::5054:ff:fe3b:831a This is present in session #1 and missing from session #2. Can it affect the whole thing somehow? But i don't even use IPv6. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] problem vhost-user sockets

2015-12-15 Thread Pavel Fedin
huge job, i would say. And without it the thing just appears to be too fragile, requiring manual maintenance after a single stupid failure. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-15 Thread Pavel Fedin
v3.11.10). It works pretty well on same host. So, seems like > a KVM bug then? 3.18.9 here and no this problem. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

[dpdk-dev] problem vhost-user sockets

2015-12-15 Thread Pavel Fedin
cleanup upon exit. But what if it abnormally crashes because of some reason (bug, attack, etc)? Shouldn't it be able to automatically recover? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-15 Thread Pavel Fedin
announces the support of this feature. Maybe QEMU can be > updated to support unconditionnaly this feature Wrong. I tried to unconditionally enforce it in qemu (my guest does support it), and the link stopped working at all. I don't understand why. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-15 Thread Pavel Fedin
g, even without migration. Can local qemu/DPDK/etc gurus give some explanation? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-15 Thread Pavel Fedin
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 think you can add some debug output and see how it works in realtime. This is what i normally do when i don't understand in which sequence things happen. Kind regar

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

2015-12-14 Thread Pavel Fedin
hen the guest redoes ARP, PING replies resume. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-14 Thread Pavel Fedin
o you think? Yes, perhaps this would be better test, may be next time i'll do it. Anyway, IIRC, PATCH v2 is coming. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-14 Thread Pavel Fedin
ved the wrong one. So, as i wrote before - please don't worry, the patch works fine, it was totally my lame fault. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

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

2015-12-11 Thread Pavel Fedin
Hello! > On Fri, Dec 11, 2015 at 11:26:55AM +0300, Pavel Fedin wrote: > > Hello! > > > > I am currently testing this patchset with qemu and have problems. > > Hi, > > Thanks for testing! Not at all :) BTW, it works, and it was my bad. openvswitch was con

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

2015-12-11 Thread Pavel Fedin
. Can anybody help me and explain how the thing works? I expected that gratuitous ARP packets are harmless, but they seem to break things somehow. And what was used for testing the implementation? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia