From: ASM <asm@asm.pp.ru>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
dmitry.fleytman@gmail.com, qemu-devel@nongnu.org,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: PCI memory sync question (kvm,dpdk,e1000,packet stalled)
Date: Mon, 30 Dec 2019 13:10:15 +0300 [thread overview]
Message-ID: <CAMmAVbVoHcTiBnOVtFb5MS3V-in0u=4k4WPHcpxGtYF8Pv5bKQ@mail.gmail.com> (raw)
In-Reply-To: <20191219145817.GG1624084@stefanha-x1.localdomain>
> It could be a bug in QEMU's e1000 emulation - maybe it's not doing
> things in the correct order and causes a race condition with the DPDK
> polling driver - or it could be a bug in the DPDK e1000 driver regarding
> the order in which the descriptor ring and RX Head/Tail MMIO registers
> are updated.
What did I understand:
* DPDK and Kernel drivers work like simular with ring. It don't
analize Head, but check STATUS.
This is a bit strange but completely correct driver behavior. If the
driver writes to memory, it expects
this value to be written. The problem is definitely not in the DPDK
and in the kernel driver.
* This problem appears on KVM, but not appears on tcg.
* Most similar to a bug in QEMU e1000 emulation. The e1000 emulation
read and writes to some
memory and same times, same as dpdk driver.
As I understand it, KVM explicitly prohibits access to shared memory.
It is obvious that us need to
protect (RCU) all STATUS registers of all buffers. There can be a lot
of buffers and they can be
scattered throughout the memory.
>
> Did you find the root cause?
I think yes, see above, but I can't understand how I can fix it.
For those who are interested in this problem, I made a project that
easily repeats this error:
https://github.com/BASM/qemu_dpdk_e1000_test
Unfortunately I don’t think that I can fix it on my own, without any help.
---
Best regards,
Leonid Myravjev
next prev parent reply other threads:[~2019-12-30 10:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMmAVbWzrYWZBXwKxSd-f5SXmq6qP1ok8abvyKJhp3=REEaMPA@mail.gmail.com>
2019-11-20 17:36 ` PCI memory sync question (kvm,dpdk,e1000,packet stalled) ASM
2019-11-21 14:05 ` Stefan Hajnoczi
2019-11-27 12:39 ` ASM
2019-12-19 14:58 ` Stefan Hajnoczi
2019-12-30 10:10 ` ASM [this message]
2020-01-02 11:05 ` Stefan Hajnoczi
2022-05-23 12:47 ` Ding Hui
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='CAMmAVbVoHcTiBnOVtFb5MS3V-in0u=4k4WPHcpxGtYF8Pv5bKQ@mail.gmail.com' \
--to=asm@asm.pp.ru \
--cc=dmitry.fleytman@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).