On Wed, May 03, 2023 at 04:11:59PM +0300, Arseniy Krasnov wrote:
On 03.05.2023 15:52, Stefano Garzarella wrote:
Hi Arseniy,
Sorry for the delay, but I have been very busy.
Hello, no problem!
I can't apply this series on master or net-next, can you share with me
the base commit?
Here
Hi Arseniy,
Sorry for the delay, but I have been very busy.
I can't apply this series on master or net-next, can you share with me
the base commit?
On Sun, Apr 23, 2023 at 10:26:28PM +0300, Arseniy Krasnov wrote:
Hello,
DESCRIPTION
this is MSG_ZEROCOPY feature
On Sat, Apr 15, 2023 at 03:55:05PM +, Bobby Eshleman wrote:
On Fri, Apr 28, 2023 at 12:43:09PM +0200, Stefano Garzarella wrote:
On Sat, Apr 15, 2023 at 07:13:47AM +, Bobby Eshleman wrote:
> CC'ing virtio-...@lists.oasis-open.org because this thread is starting
> to touch th
On Sat, Apr 15, 2023 at 05:29:12PM +, Bobby Eshleman wrote:
On Fri, Apr 28, 2023 at 12:29:50PM +0200, Stefano Garzarella wrote:
On Sat, Apr 15, 2023 at 10:30:55AM +, Bobby Eshleman wrote:
> On Wed, Apr 19, 2023 at 11:30:53AM +0200, Stefano Garzarella wrote:
> > On Fri, Apr
t; we should not deliver the copy to tap device in this case. So we
> need to move virtio_transport_deliver_tap_pkt() down after all
> possible failures.
>
> Fixes: 82dfb540aeb2 ("VSOCK: Add virtio vsock vsockmon hooks")
> Cc: Stefan Hajnoczi
> Cc: Stefano Garzarella
> Cc:
On Sat, Apr 15, 2023 at 07:13:47AM +, Bobby Eshleman wrote:
CC'ing virtio-...@lists.oasis-open.org because this thread is starting
to touch the spec.
On Wed, Apr 19, 2023 at 12:00:17PM +0200, Stefano Garzarella wrote:
Hi Bobby,
On Fri, Apr 14, 2023 at 11:18:40AM +, Bobby Eshleman
On Sat, Apr 15, 2023 at 10:30:55AM +, Bobby Eshleman wrote:
On Wed, Apr 19, 2023 at 11:30:53AM +0200, Stefano Garzarella wrote:
On Fri, Apr 14, 2023 at 12:25:59AM +, Bobby Eshleman wrote:
> Because the dgram sendmsg() path for AF_VSOCK acquires the socket lock
> it does not scal
Hi Bobby,
On Fri, Apr 14, 2023 at 11:18:40AM +, Bobby Eshleman wrote:
CC'ing Cong.
On Fri, Apr 14, 2023 at 12:25:56AM +, Bobby Eshleman wrote:
Hey all!
This series introduces support for datagrams to virtio/vsock.
Great! Thanks for restarting this work!
It is a spin-off (and
On Fri, Apr 14, 2023 at 12:25:59AM +, Bobby Eshleman wrote:
Because the dgram sendmsg() path for AF_VSOCK acquires the socket lock
it does not scale when many senders share a socket.
Prior to this patch the socket lock is used to protect the local_addr,
remote_addr, transport, and buffer
On Fri, Apr 14, 2023 at 12:25:58AM +, Bobby Eshleman wrote:
This commit adds a feature bit for virtio vsock to support datagrams.
This commit should not be applied without first applying the commit
that implements datagrams for virtio.
Signed-off-by: Jiang Wang
Signed-off-by: Bobby
On Fri, Apr 14, 2023 at 12:25:57AM +, Bobby Eshleman wrote:
This commit adds support for datagrams over virtio/vsock.
Message boundaries are preserved on a per-skb and per-vq entry basis.
Messages are copied in whole from the user to an SKB, which in turn is
added to the scatterlist for the
-by: Stefano Garzarella
Thanks,
Stefano
diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index e3afc0c866f5..5c6360df1f31 100644
--- a/net/vmw_vsock/vsock_loopback.c
+++ b/net/vmw_vsock/vsock_loopback.c
@@ -31,8 +31,7 @@ static int vsock_loopback_send_pkt(struct sk_buff *skb
-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 57
1 file changed, 50 insertions(+), 7 deletions(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c
b/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c
index c996e750dc02..00d7d72713be 100644
--- a/drivers/vdpa
kend=mem \
-object memory-backend-file,share=on,id=mem,size="512M",mem-path="/dev/shm"
...
-blockdev
node-name=drive_src1,driver=virtio-blk-vhost-vdpa,path=/dev/vhost-vdpa-0,cache.direct=on
\
-device virtio-blk-pci,id=src1,bootindex=2,drive=drive_src1
(qemu) migr
by the device.
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 +--
drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 ++---
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 40 +++-
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 28 ++-
4 files changed, 57
as needed, following the
documentation of mmget() in include/linux/sched/mm.h:
* Never use this function to pin this address space for an
* unbounded/indefinite amount of time.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v4:
- checked `use_va` in vdpasim_work_fn() [
Let's use our own kthread to run device jobs.
This allows us more flexibility, especially we can attach the kthread
to the user address space when vDPA uses user's VA.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v3:
- fix `dev` not initialized in the error path
.
For these reasons, let's replace the spinlock with a mutex that gives
us more flexibility.
Suggested-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 4 ++--
drivers/vdpa/vdpa_sim/vdpa_sim.c | 34
Let's move work management inside the vdpa_sim core.
This way we can easily change how we manage the works, without
having to change the devices each time.
Acked-by: Eugenio Pérez Martin
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 3
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Acked-by: Eugenio Pérez
Signed-off-by: Stefano Garzarella
---
Notes:
v5:
- s/userpace/userspace/ in the vringh_init_iotlb_va doc [Simon
Define a macro to be reused in the different parts of the code.
Useful for the next patches where we add more arrays to manage also
translations with user VA.
Suggested-by: Eugenio Perez Martin
Signed-off-by: Stefano Garzarella
---
Notes:
v4:
- added this patch with the changes
lt_disable() and/or preempt_disable()).
This commit reuses a "boiler plate" commit message from Fabio, who has
already did this change in several places.
Cc: "Fabio M. De Francesco"
Reviewed-by: Fabio M. De Francesco
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes
-off-by: Stefano Garzarella
---
Notes:
v4:
- added new switch after vhost_dev_ioctl() [Jason]
v3:
- added `case VHOST_SET_OWNER` in vhost_vdpa_unlocked_ioctl() [Jason]
v2:
- call the new unbind_mm callback during the release [Jason]
- avoid to call bind_mm callback
/20230324153607.46836-1-sgarz...@redhat.com/
v3: https://lore.kernel.org/lkml/20230321154228.182769-1-sgarz...@redhat.com/
v2: https://lore.kernel.org/lkml/20230302113421.174582-1-sgarz...@redhat.com/
RFC v1:
https://lore.kernel.org/lkml/20221214163025.103075-1-sgarz...@redhat.com/
Stefano Garzarella (9
These new optional callbacks is used to bind/unbind the device to
a specific address space so the vDPA framework can use VA when
these callbacks are implemented.
Suggested-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v2:
- removed `struct
eive calls.
Signed-off-by: Arseniy Krasnov
---
net/vmw_vsock/af_vsock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
LGTM!
Reviewed-by: Stefano Garzarella
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 5f2dda35c980..413407bb646c 100644
--- a/net/vmw_vsock/
Krasnov
Reviewed-by: Vishnu Dasa
---
net/vmw_vsock/vmci_transport.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
LGTM!
Reviewed-by: Stefano Garzarella
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 36eb16a40745..a5375c97f5b0 100644
On Fri, Mar 31, 2023 at 06:06:10PM -0700, John Fastabend wrote:
Bobby Eshleman wrote:
We're testing usage of vsock as a way to redirect guest-local UDS
requests to the host and this patch series greatly improves the
performance of such a setup.
Compared to copying packets via userspace, this
Replace `userpace` with `userspace`.
Cc: Simon Horman
Signed-off-by: Stefano Garzarella
---
drivers/vhost/vringh.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index a1e27da54481..694462ba3242 100644
On Thu, Mar 30, 2023 at 03:02:21PM +0200, Simon Horman wrote:
On Fri, Mar 24, 2023 at 04:39:19PM +0100, Stefano Garzarella wrote:
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off
hile other patches can be sent to
net-next.
Reviewed-by: Stefano Garzarella
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Thu, Mar 30, 2023 at 11:18:36PM +0300, Arseniy Krasnov wrote:
On 30.03.2023 23:13, Arseniy Krasnov wrote:
This adds conversion of VMCI specific error code to general -ENOMEM. It
is needed, because af_vsock.c passes error value returned from transport
to the user, which does not expect to
On Thu, Mar 30, 2023 at 10:07:36AM +0300, Arseniy Krasnov wrote:
This adds conversion of VMCI specific error code to general -ENOMEM. It
is needed, because af_vsock.c passes error value returned from transport
to the user.
Signed-off-by: Arseniy Krasnov
---
net/vmw_vsock/vmci_transport.c | 19
On Thu, Mar 30, 2023 at 10:05:45AM +0300, Arseniy Krasnov wrote:
This removes behaviour, where error code returned from any transport
was always switched to ENOMEM. This works in the same way as:
commit
c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"),
but for receive calls.
, ...),
but I don't have a strong opinion on that, so that's fine too:
Reviewed-by: Stefano Garzarella
Thanks,
Stefano
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
ove _vdpa_register_device() to the end of vdpasim_net_dev_add()
and add a comment to avoid future issues.
Fixes: 0899774cb360 ("vdpa_sim_net: vendor satistics")
Signed-off-by: Stefano Garzarella
---
Notes:
I don't have a reproducer, but I became aware of this problem while
I
On Tue, Mar 28, 2023 at 04:29:09PM +, Bobby Eshleman wrote:
This patch sets the skb owner in the recv and send path for virtio.
For the send path, this solves the leak caused when
virtio_transport_purge_skbs() finds skb->sk is always NULL and therefore
never matches it with the current
On Tue, Mar 28, 2023 at 01:42:19PM +0300, Arseniy Krasnov wrote:
On 28.03.2023 12:42, Stefano Garzarella wrote:
I pressed send too early...
CCing Bryan, Vishnu, and pv-driv...@vmware.com
On Tue, Mar 28, 2023 at 11:39 AM Stefano Garzarella wrote:
On Sun, Mar 26, 2023 at 01:13:11AM +0300
have the same behavior between
transports.
Reviewed-by: Stefano Garzarella
Signed-off-by: Arseniy Krasnov
---
tools/testing/vsock/vsock_test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
index
I pressed send too early...
CCing Bryan, Vishnu, and pv-driv...@vmware.com
On Tue, Mar 28, 2023 at 11:39 AM Stefano Garzarella wrote:
>
> On Sun, Mar 26, 2023 at 01:13:11AM +0300, Arseniy Krasnov wrote:
> >This removes behaviour, where error code returned from any transport
&
On Tue, Mar 28, 2023 at 11:35 AM Arseniy Krasnov
wrote:
>
>
>
> On 28.03.2023 12:29, Stefano Garzarella wrote:
> > On Sun, Mar 26, 2023 at 01:09:25AM +0300, Arseniy Krasnov wrote:
> >> This adds WARN_ONCE() and return from stream dequeue callback when
> >> so
On Sun, Mar 26, 2023 at 01:13:11AM +0300, Arseniy Krasnov wrote:
This removes behaviour, where error code returned from any transport
was always switched to ENOMEM. This works in the same way as:
commit
c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"),
but for receive calls.
received skbuff to another. Test checks that this feature
works correctly.
This test is actual only for virtio transport.
Signed-off-by: Arseniy Krasnov
---
tools/testing/vsock/vsock_test.c | 90
1 file changed, 90 insertions(+)
Reviewed-by: Stefano Garzarella
otal < len && !skb_queue_empty(>rx_queue)) {
skb = skb_peek(>rx_queue);
--
2.25.1
Anyway the patch LGTM!
Reviewed-by: Stefano Garzarella
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
free_pkt = true;
last_hdr->flags |= hdr->flags;
- last_hdr->len = cpu_to_le32(last_skb->len);
+ le32_add_cpu(_hdr->len, len);
goto out;
}
}
-
!
Reviewed-by: Stefano Garzarella
Thanks,
Stefano
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Mon, Mar 27, 2023 at 10:01:05PM +, Bobby Eshleman wrote:
This patch sets the owner for the skb when being sent from a socket and
so solves the leak caused when virtio_transport_purge_skbs() finds
skb->sk is always NULL and therefore never matches it with the current
socket. Setting the
Reviewed-by: Stefano Garzarella
diff --git a/tools/testing/vsock/.gitignore b/tools/testing/vsock/.gitignore
index 87ca2731cff9..a8adcfdc292b 100644
--- a/tools/testing/vsock/.gitignore
+++ b/tools/testing/vsock/.gitignore
@@ -2,3 +2,4 @@
*.d
vsock_test
vsock_diag_test
+vsock_perf
---
b
On Sat, Mar 25, 2023 at 1:44 AM Bobby Eshleman wrote:
>
> On Fri, Mar 24, 2023 at 09:38:38AM +0100, Stefano Garzarella wrote:
> > Hi Bobby,
> > FYI we have also this one, but it seems related to
> > syzbot+befff0a9536049e79...@syzkaller.appspotmail.com
> >
>
as needed, following the
documentation of mmget() in include/linux/sched/mm.h:
* Never use this function to pin this address space for an
* unbounded/indefinite amount of time.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v4:
- checked `use_va` in vdpasim_work_fn() [
.
For these reasons, let's replace the spinlock with a mutex that gives
us more flexibility.
Suggested-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 4 ++--
drivers/vdpa/vdpa_sim/vdpa_sim.c | 34
Let's use our own kthread to run device jobs.
This allows us more flexibility, especially we can attach the kthread
to the user address space when vDPA uses user's VA.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v3:
- fix `dev` not initialized in the error path
Let's move work management inside the vdpa_sim core.
This way we can easily change how we manage the works, without
having to change the devices each time.
Acked-by: Eugenio Pérez Martin
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 3
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off-by: Stefano Garzarella
---
Notes:
v4:
- used uintptr_t for `io_addr` [Eugenio]
- added `io_addr` and `io_len` variables
Define a macro to be reused in the different parts of the code.
Useful for the next patches where we add more arrays to manage also
translations with user VA.
Suggested-by: Eugenio Perez Martin
Signed-off-by: Stefano Garzarella
---
Notes:
v4:
- added this patch with the changes
-off-by: Stefano Garzarella
---
Notes:
v4:
- added new switch after vhost_dev_ioctl() [Jason]
v3:
- added `case VHOST_SET_OWNER` in vhost_vdpa_unlocked_ioctl() [Jason]
v2:
- call the new unbind_mm callback during the release [Jason]
- avoid to call bind_mm callback
These new optional callbacks is used to bind/unbind the device to
a specific address space so the vDPA framework can use VA when
these callbacks are implemented.
Suggested-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v2:
- removed `struct
lt_disable() and/or preempt_disable()).
This commit reuses a "boiler plate" commit message from Fabio, who has
already did this change in several places.
Cc: "Fabio M. De Francesco"
Reviewed-by: Fabio M. De Francesco
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes
/20230321154228.182769-1-sgarz...@redhat.com/
v2: https://lore.kernel.org/lkml/20230302113421.174582-1-sgarz...@redhat.com/
RFC v1:
https://lore.kernel.org/lkml/20221214163025.103075-1-sgarz...@redhat.com/
Stefano Garzarella (9):
vdpa: add bind_mm/unbind_mm callbacks
vhost-vdpa: use bind_mm/unbind_mm
#syz dup general protection fault in virtio_transport_purge_skbs
On Fri, Mar 24, 2023 at 1:52 AM syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:fe15c26ee26e Linux 6.3-rc1
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
>
On Fri, Mar 24, 2023 at 11:49:32AM +0800, Jason Wang wrote:
在 2023/3/21 23:48, Stefano Garzarella 写道:
The new "use_va" module parameter (default: true) is used in
vdpa_alloc_device() to inform the vDPA framework that the device
supports VA.
vringh is initialized to use VA only wh
On Fri, Mar 24, 2023 at 10:54:39AM +0800, Jason Wang wrote:
On Thu, Mar 23, 2023 at 5:50 PM Stefano Garzarella wrote:
On Thu, Mar 23, 2023 at 11:42:07AM +0800, Jason Wang wrote:
>On Tue, Mar 21, 2023 at 11:48 PM Stefano Garzarella
wrote:
>>
>> The new "use_va"
On Thu, Mar 23, 2023 at 03:43:34PM +0100, Eugenio Perez Martin wrote:
On Thu, Mar 23, 2023 at 11:46 AM Stefano Garzarella wrote:
On Thu, Mar 23, 2023 at 09:09:14AM +0100, Eugenio Perez Martin wrote:
>On Tue, Mar 21, 2023 at 4:43 PM Stefano Garzarella wrote:
>>
>>
On Fri, Mar 24, 2023 at 10:06 AM Stefano Garzarella wrote:
>
> On Fri, Mar 24, 2023 at 9:55 AM Stefano Garzarella
> wrote:
> >
> > On Fri, Mar 24, 2023 at 9:31 AM Stefano Garzarella
> > wrote:
> > >
> > > Hi Bobby,
> > > can you ta
tmail.com
Signed-off-by: Stefano Garzarella
---
net/vmw_vsock/vsock_loopback.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index 671e03240fc5..89905c092645 100644
--- a/net/vmw_vsock/vsock_loopback.c
On Fri, Mar 24, 2023 at 10:10 AM Arseniy Krasnov
wrote:
> On 24.03.2023 12:06, Stefano Garzarella wrote:
> > On Fri, Mar 24, 2023 at 9:55 AM Stefano Garzarella
> > wrote:
> >>
> >> On Fri, Mar 24, 2023 at 9:31 AM Stefano Garzarella
> >> wrote:
>
On Fri, Mar 24, 2023 at 9:55 AM Stefano Garzarella wrote:
>
> On Fri, Mar 24, 2023 at 9:31 AM Stefano Garzarella
> wrote:
> >
> > Hi Bobby,
> > can you take a look at this report?
> >
> > It seems related to the changes we made to support skbuff.
>
&g
On Fri, Mar 24, 2023 at 9:31 AM Stefano Garzarella wrote:
>
> Hi Bobby,
> can you take a look at this report?
>
> It seems related to the changes we made to support skbuff.
Could it be a problem of concurrent access to pkt_queue ?
IIUC we should hold pkt_queue.lo
Hi Bobby,
FYI we have also this one, but it seems related to
syzbot+befff0a9536049e79...@syzkaller.appspotmail.com
Thanks,
Stefano
On Fri, Mar 24, 2023 at 1:52 AM syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:fe15c26ee26e Linux 6.3-rc1
> git tree:
Hi Bobby,
can you take a look at this report?
It seems related to the changes we made to support skbuff.
Thanks,
Stefano
On Fri, Mar 24, 2023 at 1:52 AM syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:fff5a5e7f528 Merge tag 'for-linus' of
On Thu, Mar 23, 2023 at 01:53:40PM +0300, Arseniy Krasnov wrote:
On 23.03.2023 13:48, Stefano Garzarella wrote:
On Thu, Mar 23, 2023 at 01:01:40PM +0300, Arseniy Krasnov wrote:
Hello Stefano,
thanks for review!
You're welcome!
Since both patches are R-b, i can wait for a few days
On Thu, Mar 23, 2023 at 01:01:40PM +0300, Arseniy Krasnov wrote:
Hello Stefano,
thanks for review!
You're welcome!
Since both patches are R-b, i can wait for a few days, then send this
as 'net-next'?
Yep, maybe even this series could have been directly without RFC ;-)
Thanks,
Stefano
On Thu, Mar 23, 2023 at 09:09:14AM +0100, Eugenio Perez Martin wrote:
On Tue, Mar 21, 2023 at 4:43 PM Stefano Garzarella wrote:
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off
On Thu, Mar 23, 2023 at 11:36:28AM +0800, Jason Wang wrote:
On Tue, Mar 21, 2023 at 11:43 PM Stefano Garzarella wrote:
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off-by: Stefano
On Thu, Mar 23, 2023 at 11:42:07AM +0800, Jason Wang wrote:
On Tue, Mar 21, 2023 at 11:48 PM Stefano Garzarella wrote:
The new "use_va" module parameter (default: true) is used in
vdpa_alloc_device() to inform the vDPA framework that the device
supports VA.
vringh is initialized
On Thu, Mar 23, 2023 at 11:01:39AM +0800, Jason Wang wrote:
On Tue, Mar 21, 2023 at 11:42 PM Stefano Garzarella wrote:
When the user call VHOST_SET_OWNER ioctl and the vDPA device
has `use_va` set to true, let's call the bind_mm callback.
In this way we can bind the device to the user address
, 6 insertions(+)
Reviewed-by: Stefano Garzarella
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net/vmw_vsock/virtio_transport_common.c
index 9e87c7d4d7cf..312658c176bd 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -302,6 +302,9
ocess") #
mainline only
Reported-by: syzbot+6b27b2d2aba1c80cc...@syzkaller.appspotmail.com
Signed-off-by: Mike Christie
---
kernel/vhost_task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefano Garzarella
diff --git a/kernel/vhost_task.c b/kernel/vhost_ta
/* Return number of bytes, if any data has been sent. */
+ if (rest_len != pkt_len)
+ ret = pkt_len - rest_len;
+
+ return ret;
}
static bool virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs,
-- 2.25.1
The patch LGTM:
Reviewed-by: Stefano Garzar
Let's use our own kthread to run device jobs.
This allows us more flexibility, especially we can attach the kthread
to the user address space when vDPA uses user's VA.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v3:
- fix `dev` not initialized in the error path
Let's move work management inside the vdpa_sim core.
This way we can easily change how we manage the works, without
having to change the devices each time.
Acked-by: Eugenio Pérez Martin
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 3
as needed, following the
documentation of mmget() in include/linux/sched/mm.h:
* Never use this function to pin this address space for an
* unbounded/indefinite amount of time.
Signed-off-by: Stefano Garzarella
---
Notes:
v3:
- called mmget_not_zero() before kthread_use_mm() [Jason]
.
For these reasons, let's replace the spinlock with a mutex that gives
us more flexibility.
Suggested-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 4 ++--
drivers/vdpa/vdpa_sim/vdpa_sim.c | 34
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off-by: Stefano Garzarella
---
Notes:
v3:
- refactored avoiding code duplication [Eugenio]
v2:
- replace kmap_atomic
lt_disable() and/or preempt_disable()).
This commit reuses a "boiler plate" commit message from Fabio, who has
already did this change in several places.
Cc: "Fabio M. De Francesco"
Signed-off-by: Stefano Garzarella
---
Notes:
v3:
- credited Fabio for the commit message
-
-off-by: Stefano Garzarella
---
Notes:
v3:
- added `case VHOST_SET_OWNER` in vhost_vdpa_unlocked_ioctl() [Jason]
v2:
- call the new unbind_mm callback during the release [Jason]
- avoid to call bind_mm callback after the reset, since the device
is not detaching it now
/20230302113421.174582-1-sgarz...@redhat.com/
RFC v1:
https://lore.kernel.org/lkml/20221214163025.103075-1-sgarz...@redhat.com/
Stefano Garzarella (8):
vdpa: add bind_mm/unbind_mm callbacks
vhost-vdpa: use bind_mm/unbind_mm device callbacks
vringh: replace kmap_atomic() with kmap_local_page()
vringh
These new optional callbacks is used to bind/unbind the device to
a specific address space so the vDPA framework can use VA when
these callbacks are implemented.
Suggested-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Notes:
v2:
- removed `struct task_struct *owner` param
On Tue, Mar 21, 2023 at 12:31:48AM +0300, Arseniy Krasnov wrote:
This adds small optimization for tx path: instead of allocating single
skbuff on every call to transport, allocate multiple skbuff's until
credit space allows, thus trying to send as much as possible data without
return to
On Mon, Mar 20, 2023 at 09:10:13PM +0300, Arseniy Krasnov wrote:
On 20.03.2023 17:57, Stefano Garzarella wrote:
On Sun, Mar 19, 2023 at 09:51:06PM +0300, Arseniy Krasnov wrote:
This fixes header length calculation of skbuff during data appending to
it. When such skbuff is processed
On Mon, Mar 20, 2023 at 09:02:19PM +0300, Arseniy Krasnov wrote:
On 20.03.2023 17:29, Stefano Garzarella wrote:
On Sun, Mar 19, 2023 at 09:46:10PM +0300, Arseniy Krasnov wrote:
This adds small optimization for tx path: instead of allocating single
skbuff on every call to transport, allocate
On Sun, Mar 19, 2023 at 09:53:54PM +0300, Arseniy Krasnov wrote:
This adds test which checks case when data of newly received skbuff is
appended to the last skbuff in the socket's queue.
This test is actual only for virtio transport.
Signed-off-by: Arseniy Krasnov
---
On Sun, Mar 19, 2023 at 09:52:19PM +0300, Arseniy Krasnov wrote:
This prints WARN() and returns from stream dequeue callback when socket's
queue is empty, but 'rx_bytes' still non-zero.
Signed-off-by: Arseniy Krasnov
---
net/vmw_vsock/virtio_transport_common.c | 7 +++
1 file changed, 7
On Sun, Mar 19, 2023 at 09:51:06PM +0300, Arseniy Krasnov wrote:
This fixes header length calculation of skbuff during data appending to
it. When such skbuff is processed in dequeue callbacks, e.g. 'skb_pull()'
is called on it, 'skb->len' is dynamic value, so it is impossible to use
it in
On Sun, Mar 19, 2023 at 09:46:10PM +0300, Arseniy Krasnov wrote:
This adds small optimization for tx path: instead of allocating single
skbuff on every call to transport, allocate multiple skbuff's until
credit space allows, thus trying to send as much as possible data without
return to
changed, 3 insertions(+), 5 deletions(-)
LGTM, I think net-next is fine for this.
Reviewed-by: Stefano Garzarella
Thanks,
Stefano
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net/vmw_vsock/virtio_transport_common.c
index cda587196475..607149259e8b 100644
--- a/net/vmw_vsock
On Fri, Mar 17, 2023 at 10:49:27AM +0100, Eugenio Perez Martin wrote:
On Thu, Mar 16, 2023 at 5:07 PM Stefano Garzarella wrote:
On Fri, Mar 3, 2023 at 3:39 PM Eugenio Perez Martin wrote:
>
> On Thu, Mar 2, 2023 at 12:35 PM Stefano Garzarella
wrote:
> >
> > vDPA suppor
On Fri, Mar 3, 2023 at 3:39 PM Eugenio Perez Martin wrote:
>
> On Thu, Mar 2, 2023 at 12:35 PM Stefano Garzarella
> wrote:
> >
> > vDPA supports the possibility to use user VA in the iotlb messages.
> > So, let's add support for user VA in vringh to use it
On Thu, Mar 16, 2023 at 9:31 AM Stefano Garzarella wrote:
>
> On Tue, Mar 14, 2023 at 11:48:33AM +0800, Jason Wang wrote:
> >On Thu, Mar 2, 2023 at 7:34 PM Stefano Garzarella
> >wrote:
> >>
> >> When the user call VHOST_SET_OWNER ioctl and the vDPA device
On Thu, Mar 16, 2023 at 10:13:39AM +0100, Fabio M. De Francesco wrote:
On giovedì 2 marzo 2023 12:34:16 CET Stefano Garzarella wrote:
kmap_atomic() is deprecated in favor of kmap_local_page().
With kmap_local_page() the mappings are per thread, CPU local, can take
page-faults, and can
201 - 300 of 1601 matches
Mail list logo