brary.
I expected "server"-side vhost to be the same as "client" part (AKA virtio),
just use another mechanism for exchanging control
information (via socket). Is it not true? I suppose, driving queues from both
sides should be quite symmetric.
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
p them too would
be nice to have.
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
ter == 0? This would
at least be a quick way to disable filtering.
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
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
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
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
v/2016-January/031169.html. See the
RFC discussion thread.
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
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
ise, this patch looks 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
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
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
The patch unconditionally changes that to SHARED. That's all.
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
It's just a temporary 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
mply MAP_SHARED if cvio is 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 configurat
epeated out of the #ifdef ?
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
t; You 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
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
Kin
ing here.
BTW, 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
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
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 = sw_ring[i]->buf_len -
> RTE_PKTMBUF_HEADROOM + sizeof(struct virtio_net_hdr);
> }
> @@ -366,7 +365,7 @@ virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf
> **tx_pkts,
> txvq->vq_descx[desc_idx + i].cookie = tx_pkts[i];
> for (i = 0; i < nb_tail; i++) {
> start_dp[desc_idx].addr =
> - RTE_MBUF_DATA_DMA_ADDR(*tx_pkts);
> + RTE_MBUF_DATA_DMA_ADDR(*tx_pkts, txvq->offset);
> start_dp[desc_idx].len = (*tx_pkts)->pkt_len;
> tx_pkts++;
> desc_idx++;
> @@ -377,7 +376,8 @@ virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf
> **tx_pkts,
> for (i = 0; i < nb_commit; i++)
> txvq->vq_descx[desc_idx + i].cookie = tx_pkts[i];
> for (i = 0; i < nb_commit; i++) {
> - start_dp[desc_idx].addr = RTE_MBUF_DATA_DMA_ADDR(*tx_pkts);
> + start_dp[desc_idx].addr = RTE_MBUF_DATA_DMA_ADDR(*tx_pkts,
> + txvq->offset);
> start_dp[desc_idx].len = (*tx_pkts)->pkt_len;
> tx_pkts++;
> desc_idx++;
> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
> index 61b3137..dc0b656 100644
> --- a/drivers/net/virtio/virtqueue.h
> +++ b/drivers/net/virtio/virtqueue.h
> @@ -66,8 +66,14 @@ struct rte_mbuf;
>
> #define VIRTQUEUE_MAX_NAME_SZ 32
>
> -#define RTE_MBUF_DATA_DMA_ADDR(mb) \
> +#ifdef RTE_VIRTIO_VDEV
> +#define RTE_MBUF_DATA_DMA_ADDR(mb, offset) \
> + (uint64_t)((uintptr_t)(*(void **)((uintptr_t)mb + offset)) \
> + + (mb)->data_off)
> +#else
> +#define RTE_MBUF_DATA_DMA_ADDR(mb, offset) \
> (uint64_t) ((mb)->buf_physaddr + (mb)->data_off)
> +#endif /* RTE_VIRTIO_VDEV */
>
> #define VTNET_SQ_RQ_QUEUE_IDX 0
> #define VTNET_SQ_TQ_QUEUE_IDX 1
> @@ -167,7 +173,8 @@ struct virtqueue {
>
> void*vq_ring_virt_mem;/**< linear address of vring*/
> unsigned int vq_ring_size;
> - phys_addr_t vq_ring_mem; /**< physical address of vring */
> + phys_addr_t vq_ring_mem; /**< phys address of vring for pci
> dev,
> +
> virt addr of vring for vdev */
>
> struct vring vq_ring;/**< vring keeping desc, used and avail */
> uint16_tvq_free_cnt; /**< num of desc available */
> @@ -186,8 +193,10 @@ struct virtqueue {
>*/
> uint16_t vq_used_cons_idx;
> uint16_t vq_avail_idx;
> + uint16_t offset; /**< relative offset to obtain addr in mbuf */
> uint64_t mbuf_initializer; /**< value to init mbufs. */
> phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
> + void*virtio_net_hdr_vaddr;/**< linear address of vring*/
>
> struct rte_mbuf **sw_ring; /**< RX software ring. */
> /* dummy mbuf, for wraparound when processing RX ring. */
> --
> 2.1.4
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
n 12 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
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
ibvirt-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-u
mmed packets. */
> +#define TUN_F_TSO4 0x02/* I can handle TSO for IPv4 packets */
> +#define TUN_F_TSO6 0x04/* I can handle TSO for IPv6 packets */
> +#define TUN_F_TSO_ECN0x08/* I can handle 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 100644
> --- a/drivers/net/virtio/virtio_ethdev.h
> +++ b/drivers/net/virtio/virtio_ethdev.h
> @@ -122,5 +122,8 @@ uint16_t virtio_xmit_pkts_simple(void *tx_queue, struct
> rte_mbuf
> **tx_pkts,
> #define VTNET_LRO_FEATURES (VIRTIO_NET_F_GUEST_TSO4 | \
> VIRTIO_NET_F_GUEST_TSO6 | VIRTIO_NET_F_GUEST_ECN)
>
> -
> +#ifdef RTE_VIRTIO_VDEV
> +void virtio_vdev_init(struct rte_eth_dev_data *data, const char *path,
> + int nb_rx, int nb_tx, int nb_cq, int queue_num, char *mac);
> +#endif
> #endif /* _VIRTIO_ETHDEV_H_ */
> diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
> index 47f722a..af05ae2 100644
> --- a/drivers/net/virtio/virtio_pci.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
>
> /* 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
> };
>
> /*
> @@ -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)
> +
> +#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
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
io_dev_stop(struct rte_eth_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(&dev->pci_dev->intr_handle);
>
> --
> 2.1.4
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
RES (VIRTIO_NET_F_GUEST_TSO4 | \
> VIRTIO_NET_F_GUEST_TSO6 | VIRTIO_NET_F_GUEST_ECN)
>
> -
> +#ifdef RTE_VIRTIO_VDEV
> +void virtio_vdev_init(struct rte_eth_dev_data *data, const char *path,
> + int nb_rx, int nb_tx, int nb_cq, int queue_num
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
w Year to everybody who reads it (and who doesn't)
:)
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
checked, fd number is not corrupted.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
return 0;
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
_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
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
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
Hello!
> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Tetsuya Mukawa
> Sent: Wednesday, December 16, 2015 11:37 AM
> To: dev at dpdk.org
> Cc: nakajima.yoshihiro at lab.ntt.co.jp; mst at redhat.com
> Subject: [dpdk-dev] [PATCH v1 2/2] virtio: Extend virtio-
as thinking 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
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
>
0 0 0 PCI-MSI 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
ess GUEST_ANNOUNCE for 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
know the IP and just sets both src and
dst to 0.0.0.0).
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
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
havior changes
somehow. Is it 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
in some script? Too 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
using a same old
> kernel: 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
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
backend 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
om the beginning, even without migration.
Can local qemu/DPDK/etc gurus give some explanation?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
y.
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 happ
hout replies, then the guest redoes ARP, PING replies resume.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
intranet. What do 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
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
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
ork at all.
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
53 matches
Mail list logo