From: Jason Wang <jasowang@redhat.com>
To: vyasevic@redhat.com, Vladislav Yasevich <vyasevich@gmail.com>,
netdev@vger.kernel.org
Cc: virtio-dev@lists.oasis-open.org, mst@redhat.com,
maxime.coquelin@redhat.com,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions
Date: Mon, 24 Apr 2017 11:22:35 +0800 [thread overview]
Message-ID: <951e021c-fa8e-f7d4-f058-92d28681379c@redhat.com> (raw)
In-Reply-To: <022c8af3-e7e7-5d35-5152-cb12e90359ef@redhat.com>
On 2017年04月21日 21:08, Vlad Yasevich wrote:
> On 04/21/2017 12:05 AM, Jason Wang wrote:
>> On 2017年04月20日 23:34, Vlad Yasevich wrote:
>>> On 04/17/2017 11:01 PM, Jason Wang wrote:
>>>> On 2017年04月16日 00:38, Vladislav Yasevich wrote:
>>>>> Curreclty virtion net header is fixed size and adding things to it is rather
>>>>> difficult to do. This series attempt to add the infrastructure as well as some
>>>>> extensions that try to resolve some deficiencies we currently have.
>>>>>
>>>>> First, vnet header only has space for 16 flags. This may not be enough
>>>>> in the future. The extensions will provide space for 32 possbile extension
>>>>> flags and 32 possible extensions. These flags will be carried in the
>>>>> first pseudo extension header, the presense of which will be determined by
>>>>> the flag in the virtio net header.
>>>>>
>>>>> The extensions themselves will immidiately follow the extension header itself.
>>>>> They will be added to the packet in the same order as they appear in the
>>>>> extension flags. No padding is placed between the extensions and any
>>>>> extensions negotiated, but not used need by a given packet will convert to
>>>>> trailing padding.
>>>> Do we need a explicit padding (e.g an extension) which could be controlled by each side?
>>> I don't think so. The size of the vnet header is set based on the extensions negotiated.
>>> The one part I am not crazy about is that in the case of packet not using any extensions,
>>> the data is still placed after the entire vnet header, which essentially adds a lot
>>> of padding. However, that's really no different then if we simply grew the vnet header.
>>>
>>> The other thing I've tried before is putting extensions into their own sg buffer, but that
>>> made it slower.h
>> Yes.
>>
>>>>> For example:
>>>>> | vnet mrg hdr | ext hdr | ext 1 | ext 2 | ext 5 | .. pad .. | packet data |
>>>> Just some rough thoughts:
>>>>
>>>> - Is this better to use TLV instead of bitmap here? One advantage of TLV is that the
>>>> length is not limited by the length of bitmap.
>>> but the disadvantage is that we add at least 4 bytes per extension of just TL data. That
>>> makes this thing even longer.
>> Yes, and it looks like the length is still limited by e.g the length of T.
> Not only that, but it is also limited by the skb->cb as a whole. So adding putting
> extensions into a TLV style means we have less extensions for now, until we get rid of
> skb->cb usage.
>
>>>> - For 1.1, do we really want something like vnet header? AFAIK, it was not used by modern
>>>> NICs, is this better to pack all meta-data into descriptor itself? This may need a some
>>>> changes in tun/macvtap, but looks more PCIE friendly.
>>> That would really be ideal and I've looked at this. There are small issues of exposing
>>> the 'net metadata' of the descriptor to taps so they can be filled in. The alternative
>>> is to use a different control structure for tap->qemu|vhost channel (that can be
>>> implementation specific) and have qemu|vhost populate the 'net metadata' of the descriptor.
>> Yes, this needs some thought. For vhost, things looks a little bit easier, we can probably
>> use msg_control.
>>
> We can use msg_control in qemu as well, can't we?
AFAIK, it needs some changes since we don't export socket to userspace.
> It really is a question of who is doing
> the work and the number of copies.
>
> I can take a closer look of how it would look if we extend the descriptor with type
> specific data. I don't know if other users of virtio would benefit from it?
Not sure, but we can have a common descriptor header followed by device
specific meta data. This probably need some prototype benchmarking to
see the benefits first.
Thanks
next prev parent reply other threads:[~2017-04-24 3:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-15 16:38 [PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions Vladislav Yasevich
2017-04-15 16:38 ` [PATCH RFC (resend) net-next 1/6] virtio-net: Remove the use the padded vnet_header structure Vladislav Yasevich
2017-04-15 16:38 ` [PATCH RFC (resend) net-next 2/6] virtio-net: make header length handling uniform Vladislav Yasevich
2017-04-15 16:38 ` [PATCH RFC (resend) net-next 3/6] virtio_net: Add basic skeleton for handling vnet header extensions Vladislav Yasevich
2017-04-18 2:52 ` Jason Wang
2017-04-15 16:38 ` [PATCH RFC (resend) net-next 4/6] virtio-net: Add support for IPv6 fragment id vnet header extension Vladislav Yasevich
2017-04-15 16:38 ` [PATCH RFC (resend) net-next 5/6] virtio-net: Add support for vlan acceleration " Vladislav Yasevich
2017-04-16 0:28 ` Michael S. Tsirkin
2017-04-18 2:54 ` Jason Wang
2017-04-15 16:38 ` [PATCH RFC (resend) net-next 6/6] virtio: Add support for UDP tunnel offload and extension Vladislav Yasevich
2017-04-18 3:01 ` [PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions Jason Wang
2017-04-20 15:34 ` Vlad Yasevich
2017-04-21 4:05 ` Jason Wang
2017-04-21 13:08 ` Vlad Yasevich
2017-04-24 3:22 ` Jason Wang [this message]
2017-04-24 17:04 ` 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=951e021c-fa8e-f7d4-f058-92d28681379c@redhat.com \
--to=jasowang@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=vyasevic@redhat.com \
--cc=vyasevich@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).