[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMB2axNUbWD9=Xg8TkB8XBmjuNw9f==Njzvh4-OP8kNw40O0Lw@mail.gmail.com>
Date: Sun, 28 Jul 2024 14:53:53 -0700
From: Amery Hung <ameryhung@...il.com>
To: Arseniy Krasnov <avkrasnov@...utedevices.com>
Cc: stefanha@...hat.com, sgarzare@...hat.com, mst@...hat.com,
jasowang@...hat.com, xuanzhuo@...ux.alibaba.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, kys@...rosoft.com,
haiyangz@...rosoft.com, wei.liu@...nel.org, decui@...rosoft.com,
bryantan@...are.com, vdasa@...are.com, pv-drivers@...are.com,
dan.carpenter@...aro.org, simon.horman@...igine.com, oxffffaa@...il.com,
kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hyperv@...r.kernel.org, bpf@...r.kernel.org,
bobby.eshleman@...edance.com, jiang.wang@...edance.com,
amery.hung@...edance.com, xiyou.wangcong@...il.com, kernel@...rdevices.ru
Subject: Re: [RFC PATCH net-next v6 03/14] af_vsock: support multi-transport datagrams
On Sun, Jul 28, 2024 at 1:40 PM Arseniy Krasnov
<avkrasnov@...utedevices.com> wrote:
>
> Hi Amery
>
> > /* Transport features flags */
> > /* Transport provides host->guest communication */
> > -#define VSOCK_TRANSPORT_F_H2G 0x00000001
> > +#define VSOCK_TRANSPORT_F_H2G 0x00000001
> > /* Transport provides guest->host communication */
> > -#define VSOCK_TRANSPORT_F_G2H 0x00000002
> > -/* Transport provides DGRAM communication */
> > -#define VSOCK_TRANSPORT_F_DGRAM 0x00000004
> > +#define VSOCK_TRANSPORT_F_G2H 0x00000002
> > +/* Transport provides fallback for DGRAM communication */
> > +#define VSOCK_TRANSPORT_F_DGRAM_FALLBACK 0x00000004
> > /* Transport provides local (loopback) communication */
> > -#define VSOCK_TRANSPORT_F_LOCAL 0x00000008
> > +#define VSOCK_TRANSPORT_F_LOCAL 0x00000008
>
> ^^^ This is refactoring ?
>
This part contains no functional change.
Since virtio dgram uses transport_h2g/g2h instead of transport_dgram
(renamed totransport_dgam_fallback to in this patch) of VMCI, we
rename the flags here to describe the transport in a more accurate
way.
For a datagram vsock, during socket creation, if VMCI is present,
transport_dgram will be registered as a fallback.
During vsock_dgram_sendmsg(), we will always try to resolve the
transport to transport_h2g/g2h/local first and then fallback on
transport_dgram.
Let me know if there is anything that is confusing here.
>
> > + /* During vsock_create(), the transport cannot be decided yet if
> > + * using virtio. While for VMCI, it is transport_dgram_fallback.
>
>
> I'm not English speaker, but 'decided' -> 'detected'/'resolved' ?
>
Not a native English speaker either, but I think resolve is also
pretty accurate.
Thanks,
Amery
>
>
> Thanks, Arseniy
Powered by blists - more mailing lists