From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: "沈安琪(凛玥)" <amy.saq@antgroup.com>, "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
netdev@vger.kernel.org, davem@davemloft.net, jasowang@redhat.com,
谈鉴锋 <henry.tjf@antgroup.com>
Subject: Re: [PATCH 2/2] net/packet: send and receive pkt with given vnet_hdr_sz
Date: Wed, 22 Feb 2023 10:04:50 -0500 [thread overview]
Message-ID: <63f62f125ac3b_2ab6208b4@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <5c53cfa0-6728-055d-7aa5-6969844d26bf@antgroup.com>
> >>> You're right. This is configured from userspace before the FD is passed
> >>> to vhost-net, so indeed this will require packet socket UAPI support.
> >>
> >> Thanks for quick reply. We will go with adding an extra UAPI here then.
> >>
> >>
> >> Another discussion for designing this UAPI is, whether it will be better to
> >> support setting only vnet header size, just like what TAP does in its ioctl,
> >> or to support setting a virtio feature bit-map.
> >>
> >>
> >> UAPI setting only vnet header size
> >>
> >> Pros:
> >>
> >> 1. It aligns with how other virito backend devices communicate with
> >> virtio-user
> >>
> >> 2. We can use the holes in struct packet_socket (net/packet/internal.h:120)
> >> to record the extra information since the size info only takes 8 bits.
> >>
> >> Cons:
> >>
> >> 1. It may have more information that virtio-user needs to communicate with
> >> packet socket in the future and needs to add more UAPI supports here.
> >>
> >> To Michael: Is there any other information that backend device needs and
> >> will be given from virtio-user?
> >
> > Yes e.g. I already mentioned virtio 1.0 wrt LE versus native endian
> > format.
> >
> >
> >> UAPI setting a virtio feature bit-map
> >>
> >> Pros:
> >>
> >> 1. It is more general and may reduce future UAPI changes.
> >>
> >> Cons:
> >>
> >> 1. A virtio feature bit-map needs 64 bits, which needs to add an extra field
> >> in packet_sock struct
Accepting a bitmap in the ABI does not have to imply storing a bitmap.
> >>
> >> 2. Virtio-user needs to aware that using packet socket as backend supports
> >> different approach to negotiate the vnet header size.
> >>
> >>
> >> We really appreciate any suggestion or discussion on this design choice of
> >> UAPI.
> > In the end it's ok with just size too, you just probably shouldn't say
> > you support VERSION_1 if you are not passing that bit.
> >
>
> Sorry for the confusion here that we mentioned VERSION_1 in the commit
> log. We actually just attended to give an example of what features that
> may need 12-byte vnet header. We will remove it from the commit log in
> patch v2 to avoid confusion here. Thanks a lot for your suggestions.
The question hinges on which features are expected to have to be
supported in the future. So far we have
- extra num_buffers field
- little endian (V1)
Given the rate of change in the spec, I don't think this should
be over designed. If V1 is not planned to be supported, just
configure header length. If it is, then perhaps instead a feature
bitmap.
prev parent reply other threads:[~2023-02-22 15:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 12:43 [PATCH 0/2] net/packet: support of specifying virtio net header size 沈安琪(凛玥)
2023-02-09 12:43 ` [PATCH 1/2] net/packet: add socketopt to set/get vnet_hdr_sz 沈安琪(凛玥)
2023-02-09 14:45 ` Willem de Bruijn
2023-02-10 4:00 ` 沈安琪(凛玥)
2023-02-09 12:43 ` [PATCH 2/2] net/packet: send and receive pkt with given vnet_hdr_sz 沈安琪(凛玥)
2023-02-09 13:07 ` Michael S. Tsirkin
2023-02-10 4:01 ` 沈安琪(凛玥)
2023-02-10 8:10 ` Michael S. Tsirkin
2023-02-10 15:36 ` Willem de Bruijn
2023-02-12 9:54 ` Michael S. Tsirkin
2023-02-10 15:39 ` Willem de Bruijn
2023-02-13 11:06 ` 沈安琪(凛玥)
2023-02-14 14:28 ` Willem de Bruijn
2023-02-21 9:40 ` 沈安琪(凛玥)
2023-02-21 15:03 ` Willem de Bruijn
2023-02-22 8:04 ` 沈安琪(凛玥)
2023-02-22 11:37 ` Michael S. Tsirkin
2023-02-22 11:43 ` 沈安琪(凛玥)
2023-02-22 15:04 ` Willem de Bruijn [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=63f62f125ac3b_2ab6208b4@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=amy.saq@antgroup.com \
--cc=davem@davemloft.net \
--cc=henry.tjf@antgroup.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.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