From: Cong Wang <xiyou.wangcong@gmail.com>
To: Bobby Eshleman <bobby.eshleman@bytedance.com>
Cc: Cong Wang <cong.wang@bytedance.com>,
kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
virtualization@lists.linux-foundation.org,
Song Liu <song@kernel.org>, Eric Dumazet <edumazet@google.com>,
Stanislav Fomichev <sdf@google.com>,
linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
Mykola Lysenko <mykolal@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>, Yonghong Song <yhs@fb.com>,
Paolo Abeni <pabeni@redhat.com>, KP Singh <kpsingh@kernel.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Jakub Kicinski <kuba@kernel.org>, Hao Luo <haoluo@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Olsa <jolsa@kernel.org>,
bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH RFC 1/3] vsock: support sockmap
Date: Sat, 21 Jan 2023 11:22:31 -0800 [thread overview]
Message-ID: <Y8w7d+6UASP3jUHf@pop-os.localdomain> (raw)
In-Reply-To: <20230118-support-vsock-sockmap-connectible-v1-1-d47e6294827b@bytedance.com>
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.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-01-21 19:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230118-support-vsock-sockmap-connectible-v1-0-d47e6294827b@bytedance.com>
[not found] ` <20230118-support-vsock-sockmap-connectible-v1-1-d47e6294827b@bytedance.com>
2023-01-19 10:39 ` [PATCH RFC 1/3] vsock: support sockmap Stefano Garzarella
[not found] ` <Y8gLW0hI1sFtQ3Md@bullseye>
2023-01-20 8:55 ` Stefano Garzarella
2023-01-21 19:22 ` Cong Wang [this message]
[not found] ` <20230118-support-vsock-sockmap-connectible-v1-2-d47e6294827b@bytedance.com>
2023-01-19 10:44 ` [PATCH RFC 2/3] selftests/bpf: add vsock to vmtest.sh Stefano Garzarella
[not found] ` <20230118-support-vsock-sockmap-connectible-v1-3-d47e6294827b@bytedance.com>
2023-01-19 10:48 ` [PATCH RFC 3/3] selftests/bpf: Add a test case for vsock sockmap Stefano Garzarella
2023-01-19 10:49 ` [PATCH RFC 0/3] vsock: add support for sockmap Stefano Garzarella
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=Y8w7d+6UASP3jUHf@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bobby.eshleman@bytedance.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mst@redhat.com \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=yhs@fb.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