Re: [PATCH] vhost-vdpa: change ioctl # for VDPA_GET_VRING_SIZE

2024-04-03 Thread Stefano Garzarella
ernels with this yet, right? (other than v6.9-rc*) LGTM: Reviewed-by: Stefano Garzarella include/uapi/linux/vhost.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h index bea697390613..b95dd84eef2d 10064

Re: [PATCH net v2] vsock/virtio: fix packet delivery to tap device

2024-03-29 Thread Stefano Garzarella
er calling virtqueue_add_sgs() and making sure it returned successfully. Fixes: 82dfb540aeb2 ("VSOCK: Add virtio vsock vsockmon hooks") Cc: sta...@vge.kernel.org Signed-off-by: Marco Pinna --- net/vmw_vsock/virtio_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH v3 2/3] vhost: Add smp_rmb() in vhost_enable_notify()

2024-03-28 Thread Stefano Garzarella
: Yihuang Yu Suggested-by: Will Deacon Signed-off-by: Gavin Shan Acked-by: Jason Wang --- drivers/vhost/vhost.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) Thanks for fixing this! Reviewed-by: Stefano Garzarella diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vho

Re: [PATCH v3 1/3] vhost: Add smp_rmb() in vhost_vq_avail_empty()

2024-03-28 Thread Stefano Garzarella
: Yihuang Yu Suggested-by: Will Deacon Signed-off-by: Gavin Shan Acked-by: Jason Wang --- drivers/vhost/vhost.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 045f666b4f

Re: [PATCH] vsock/virtio: fix packet delivery to tap device

2024-03-25 Thread Stefano Garzarella
On Mon, Mar 25, 2024 at 06:12:38PM +0100, Marco Pinna wrote: Commit 82dfb540aeb2 ("VSOCK: Add virtio vsock vsockmon hooks") added virtio_transport_deliver_tap_pkt() for handing packets to the vsockmon device. However, in virtio_transport_send_pkt_work(), the function is called before actually

Re: [PATCH v3] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI

2024-03-20 Thread Stefano Garzarella
On Wed, Mar 20, 2024 at 06:19:12PM +0800, Wang Rong wrote: From: Rong Wang Once enable iommu domain for one device, the MSI translation tables have to be there for software-managed MSI. Otherwise, platform with software-managed MSI without an irq bypass function, can not get a correct memory

Re: [PATCH net-next 2/2] net/vsockmon: Do not set zeroed statistics

