From: Alex Williamson <alex.williamson@redhat.com>
To: Chris Wright <chrisw@sous-sol.org>
Cc: jes.sorensen@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 1/5] virtio-net: Make tx_timer timeout configurable
Date: Tue, 31 Aug 2010 12:07:16 -0600 [thread overview]
Message-ID: <1283278036.5826.116.camel@x201> (raw)
In-Reply-To: <20100831180048.GE30129@sequoia.sous-sol.org>
On Tue, 2010-08-31 at 11:00 -0700, Chris Wright wrote:
> * Alex Williamson (alex.williamson@redhat.com) wrote:
> > diff --git a/hw/virtio-net.c b/hw/virtio-net.c
> > index 075f72d..9ef29f0 100644
> > --- a/hw/virtio-net.c
> > +++ b/hw/virtio-net.c
> > @@ -36,6 +36,7 @@ typedef struct VirtIONet
> > VirtQueue *ctrl_vq;
> > NICState *nic;
> > QEMUTimer *tx_timer;
> > + uint32_t tx_timeout;
> > int tx_timer_active;
> > uint32_t has_vnet_hdr;
> > uint8_t has_ufo;
> > @@ -702,7 +703,7 @@ static void virtio_net_handle_tx(VirtIODevice *vdev, VirtQueue *vq)
> > virtio_net_flush_tx(n, vq);
> > } else {
> > qemu_mod_timer(n->tx_timer,
> > - qemu_get_clock(vm_clock) + TX_TIMER_INTERVAL);
> > + qemu_get_clock(vm_clock) + n->tx_timeout);
> > n->tx_timer_active = 1;
> > virtio_queue_set_notification(vq, 0);
> > }
> > @@ -842,7 +843,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
> >
> > if (n->tx_timer_active) {
> > qemu_mod_timer(n->tx_timer,
> > - qemu_get_clock(vm_clock) + TX_TIMER_INTERVAL);
> > + qemu_get_clock(vm_clock) + n->tx_timeout);
>
> I think I'm missing where this is stored? Looks like migration
> would revert a changed tx_timeout back to 150us.
It's not stored, it can be instantiated on the migration target any way
you please and we can migrate between different values or even different
TX mitigation strategies. If a non-default value is used on the source
and you want to maintain the same behavior, the target needs to be
started the same way.
Alex
next prev parent reply other threads:[~2010-08-31 18:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 22:36 [Qemu-devel] [PATCH 0/5] virtio-net: More configurability and bh handling for tx Alex Williamson
2010-08-27 22:37 ` [Qemu-devel] [PATCH 1/5] virtio-net: Make tx_timer timeout configurable Alex Williamson
2010-08-31 18:00 ` Chris Wright
2010-08-31 18:07 ` Alex Williamson [this message]
2010-08-31 19:29 ` Chris Wright
2010-08-27 22:37 ` [Qemu-devel] [PATCH 2/5] virtio-net: Limit number of packets sent per TX flush Alex Williamson
2010-08-31 20:23 ` [Qemu-devel] " Michael S. Tsirkin
2010-08-27 22:37 ` [Qemu-devel] [PATCH 3/5] virtio-net: Rename tx_timer_active to tx_waiting Alex Williamson
2010-08-27 22:37 ` [Qemu-devel] [PATCH 4/5] virtio-net: Introduce a new bottom half packet TX Alex Williamson
2010-08-31 20:14 ` [Qemu-devel] " Michael S. Tsirkin
2010-08-31 20:33 ` Alex Williamson
2010-09-01 9:47 ` Michael S. Tsirkin
2010-08-27 22:37 ` [Qemu-devel] [PATCH 5/5] virtio-net: Switch default to new bottom half TX handler for iothread Alex Williamson
2010-08-31 20:25 ` [Qemu-devel] " Michael S. Tsirkin
2010-08-31 22:32 ` Alex Williamson
2010-08-31 22:46 ` Anthony Liguori
2010-09-01 6:21 ` Stefan Hajnoczi
2010-09-01 8:47 ` Michael S. Tsirkin
2010-08-31 20:20 ` [Qemu-devel] Re: [PATCH 0/5] virtio-net: More configurability and bh handling for tx Michael S. Tsirkin
2010-08-31 20:27 ` Michael S. Tsirkin
2010-08-31 21:33 ` Anthony Liguori
2010-08-31 22:26 ` Alex Williamson
2010-09-01 10:40 ` Michael S. Tsirkin
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=1283278036.5826.116.camel@x201 \
--to=alex.williamson@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=jes.sorensen@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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).