From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: Re: [V4 PATCH] virtio-net: send gratuitous packet when needed
Date: Mon, 19 Mar 2012 17:42:19 +0800 [thread overview]
Message-ID: <4F66FF7B.7040000@redhat.com> (raw)
In-Reply-To: <20120319084449.GF17673@redhat.com>
On 03/19/2012 04:44 PM, Michael S. Tsirkin wrote:
> On Mon, Mar 19, 2012 at 12:46:29PM +1030, Rusty Russell wrote:
>> On Tue, 13 Mar 2012 16:33:31 +0200, "Michael S. Tsirkin"<mst@redhat.com> wrote:
>>>> diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
>>>> index 970d5a2..44a38d6 100644
>>>> --- a/include/linux/virtio_net.h
>>>> +++ b/include/linux/virtio_net.h
>>>> @@ -49,8 +49,10 @@
>>>> #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */
>>>> #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */
>>>> #define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */
>>>> +#define VIRTIO_NET_F_GUEST_ANNOUNCE 21 /* Guest can send gratituous packet */
>>>>
>>>> #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
>>>> +#define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */
>>> I would put this in bit 8 (0x100), this way low status byte
>>> is RO, high byte is RW.
>> The whole idea of acking by clearing the bit is unreliable, moving to a
>> separate byte just controls the damage.
>>
>> How about you use bits 8-15 as a counter? It's still theoretically
>> unreliable if 256 notifications pass before the guest notices, but it's
>> probably better and clearer than this.
>>
>> I leave the final call to MST though.
>>
>> Thanks,
>> Rusty.
> I guess the point was that we want a single packet
> so we don't care if multiple notifications are coalesced
> into a single one.
>
To reduce the possibility of dropping or losing of gratuitous packet by
the network, qemu usually send the gratuitous packets for many times (
currently 5 time with a increment gap between them such as 50ms, 150ms,
250ms ...). As there's no method can guarantee the gratuitous packet
were received by switch in guest, no need to care about the coalesced
notifications in guest. And we may leave the work to qemu or just don't
care about this.
>> --
>> How could I marry someone with more hair than me? http://baldalex.org
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2012-03-19 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 9:08 [V4 PATCH] virtio-net: send gratuitous packet when needed Jason Wang
2012-03-13 14:33 ` Michael S. Tsirkin
2012-03-19 2:16 ` Rusty Russell
[not found] ` <877gyhxrlu.fsf@rustcorp.com.au>
2012-03-19 8:44 ` Michael S. Tsirkin
2012-03-19 9:42 ` Jason Wang [this message]
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=4F66FF7B.7040000@redhat.com \
--to=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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).