2024-02-26 Thread Stefano Garzarella
ons(-) Reviewed-by: Stefano Garzarella diff --git a/drivers/net/vsockmon.c b/drivers/net/vsockmon.c index a0b4dca36baf..a1ba5169ed5d 100644 --- a/drivers/net/vsockmon.c +++ b/drivers/net/vsockmon.c @@ -46,9 +46,6 @@ static void vsockmon_get_stats64(struct net_device *dev, struct rtnl_link_stat

Re: [PATCH net-next 1/2] net/vsockmon: Leverage core stats allocator

2024-02-26 Thread Stefano Garzarella
1 file changed, 1 insertion(+), 15 deletions(-) Thanks for this patch! Reviewed-by: Stefano Garzarella diff --git a/drivers/net/vsockmon.c b/drivers/net/vsockmon.c index b1bb1b04b664..a0b4dca36baf 100644 --- a/drivers/net/vsockmon.c +++ b/drivers/net/vsockmon.c @@ -13,19 +1

Re: Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-07 Thread Stefano Garzarella
On Wed, Feb 07, 2024 at 11:27:14AM +0800, Jason Wang wrote: On Tue, Feb 6, 2024 at 10:52 PM Stefano Garzarella wrote: If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect the driver to enable virtqueue before setting DRIVER_OK. If the driver tries anyway, better to fail

Re: Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Stefano Garzarella
On Tue, Feb 06, 2024 at 10:56:50AM -0500, Michael S. Tsirkin wrote: better @subj: try late vq enable only if negotiated I rewrote it 3/4 times, and before sending it I was not happy with the result. Thank you, much better! I'll change it in v2. Stefano

[PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Stefano Garzarella
for not meeting this requirement, see https://lore.kernel.org/qemu-devel/20240202132521.32714-1-kw...@redhat.com/ Fixes: 9f09fd6171fe ("vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature") Cc: epere...@redhat.com Signed-off-by: Stefano Garzarella --- include/uapi/linux/vho

Re: [PATCH net-next v1] vsock/test: print type for SOCK_SEQPACKET

2024-01-25 Thread Stefano Garzarella
! Reviewed-by: Stefano Garzarella diff --git a/tools/testing/vsock/vsock_diag_test.c b/tools/testing/vsock/vsock_diag_test.c index 5e6049226b77..17aeba7cbd14 100644 --- a/tools/testing/vsock/vsock_diag_test.c +++ b/tools/testing/vsock/vsock_diag_test.c @@ -39,6 +39,8 @@ static const char

Re: [PATCH net-next v2] vsock/test: add '--peer-port' input argument

2024-01-23 Thread Stefano Garzarella
will be '1234' - thus we preserve previous behaviour. Signed-off-by: Arseniy Krasnov --- Changelog: v1 -> v2: * Reword usage message. * Add commas after last field in 'opts' declaration. * 'RFC' -> 'net-next'. Thanks for the changes, LGTM! Reviewed-by: Stefano Garzarella tools/t

Re: Re: [PATCH V1] vdpa_sim: reset must not run

2024-01-22 Thread Stefano Garzarella
On Mon, Jan 22, 2024 at 11:47:22AM +0100, Eugenio Perez Martin wrote: On Mon, Jan 22, 2024 at 11:22 AM Stefano Garzarella wrote: On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote: >vdpasim_do_reset sets running to true, which is wrong, as it allows >vdpasim_kick_vq to pos

Re: [PATCH V1] vdpa_sim: reset must not run

2024-01-22 Thread Stefano Garzarella
On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote: vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK is set. Fixes:

Re: [RFC PATCH v1] vsock/test: add '--peer-port' input argument

2024-01-15 Thread Stefano Garzarella
Hi Arseniy, thanks for this patch! On Sat, Jan 13, 2024 at 12:21:10AM +0300, Arseniy Krasnov wrote: Implement port for given CID as input argument instead of using hardcoded value '1234'. This allows to run different test instances on a single CID. Port argument is not required parameter and if

Re: [PATCH net-next v3 1/3] vsock/virtio: use skb_frag_*() helpers

2024-01-02 Thread Stefano Garzarella
-off-by: Mina Almasry --- v2: - Also fix skb_frag_off() + skb_frag_size() (David) - Did not apply the reviewed-by from Stefano since the patch changed relatively much. Sorry for the delay, I was off. LGTM! Acked-by: Stefano Garzarella Possibly we can also send this patch alone if the series

Re: [PATCH net-next v9 2/4] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-14 Thread Stefano Garzarella
sender to send more data. Otherwise mutual hungup for tx/rx is possible: sender waits for free space and receiver is waiting data in 'poll()'. Fixes: b89d882dc9fc ("vsock/virtio: reduce credit update messages") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by:

Re: [PATCH net-next v9 0/4] send credit update during setting SO_RCVLOWAT

2023-12-14 Thread Stefano Garzarella
r option a. BTW that forces us to backport more patches on stable branches, so I'm fine with option b as well. That said: Nacked-by: Stefano Garzarella

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-14 Thread Stefano Garzarella
On Wed, Dec 13, 2023 at 08:11:57PM +0300, Arseniy Krasnov wrote: On 13.12.2023 18:13, Michael S. Tsirkin wrote: On Wed, Dec 13, 2023 at 10:05:44AM -0500, Michael S. Tsirkin wrote: On Wed, Dec 13, 2023 at 12:08:27PM +0300, Arseniy Krasnov wrote: On 13.12.2023 11:43, Stefano Garzarella

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-13 Thread Stefano Garzarella
On Wed, Dec 13, 2023 at 12:08:27PM +0300, Arseniy Krasnov wrote: On 13.12.2023 11:43, Stefano Garzarella wrote: On Tue, Dec 12, 2023 at 08:43:07PM +0300, Arseniy Krasnov wrote: On 12.12.2023 19:12, Michael S. Tsirkin wrote: On Tue, Dec 12, 2023 at 06:59:03PM +0300, Arseniy Krasnov wrote

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-13 Thread Stefano Garzarella
On Tue, Dec 12, 2023 at 08:43:07PM +0300, Arseniy Krasnov wrote: On 12.12.2023 19:12, Michael S. Tsirkin wrote: On Tue, Dec 12, 2023 at 06:59:03PM +0300, Arseniy Krasnov wrote: On 12.12.2023 18:54, Michael S. Tsirkin wrote: On Tue, Dec 12, 2023 at 12:16:54AM +0300, Arseniy Krasnov wrote:

Re: [PATCH net-next v8 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-12 Thread Stefano Garzarella
| 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 e137d740804e..8572f94bba88 100644 --- a/net/vmw_vsock/virtio_transport_co

Re: [PATCH v2] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

2023-12-11 Thread Stefano Garzarella
;) Signed-off-by: Nikolay Kuratov --- V1 -> V2: Added Fixes section Please, next time carry also R-b tags. net/vmw_vsock/virtio_transport_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella Thanks, Stefano diff --git a/net/vmw_vsock/virtio_tr

Re: [PATCH] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

2023-12-11 Thread Stefano Garzarella
So yes, we need to fix it! Thanks! Reviewed-by: Stefano Garzarella if (bytes < 0) bytes = 0; -- 2.34.1

Re: [PATCH net-next v7 2/4] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-11 Thread Stefano Garzarella
changed, 34 insertions(+) Reviewed-by: Stefano Garzarella diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index f75731396b7e..ec20ecff85c7 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -449,6 +449,7 @@ static struct virtio_transport vho

Re: [PATCH net-next v7 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-11 Thread Stefano Garzarella
On Thu, Dec 07, 2023 at 01:50:05AM +0300, Arseniy Krasnov wrote: On 07.12.2023 01:08, Michael S. Tsirkin wrote: On Thu, Dec 07, 2023 at 12:52:51AM +0300, Arseniy Krasnov wrote: On 07.12.2023 00:53, Michael S. Tsirkin wrote: On Thu, Dec 07, 2023 at 12:18:48AM +0300, Arseniy Krasnov wrote:

[PATCH net] vsock/virtio: fix "comparison of distinct pointer types lacks a cast" warning

2023-12-06 Thread Stefano Garzarella
581512a6dc93 ("vsock/virtio: MSG_ZEROCOPY flag support") Cc: avkras...@salutedevices.com Signed-off-by: Stefano Garzarella --- net/vmw_vsock/virtio_transport_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_

Re: [PATCH net-next v6 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-05 Thread Stefano Garzarella
On Tue, Dec 05, 2023 at 03:07:47PM +0300, Arseniy Krasnov wrote: On 05.12.2023 13:54, Stefano Garzarella wrote: On Tue, Dec 05, 2023 at 09:48:05AM +0300, Arseniy Krasnov wrote: Add one more condition for sending credit update during dequeue from stream socket: when number of bytes in the rx

Re: [PATCH net-next v6 4/4] vsock/test: two tests to check credit update logic

2023-12-05 Thread Stefano Garzarella
se 'recv_buf(MSG_DONTWAIT)' instead of 'recv(MSG_DONTWAIT)'. v5 -> v6: * Add second test which checks, that credit update is sent during reading data from socket. * Update commit message. tools/testing/vsock/vsock_test.c | 175 +++ 1 file changed, 175 insertions(+) Revie

Re: [PATCH net-next v6 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-05 Thread Stefano Garzarella
On Tue, Dec 05, 2023 at 09:48:05AM +0300, Arseniy Krasnov wrote: Add one more condition for sending credit update during dequeue from stream socket: when number of bytes in the rx queue is smaller than SO_RCVLOWAT value of the socket. This is actual for non-default value of SO_RCVLOWAT (e.g. not

Re: [PATCH net-next v5 2/3] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-04 Thread Stefano Garzarella
On Sat, Dec 02, 2023 at 03:22:39PM -0500, Michael S. Tsirkin wrote: On Fri, Dec 01, 2023 at 01:40:41PM +0300, Arseniy Krasnov wrote: On 01.12.2023 12:48, Stefano Garzarella wrote: > On Fri, Dec 01, 2023 at 11:35:56AM +0300, Arseniy Krasnov wrote: >> >> >> On 01.1

Re: [PATCH net-next v5 2/3] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-01 Thread Stefano Garzarella
On Fri, Dec 01, 2023 at 11:35:56AM +0300, Arseniy Krasnov wrote: On 01.12.2023 11:27, Stefano Garzarella wrote: On Thu, Nov 30, 2023 at 12:40:43PM -0500, Michael S. Tsirkin wrote: On Thu, Nov 30, 2023 at 03:11:19PM +0100, Stefano Garzarella wrote: On Thu, Nov 30, 2023 at 08:58:58AM -0500

Re: [PATCH net-next v5 2/3] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-01 Thread Stefano Garzarella
On Thu, Nov 30, 2023 at 12:40:43PM -0500, Michael S. Tsirkin wrote: On Thu, Nov 30, 2023 at 03:11:19PM +0100, Stefano Garzarella wrote: On Thu, Nov 30, 2023 at 08:58:58AM -0500, Michael S. Tsirkin wrote: > On Thu, Nov 30, 2023 at 04:43:34PM +0300, Arseniy Krasnov wr

Re: [PATCH net-next v5 3/3] vsock/test: SO_RCVLOWAT + deferred credit update test

2023-11-30 Thread Stefano Garzarella
On Thu, Nov 30, 2023 at 04:08:40PM +0300, Arseniy Krasnov wrote: Test which checks, that updating SO_RCVLOWAT value also sends credit update message. Otherwise mutual hungup may happen when receiver didn't send credit update and then calls 'poll()' with non default SO_RCVLOWAT value (e.g.

Re: [PATCH net-next v5 2/3] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-11-30 Thread Stefano Garzarella
_rcvlowat = virtio_transport_notify_set_rcvlowat As we discussed in chat, better the order of the previous version, but leaving the line of `.read_skb` untouched (with the final comma). With that fixed in all transports, feel free to add: Reviewed-by: Stefano Garzarella },

Re: [RFC PATCH v4 3/3] vsock/test: SO_RCVLOWAT + deferred credit update test

2023-11-30 Thread Stefano Garzarella
On Thu, Nov 30, 2023 at 12:25:19AM +0300, Arseniy Krasnov wrote: Test which checks, that updating SO_RCVLOWAT value also sends credit update message. Otherwise mutual hungup may happen when receiver didn't send credit update and then calls 'poll()' with non default SO_RCVLOWAT value (e.g.

Re: [RFC PATCH v4 2/3] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-11-30 Thread Stefano Garzarella
On Thu, Nov 30, 2023 at 12:25:18AM +0300, Arseniy Krasnov wrote: Send credit update message when SO_RCVLOWAT is updated and it is bigger than number of bytes in rx queue. It is needed, because 'poll()' will wait until number of bytes in rx queue will be not smaller than SO_RCVLOWAT, so kick

Re: [RFC PATCH v3 3/3] vsock/test: SO_RCVLOWAT + deferred credit update test

2023-11-29 Thread Stefano Garzarella
On Wed, Nov 29, 2023 at 12:16:54PM +0300, Arseniy Krasnov wrote: On 29.11.2023 12:16, Stefano Garzarella wrote: On Wed, Nov 22, 2023 at 09:05:10PM +0300, Arseniy Krasnov wrote: Test which checks, that updating SO_RCVLOWAT value also sends credit update message. Otherwise mutual hungup may

Re: [RFC PATCH v3 3/3] vsock/test: SO_RCVLOWAT + deferred credit update test

2023-11-29 Thread Stefano Garzarella
On Wed, Nov 22, 2023 at 09:05:10PM +0300, Arseniy Krasnov wrote: Test which checks, that updating SO_RCVLOWAT value also sends credit update message. Otherwise mutual hungup may happen when receiver didn't send credit update and then calls 'poll()' with non default SO_RCVLOWAT value (e.g.

Re: [RFC PATCH v3 2/3] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-11-29 Thread Stefano Garzarella
On Wed, Nov 22, 2023 at 09:05:09PM +0300, Arseniy Krasnov wrote: Send credit update message when SO_RCVLOWAT is updated and it is bigger than number of bytes in rx queue. It is needed, because 'poll()' will wait until number of bytes in rx queue will be not smaller than SO_RCVLOWAT, so kick

Re: [PATCH net v1] vsock/test: fix SEQPACKET message bounds test

2023-11-22 Thread Stefano Garzarella
quot;) Signed-off-by: Arseniy Krasnov --- tools/testing/vsock/vsock_test.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) The fix LGTM and it worked on aarch64 machine. Reviewed-by: Stefano Garzarella Thanks for the fast fix! Stefano diff --git a/tools/

Re: [RFC PATCH v1 2/2] vsock/test: SO_RCVLOWAT + deferred credit update test

2023-11-17 Thread Stefano Garzarella
On Fri, Nov 17, 2023 at 10:12:38AM +0300, Arseniy Krasnov wrote: On 15.11.2023 14:11, Stefano Garzarella wrote: On Wed, Nov 08, 2023 at 10:20:04AM +0300, Arseniy Krasnov wrote: This adds test which checks, that updating SO_RCVLOWAT value also sends You can avoid "This adds", and

Re: [RFC PATCH v1 2/2] vsock/test: SO_RCVLOWAT + deferred credit update test

2023-11-15 Thread Stefano Garzarella
On Wed, Nov 08, 2023 at 10:20:04AM +0300, Arseniy Krasnov wrote: This adds test which checks, that updating SO_RCVLOWAT value also sends You can avoid "This adds", and write just "Add test ...". See https://docs.kernel.org/process/submitting-patches.html#describe-your-changes Describe

Re: [RFC PATCH v1 1/2] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-11-15 Thread Stefano Garzarella
On Wed, Nov 08, 2023 at 10:20:03AM +0300, Arseniy Krasnov wrote: This adds sending credit update message when SO_RCVLOWAT is updated and it is bigger than number of bytes in rx queue. It is needed, because 'poll()' will wait until number of bytes in rx queue will be not smaller than SO_RCVLOWAT,

Re: [RFC PATCH v1 0/2] send credit update during setting SO_RCVLOWAT

2023-11-15 Thread Stefano Garzarella
On Wed, Nov 08, 2023 at 10:20:02AM +0300, Arseniy Krasnov wrote: Hello, DESCRIPTION This patchset fixes old problem with hungup of both rx/tx sides and adds test for it. This happens due to non-default SO_RCVLOWAT value and deferred credit update in virtio/vsock.

[PATCH net] vsock/virtio: free queued packets when closing socket

2021-04-20 Thread Stefano Garzarella
ring the socket release") Reported-and-tested-by: syzbot+24452624fc4c571ee...@syzkaller.appspotmail.com Signed-off-by: Stefano Garzarella --- net/vmw_vsock/virtio_transport_common.c | 28 + 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/net/vmw_vsock/virti

Re: [PATCH net] vsock/vmci: log once the failed queue pair allocation

2021-04-19 Thread Stefano Garzarella
On Fri, Apr 16, 2021 at 12:06:18PM +, Jorgen Hansen wrote: On 16 Apr 2021, at 12:44, Stefano Garzarella mailto:sgarz...@redhat.com>> wrote: VMCI feature is not supported in conjunction with the vSphere Fault Tolerance (FT) feature. VMware Tools can repeatedly try to create a

[PATCH net] vsock/vmci: log once the failed queue pair allocation

2021-04-16 Thread Stefano Garzarella
es, print it only once. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Stefano Garzarella --- net/vmw_vsock/vmci_transport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c index 8b6

Re: [PATCH V3 3/3] vDPA/ifcvf: get_config_size should return dev specific config size

2021-04-16 Thread Stefano Garzarella
-by: Stefano Garzarella diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 376b2014916a..3b6f7862dbb8 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -356,7 +356,24 @@ static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev

Re: [PATCH V3 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-16 Thread Stefano Garzarella
insertions(+), 2 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h index 1c04cd256fa7..0111bfdeb342 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.h +++ b/drivers/vdpa/ifcvf/ifcvf_base.h @@ -15,6 +15,7 @@ #include #include

Re: [PATCH V2 3/3] vDPA/ifcvf: get_config_size should return dev specific config size

2021-04-15 Thread Stefano Garzarella
On Thu, Apr 15, 2021 at 05:53:36PM +0800, Zhu Lingshan wrote: get_config_size() should return the size based on the decected device type. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_main.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git

Re: [PATCH V2 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-15 Thread Stefano Garzarella
On Thu, Apr 15, 2021 at 05:53:35PM +0800, Zhu Lingshan wrote: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.h | 8 +++- drivers/vdpa/ifcvf/ifcvf_main.c | 10 +- 2 files changed, 16

Re: [PATCH 3/3] vDPA/ifcvf: get_config_size should return dev specific config size

2021-04-15 Thread Stefano Garzarella
On Wed, Apr 14, 2021 at 05:18:32PM +0800, Zhu Lingshan wrote: get_config_size() should return the size based on the decected device type. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

Re: [RFC] vsock: add multiple transports support for dgram

2021-04-13 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 12:12:50PM +, Jorgen Hansen wrote: On 12 Apr 2021, at 20:53, Jiang Wang . mailto:jiang.w...@bytedance.com>> wrote: On Mon, Apr 12, 2021 at 7:04 AM Stefano Garzarella mailto:sgarz...@redhat.com>> wrote: Hi Jiang, thanks for re-starting the multi-trans

Re: [PATCH][next] vdpa/mlx5: Fix resource leak of mgtdev due to incorrect kfree

2021-04-13 Thread Stefano Garzarella
.25533db01f5f 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -2089,7 +2089,7 @@ static int mlx5v_probe(struct auxiliary_device *adev, return 0; reg_err: - kfree(mdev); + kfree(mgtdev); return err; } -- 2.30.2 Reviewed-by: Stefano Garzarella

Re: [External] Re: [RFC] vsock: add multiple transports support for dgram

2021-04-12 Thread Stefano Garzarella
Hi Jiang, thanks for re-starting the multi-transport support for dgram! On Wed, Apr 07, 2021 at 11:25:36AM -0700, Jiang Wang . wrote: On Wed, Apr 7, 2021 at 2:51 AM Jorgen Hansen wrote: > On 6 Apr 2021, at 20:31, Jiang Wang wrote: > > From: "jiang.wang" > > Currently, only VMCI supports

Re: [PATCH v4 00/14] vdpa: add vdpa simulator for block device

2021-04-12 Thread Stefano Garzarella
Hi Michael, do you think this series is in an acceptable state to be queued for the next merge window? All patches should be already acked by Jason, let me know if I need to change anything. Thanks, Stefano On Mon, Mar 15, 2021 at 05:34:36PM +0100, Stefano Garzarella wrote: v4: - added

Re: memory leak in virtio_transport_send_pkt_info

2021-03-31 Thread Stefano Garzarella
On Wed, Mar 31, 2021 at 10:04:18AM +0100, Stefan Hajnoczi wrote: On Mon, Feb 08, 2021 at 08:39:30AM -0800, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:9f29bd8b Merge tag 'fs_for_v5.11-rc5' of git://git.kernel... git tree: upstream console output:

Re: Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL?

2021-03-25 Thread Stefano Garzarella
On Thu, Mar 25, 2021 at 08:02:45AM -0600, Jens Axboe wrote: On 3/25/21 7:44 AM, Pavel Begunkov wrote: On 25/03/2021 11:33, Stefano Garzarella wrote: Hi Jens, Hi Pavel, I was taking a look at the new SQPOLL handling with io_thread instead of kthread. Great job! Really nice feature that maybe

Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL?

2021-03-25 Thread Stefano Garzarella
Hi Jens, Hi Pavel, I was taking a look at the new SQPOLL handling with io_thread instead of kthread. Great job! Really nice feature that maybe can be reused also in other scenarios (e.g. vhost). Regarding SQPOLL, IIUC these new threads are much closer to user threads, so is there still a

Re: [RFC PATCH v7 00/22] virtio/vsock: introduce SOCK_SEQPACKET support

2021-03-25 Thread Stefano Garzarella
Hi Arseny, On Tue, Mar 23, 2021 at 04:07:13PM +0300, Arseny Krasnov wrote: This patchset implements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees to save record boundaries, so to do it, two new packet operations were added: first for start of

Re: [RFC PATCH v7 18/22] vsock/loopback: setup SEQPACKET ops for transport

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:14:33PM +0300, Arseny Krasnov wrote: This adds SEQPACKET ops for loopback transport and 'seqpacket_allow()' callback. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/vsock_loopback.c | 12 1 file changed, 12 insertions(+) Reviewed-by: Stefano

Re: [RFC PATCH v7 17/22] vhost/vsock: setup SEQPACKET ops for transport

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:14:18PM +0300, Arseny Krasnov wrote: This also removes ignore of non-stream type of packets and adds 'seqpacket_allow()' callback. Signed-off-by: Arseny Krasnov --- drivers/vhost/vsock.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) Same

Re: [RFC PATCH v7 16/22] virtio/vsock: setup SEQPACKET ops for transport

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:14:03PM +0300, Arseny Krasnov wrote: This adds SEQPACKET ops for virtio transport and 'seqpacket_allow()' callback. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/virtio_transport.c | 12 1 file changed, 12 insertions(+) Sorry for not mentioning this

Re: [RFC PATCH v7 15/22] virtio/vsock: SEQPACKET support feature bit

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:13:49PM +0300, Arseny Krasnov wrote: This adds new virtio vsock specific feature bit which means SOCK_SEQPACKET support. Guest negotiates this bit with vhost, thus checking that vhost side supports SEQPACKET. Signed-off-by: Arseny Krasnov ---

Re: [RFC PATCH v7 14/22] virtio/vsock: rest of SOCK_SEQPACKET support

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:13:29PM +0300, Arseny Krasnov wrote: This adds rest of logic for SEQPACKET: 1) SEQPACKET specific functions which send SEQ_BEGIN/SEQ_END. Note that both functions may sleep to wait enough space for SEQPACKET header. 2) SEQ_BEGIN/SEQ_END in TAP packet capture. 3)

Re: [RFC PATCH v7 13/22] virtio/vsock: add SEQPACKET receive logic

2021-03-25 Thread Stefano Garzarella
64 + 1 file changed, 45 insertions(+), 19 deletions(-) Reviewed-by: Stefano Garzarella

Re: [RFC PATCH v7 12/22] virtio/vsock: fetch length for SEQPACKET record

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:12:55PM +0300, Arseny Krasnov wrote: This adds transport callback which tries to fetch record begin marker from socket's rx queue. It is called from af_vsock.c before reading data packets of record. Signed-off-by: Arseny Krasnov --- v6 -> v7: 1) Now

Re: [RFC PATCH v7 11/22] virtio/vsock: dequeue callback for SOCK_SEQPACKET

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:12:41PM +0300, Arseny Krasnov wrote: This adds transport callback and it's logic for SEQPACKET dequeue. Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender,

Re: [RFC PATCH v7 06/22] af_vsock: implement send logic for SEQPACKET

2021-03-25 Thread Stefano Garzarella
17 insertions(+), 6 deletions(-) Reviewed-by: Stefano Garzarella

Re: [RFC PATCH v7 05/22] af_vsock: separate wait space loop

2021-03-25 Thread Stefano Garzarella
deletions(-) I had already reviewed this one as well and it doesn't seem to have changed :-) Reviewed-by: Stefano Garzarella diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index 74ac8a4c4168..7232f6c42a36 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h

Re: [RFC PATCH v7 04/22] af_vsock: implement SEQPACKET receive loop

2021-03-25 Thread Stefano Garzarella
On Tue, Mar 23, 2021 at 04:10:03PM +0300, Arseny Krasnov wrote: This adds receive loop for SEQPACKET. It looks like receive loop for STREAM, but there is a little bit difference: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because there

Re: [RFC PATCH v7 03/22] af_vsock: separate receive data loop

2021-03-25 Thread Stefano Garzarella
is no longer happy. But this doesn't seem to be the case. So please keep the tags between versions :-) Reviewed-by: Stefano Garzarella diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 421c0303b26f..0bc661e54262 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock

Re: [PATCH] vhost: Fix vhost_vq_reset()

2021-03-17 Thread Stefano Garzarella
viewed-by: Stefano Garzarella

Re: [RFC PATCH v6 00/22] virtio/vsock: introduce SOCK_SEQPACKET support

2021-03-16 Thread Stefano Garzarella
On Tue, Mar 16, 2021 at 06:37:31AM +0300, Arseny Krasnov wrote: On 15.03.2021 18:22, Arseny Krasnov wrote: On 15.03.2021 14:40, Stefano Garzarella wrote: Hi Arseny, On Sun, Mar 07, 2021 at 08:57:19PM +0300, Arseny Krasnov wrote: This patchset implements support of SOCK_SEQPACKET

Re: [PATCH v4 06/14] vringh: add vringh_kiov_length() helper

2021-03-15 Thread Stefano Garzarella
On Mon, Mar 15, 2021 at 05:51:30PM +0100, Laurent Vivier wrote: On 15/03/2021 17:34, Stefano Garzarella wrote: This new helper returns the total number of bytes covered by a vringh_kiov. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- include/linux

[PATCH v4 14/14] vdpa_sim_blk: add support for vdpa management tool

2021-03-15 Thread Stefano Garzarella
"vendor_id": 0, "max_vqs": 1, "max_vq_size": 256 } } } # Delete the vDPA device after its use $ vdpa dev del blk0 Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_s

