DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: "'Tan, Jianfeng'" <jianfeng.tan@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC 0/5] virtio support for container
Date: Thu, 31 Dec 2015 18:39:22 +0300	[thread overview]
Message-ID: <000301d143e1$6c5c0e90$45142bb0$@samsung.com> (raw)
In-Reply-To: 

 Hello!

 Last minute note. I have found the problem but have no time to research and fix it.
 It happens because ovs first creates the device, starts it, then stops it, and reconfigures queues. The second queue allocation
happens from within netdev_set_multiq(). Then ovs restarts the device and proceeds to actually using it.
 But, queues are not initialized properly in DPDK after the second allocation. Because of this thing:

	/* On restart after stop do not touch queues */
	if (hw->started)
		return 0;

 It keeps us away from calling virtio_dev_rxtx_start(), 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 Russia

> -----Original Message-----
> From: Pavel Fedin [mailto:p.fedin@samsung.com]
> Sent: Thursday, December 31, 2015 4:47 PM
> To: 'Tan, Jianfeng'; 'dev@dpdk.org'
> Subject: RE: [dpdk-dev] [RFC 0/5] virtio support for container
> 
>  Hello!
> 
> > > a) ovs_in_container does not send VHOST_USER_SET_MEM_TABLE
> > Please check if rte_eth_dev_start() is called.
> > (rte_eth_dev_start -> virtio_dev_start -> vtpci_reinit_complete -> kick_all_vq)
> 
>  I've figured out what happened, and it's my fault only :( I have modified your patchset and
> added --shared-mem option. And forgot to specify it to gdb :) Without it memory is not shared,
> and rte_memseg_info_get() returned fd = -1. And if you put it into control message for
> sendmsg(), you get your -EBADF.
>  So please ignore this.
>  But, nevertheless, ovs in container still dies with:
> --- cut ---
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fff97fff700 (LWP 3866)]
> virtio_recv_mergeable_pkts (rx_queue=0x7fffd46a9a80, rx_pkts=0x7fff97ffe850, nb_pkts=32) at
> /home/p.fedin/dpdk/drivers/net/virtio/virtio_rxtx.c:683
> 683	/home/p.fedin/dpdk/drivers/net/virtio/virtio_rxtx.c: No such file or directory.
> Missing separate debuginfos, use: dnf debuginfo-install keyutils-libs-1.5.9-7.fc23.x86_64
> krb5-libs-1.13.2-11.fc23.x86_64 libcap-ng-0.7.7-2.fc23.x86_64 libcom_err-1.42.13-
> 3.fc23.x86_64 libselinux-2.4-4.fc23.x86_64 openssl-libs-1.0.2d-2.fc23.x86_64 pcre-8.37-
> 4.fc23.x86_64 zlib-1.2.8-9.fc23.x86_64
> (gdb) where
> #0  virtio_recv_mergeable_pkts (rx_queue=0x7fffd46a9a80, rx_pkts=0x7fff97ffe850, nb_pkts=32)
> at /home/p.fedin/dpdk/drivers/net/virtio/virtio_rxtx.c:683
> #1  0x0000000000669ee8 in rte_eth_rx_burst (nb_pkts=32, rx_pkts=0x7fff97ffe850, queue_id=0,
> port_id=0 '\000') at /home/p.fedin/dpdk/build/include/rte_ethdev.h:2510
> #2  netdev_dpdk_rxq_recv (rxq_=<optimized out>, packets=0x7fff97ffe850, c=0x7fff97ffe84c) at
> lib/netdev-dpdk.c:1033
> #3  0x00000000005e8ca1 in netdev_rxq_recv (rx=<optimized out>,
> buffers=buffers@entry=0x7fff97ffe850, cnt=cnt@entry=0x7fff97ffe84c) at lib/netdev.c:654
> #4  0x00000000005cb338 in dp_netdev_process_rxq_port (pmd=pmd@entry=0x7fffac7f8010,
> rxq=<optimized out>, port=<optimized out>, port=<optimized out>) at lib/dpif-netdev.c:2510
> #5  0x00000000005cc649 in pmd_thread_main (f_=0x7fffac7f8010) at lib/dpif-netdev.c:2671
> #6  0x0000000000628424 in ovsthread_wrapper (aux_=<optimized out>) at lib/ovs-thread.c:340
> #7  0x00007ffff70f660a in start_thread () from /lib64/libpthread.so.0
> #8  0x00007ffff6926bbd in clone () from /lib64/libc.so.6
> (gdb)
> --- cut ---
> 
>  and l2fwd does not reproduce this. So, let's wait until 11.01.2016. And happy New Year to
> everybody who reads it (and who doesn't) :)
> 
> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia

  parent reply	other threads:[~2015-12-31 15:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  9:46 Pavel Fedin
2015-12-31  9:19 ` Tan, Jianfeng
2015-12-31  9:40   ` Pavel Fedin
2015-12-31 10:02     ` Tan, Jianfeng
2015-12-31 10:38       ` Pavel Fedin
2015-12-31 11:58         ` Tan, Jianfeng
2015-12-31 12:44           ` Pavel Fedin
2015-12-31 12:54             ` Tan, Jianfeng
2015-12-31 13:07               ` Pavel Fedin
2015-12-31 13:47           ` Pavel Fedin
2015-12-31 15:39           ` Pavel Fedin [this message]
2016-01-06  5:47             ` Tan, Jianfeng
  -- strict thread matches above, loose matches on Subject: below --
2017-06-15  8:21 Avi Cohen (A)
2015-11-05 18:31 Jianfeng Tan
2015-11-24  3:53 ` Zhuangyanying
2015-11-24  6:19   ` Tan, Jianfeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301d143e1$6c5c0e90$45142bb0$@samsung.com' \
    --to=p.fedin@samsung.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).