[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y8i9NlRpIR/KE/q2@bullseye>
Date: Thu, 19 Jan 2023 03:47:02 +0000
From: Bobby Eshleman <bobbyeshleman@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Bobby Eshleman <bobby.eshleman@...edance.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Andrii Nakryiko <andrii@...nel.org>,
Mykola Lysenko <mykolal@...com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Cong Wang <cong.wang@...edance.com>
Subject: Re: [PATCH RFC 1/3] vsock: support sockmap
On Sat, Jan 21, 2023 at 11:22:31AM -0800, Cong Wang wrote:
> On Wed, Jan 18, 2023 at 12:27:39PM -0800, Bobby Eshleman wrote:
> > +static int vsock_read_skb(struct sock *sk, skb_read_actor_t read_actor)
> > +{
> > + struct vsock_sock *vsk = vsock_sk(sk);
> > +
> > + if (!vsk->transport)
> > + return -ENODEV;
> > +
> > + if (!vsk->transport->read_skb)
> > + return -EOPNOTSUPP;
>
> Can we move these two checks to sockmap update path? It would make
> vsock_read_skb() faster.
>
> > +
> > + return vsk->transport->read_skb(vsk, read_actor);
> > +}
>
> Essentially can be just this one line.
>
> Thanks.
That makes sense, will do.
Thanks,
Bobby
Powered by blists - more mailing lists