[PATCH v4 13/14] vdpa_sim_blk: handle VIRTIO_BLK_T_GET_ID

2021-03-15 Thread Stefano Garzarella
Handle VIRTIO_BLK_T_GET_ID request, always answering the "vdpa_blk_sim" string. Acked-by: Jason Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v2: - made 'vdpasim_blk_id' static [Jason] --- drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 15 +++ 1 file c

[PATCH v4 12/14] vdpa_sim_blk: implement ramdisk behaviour

2021-03-15 Thread Stefano Garzarella
The previous implementation wrote only the status of each request. This patch implements a more accurate block device simulator, providing a ramdisk-like behavior and adding input validation. Acked-by: Jason Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v2: - used %zd

[PATCH v4 11/14] vdpa: add vdpa simulator for block device

2021-03-15 Thread Stefano Garzarella
commits. Signed-off-by: Max Gurtovoy [sgarzare: various cleanups/fixes] Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- v4: - include linux/blkdev.h to fix a build issue - fix vdpa_register_device() passing the new 'nvqs' params v3: - updated Mellanox copyright to NVIDIA [Max

[PATCH v4 09/14] vhost/vdpa: use get_config_size callback in vhost_vdpa_config_validate()

2021-03-15 Thread Stefano Garzarella
Let's use the new 'get_config_size()' callback available instead of using the 'virtio_id' to get the size of the device config space. Signed-off-by: Stefano Garzarella --- drivers/vhost/vdpa.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/vdpa.c b

[PATCH v4 10/14] vhost/vdpa: Remove the restriction that only supports virtio-net devices

2021-03-15 Thread Stefano Garzarella
-by: Stefano Garzarella --- drivers/vhost/vdpa.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 7ae4080e57d8..850ed4b62942 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -16,12 +16,12 @@ #include #include

[PATCH v4 08/14] vdpa: add get_config_size callback in vdpa_config_ops

2021-03-15 Thread Stefano Garzarella
This new callback is used to get the size of the configuration space of vDPA devices. Signed-off-by: Stefano Garzarella --- include/linux/vdpa.h | 4 drivers/vdpa/ifcvf/ifcvf_main.c | 6 ++ drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 ++ drivers/vdpa/vdpa_sim/vdpa_sim.c

[PATCH v4 06/14] vringh: add vringh_kiov_length() helper

2021-03-15 Thread Stefano Garzarella
This new helper returns the total number of bytes covered by a vringh_kiov. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- include/linux/vringh.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/vringh.h b/include/linux

[PATCH v4 07/14] vdpa_sim: cleanup kiovs in vdpasim_free()

2021-03-15 Thread Stefano Garzarella
a request, but we should call it when we free the entire device. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index

[PATCH v4 05/14] vringh: implement vringh_kiov_advance()

2021-03-15 Thread Stefano Garzarella
In some cases, it may be useful to provide a way to skip a number of bytes in a vringh_kiov. Let's implement vringh_kiov_advance() for this purpose, reusing the code from vringh_iov_xfer(). We replace that code calling the new vringh_kiov_advance(). Acked-by: Jason Wang Signed-off-by: Stefano

[PATCH v4 03/14] vringh: reset kiov 'consumed' field in __vringh_iov()

2021-03-15 Thread Stefano Garzarella
__vringh_iov() overwrites the contents of riov and wiov, in fact it resets the 'i' and 'used' fields, but also the 'consumed' field should be reset to avoid an inconsistent state. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vhost/vringh.c | 4 ++-- 1 file changed, 2

[PATCH v4 04/14] vringh: explain more about cleaning riov and wiov

2021-03-15 Thread Stefano Garzarella
riov and wiov can be reused with subsequent calls of vringh_getdesc_*(). Let's add a paragraph in the documentation of these functions to better explain when riov and wiov need to be cleaned up. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vhost/vringh.c | 15

[PATCH v4 02/14] vringh: add 'iotlb_lock' to synchronize iotlb accesses

2021-03-15 Thread Stefano Garzarella
-by: Stefano Garzarella --- include/linux/vringh.h | 6 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- drivers/vhost/vringh.c | 9 - 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 59bd50f99291

[PATCH v4 00/14] vdpa: add vdpa simulator for block device

2021-03-15 Thread Stefano Garzarella
nfig_size() callback to allow any device in vhost-vdpa. The series also includes small fixes for vringh, vdpa, and vdpa_sim that I discovered while implementing and testing the block simulator. Thanks for your feedback, Stefano Max Gurtovoy (1): vdpa: add vdpa simulator for block device St

[PATCH v4 01/14] vdpa_sim: use iova module to allocate IOVA addresses

2021-03-15 Thread Stefano Garzarella
, vdpasim_map_range() and vdpasim_unmap_range(), to handle the IOVA allocation and the registration into the IOMMU/IOTLB. These functions are used by dma_map_ops callbacks. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- v2: - used ULONG_MAX instead of ~0UL [Jason] - fixed typos in comment

Re: [RFC PATCH v6 00/22] virtio/vsock: introduce SOCK_SEQPACKET support

2021-03-15 Thread Stefano Garzarella
Hi Arseny, On Sun, Mar 07, 2021 at 08:57:19PM +0300, Arseny Krasnov wrote: This patchset implements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees to save record boundaries, so to do it, two new packet operations were added: first for start of

Re: [RFC PATCH v6 17/22] virtio/vsock: SEQPACKET feature bit support

2021-03-15 Thread Stefano Garzarella
On Sun, Mar 07, 2021 at 09:04:01PM +0300, Arseny Krasnov wrote: This adds handling of SEQPACKET bit: guest tries to negotiate it with vhost. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/virtio_transport.c | 5 + 1 file changed, 5 insertions(+) Also for this patch I think is better to

Re: [RFC PATCH v6 16/22] vhost/vsock: SEQPACKET feature bit support

2021-03-15 Thread Stefano Garzarella
On Sun, Mar 07, 2021 at 09:03:41PM +0300, Arseny Krasnov wrote: This adds handling of SEQPACKET bit: if guest sets features with this bit cleared, then SOCK_SEQPACKET support will be disabled. Signed-off-by: Arseny Krasnov --- drivers/vhost/vsock.c | 6 +- 1 file changed, 5 insertions(+), 1

Re: [RFC PATCH v6 14/22] virtio/vsock: rest of SOCK_SEQPACKET support

2021-03-15 Thread Stefano Garzarella
On Sun, Mar 07, 2021 at 09:03:09PM +0300, Arseny Krasnov wrote: This adds rest of logic for SEQPACKET: 1) SEQPACKET specific functions which send SEQ_BEGIN/SEQ_END. Note that both functions may sleep to wait enough space for SEQPACKET header. 2) SEQ_BEGIN/SEQ_END in TAP packet capture. 3)

