Re: [RFC PATCH net-next v6 07/14] virtio/vsock: add common datagram send path

2024-07-29 Thread Arseniy Krasnov
On 30.07.2024 01:51, Amery Hung wrote: > On Mon, Jul 29, 2024 at 1:12 PM Arseniy Krasnov > wrote: >> >> Hi, >> >>> diff --git a/net/vmw_vsock/virtio_transport_common.c >>> b/net/vmw_vsock/virtio_transport_common.c >>> index a1c768

[RFC PATCH net-next v6 07/14] virtio/vsock: add common datagram send path

2024-07-29 Thread Arseniy Krasnov
Hi, > diff --git a/net/vmw_vsock/virtio_transport_common.c > b/net/vmw_vsock/virtio_transport_common.c > index a1c76836d798..46cd1807f8e3 100644 > --- a/net/vmw_vsock/virtio_transport_common.c > +++ b/net/vmw_vsock/virtio_transport_common.c > @@ -1040,13 +1040,98 @@ int virtio_transport_shutdown(

[RFC PATCH net-next v6 01/14] af_vsock: generalize vsock_dgram_recvmsg() to all transports

2024-07-29 Thread Arseniy Krasnov
> @@ -1273,11 +1273,15 @@ static int vsock_dgram_connect(struct socket *sock, > int vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg, > size_t len, int flags) > { > + struct vsock_skb_cb *vsock_cb; > #ifdef CONFIG_BPF_SYSCALL > const struct proto *prot;

Re: [RFC PATCH net-next v6 03/14] af_vsock: support multi-transport datagrams

2024-07-28 Thread Arseniy Krasnov
On 29.07.2024 00:53, Amery Hung wrote: > On Sun, Jul 28, 2024 at 1:40 PM Arseniy Krasnov > wrote: >> >> Hi Amery >> >>> /* Transport features flags */ >>> /* Transport provides host->guest communication */ >>> -#define VSOCK_

Re: [RFC PATCH net-next v6 03/14] af_vsock: support multi-transport datagrams

2024-07-28 Thread Arseniy Krasnov
Hi Amery > /* Transport features flags */ > /* Transport provides host->guest communication */ > -#define VSOCK_TRANSPORT_F_H2G0x0001 > +#define VSOCK_TRANSPORT_F_H2G0x0001 > /* Transport provides guest->host communication */ > -#define VSOCK_TRAN

[RFC PATCH net-next v6 02/14] af_vsock: refactor transport lookup code

2024-07-24 Thread Arseniy Krasnov
Hi +static const struct vsock_transport * +vsock_connectible_lookup_transport(unsigned int cid, __u8 flags) ^^^ may be just 'u8' ? +{ + const struct vsock_transport *transport; ^^^ do we really need

Re: [RFC PATCH net-next v6 14/14] test/vsock: add vsock dgram tests

2024-07-20 Thread Arseniy Krasnov
+static void test_dgram_sendto_client(const struct test_opts *opts) +{ + union { + struct sockaddr sa; + struct sockaddr_vm svm; + } addr = { + .svm = { + .svm_family = AF_VSOCK, + .svm_port = 1234, ^

Re: [RFC PATCH net-next v6 03/14] af_vsock: support multi-transport datagrams

2024-07-15 Thread Arseniy Krasnov
Hi! Sorry, i was not in cc, so I'll reply in this way :) +static const struct vsock_transport * +vsock_dgram_lookup_transport(unsigned int cid, __u8 flags) +{ + const struct vsock_transport *transport; + + transport = vsock_connectible_lookup_transport(cid, flags); + if (transpor