Re: [RFC PATCH v6 13/22] virtio/vsock: add SEQPACKET receive logic

2021-03-15 Thread Stefano Garzarella
On Sun, Mar 07, 2021 at 09:02:50PM +0300, Arseny Krasnov wrote: This modifies current receive logic for SEQPACKET support: 1) Inserts 'SEQ_BEGIN' packet to socket's rx queue. 2) Inserts 'RW' packet to socket's rx queue, but without merging with buffer of last packet in queue. 3) Performs check

Re: [RFC PATCH v6 11/22] virtio/vsock: dequeue callback for SOCK_SEQPACKET

2021-03-15 Thread Stefano Garzarella
On Sun, Mar 07, 2021 at 09:02:01PM +0300, Arseny Krasnov wrote: This adds transport callback and it's logic for SEQPACKET dequeue. Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender,

Re: [RFC PATCH v6 10/22] virtio/vsock: simplify credit update function API

2021-03-12 Thread Stefano Garzarella
On Sun, Mar 07, 2021 at 09:01:44PM +0300, Arseny Krasnov wrote: This function is static and 'hdr' arg was always NULL. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/virtio_transport_common.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Stefano Garzarella

Re: [RFC PATCH v6 09/22] virtio/vsock: set packet's type in virtio_transport_send_pkt_info()

2021-03-12 Thread Stefano Garzarella
, set it directly in 'virtio_transport_send_ pkt_info()', so callers don't need to set it. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/virtio_transport_common.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) Reviewed-by: Stefano Garzarella

  1   2   3   4   5   6   7   >