[Qemu-devel] [PATCH v7 17/23] hw/pvrdma: Fill error code in command's response

2018-12-17 Thread Yuval Shaia
Driver checks error code let's set it. In addition, for code simplification purposes, set response's fields ack, response and err outside of the scope of command handlers. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_c

[Qemu-devel] [PATCH v7 19/23] vl: Introduce shutdown_notifiers

2018-12-17 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia Reviewed-by: Cornelia Huck --- include/sysemu/sysemu.h | 1 + vl.c

[Qemu-devel] [PATCH v7 21/23] hw/rdma: Do not use bitmap_zero_extend to free bitmap

2018-12-17 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index

Re: [Qemu-devel] [PATCH v7 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-12-17 Thread Yuval Shaia
On Mon, Dec 17, 2018 at 10:02:19AM -0600, Eric Blake wrote: > On 12/17/18 2:10 AM, Yuval Shaia wrote: > > The control over the RDMA device's GID table is done by updating the > > device's Ethernet function addresses. > > Usually the first GID entry is determined

Re: [Qemu-devel] [PATCH v7 10/23] qapi: Define new QMP message for pvrdma

2018-12-17 Thread Yuval Shaia
On Mon, Dec 17, 2018 at 10:00:32AM -0600, Eric Blake wrote: > On 12/17/18 2:10 AM, Yuval Shaia wrote: > > pvrdma requires that the same GID attached to it will be attached to the > > backend device in the host. > > > > A new QMP messages is defined so pvrdma devi

[Qemu-devel] [PATCH v8 00/23] Add support for RDMA MAD

2018-12-17 Thread Yuval Shaia
0. v6 -> v7: * Fix formating (checkpatch) in patch #17. * Undo wrong setting done in patch #17 (found after testing with Prasad's patchset). * Add Marcel's r-b for patches #11 and #17. v7 -> v8: * Accept Eric's comments for patch 10 and 11 Thanks, Yuval

[Qemu-devel] [PATCH v8 02/23] hw/rdma: Add ability to force notification without re-arm

2018-12-17 Thread Yuval Shaia
ds to be notified anyway, it even do not need to re-arm the notification bit. Enhance the notification field to support this. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 12 ++-- hw/rdma/rdma_rm_defs.h | 8 +++- hw/rdm

[Qemu-devel] [PATCH v8 04/23] hw/rdma: Abort send-op if fail to create addr handler

2018-12-17 Thread Yuval Shaia
Function create_ah might return NULL, let's exit with an error. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index d7a4bbd91f..1e148398a2 100644

[Qemu-devel] [PATCH v8 01/23] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-12-17 Thread Yuval Shaia
ssage arrived (umad_recv()) the server, depending on the message type (attr_id) looks for target client by either searching in gid->fd table or in local_comm_id->fd table. With the extracted fd the server relays to incoming message to the client. Signed-off-by: Yuval Shaia Reviewed-by: Shamir

[Qemu-devel] [PATCH v8 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-12-17 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c

[Qemu-devel] [PATCH v8 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-12-17 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 86e8fe8ab6..3ccc9a2494 100644 --- a/hw/rdma

[Qemu-devel] [PATCH v8 07/23] hw/pvrdma: Make default pkey 0xFFFF

2018-12-17 Thread Yuval Shaia
Commit 6e7dba23af ("hw/pvrdma: Make default pkey 0x") exports default pkey as external definition but omit the change from 0x7FFF to 0x. Fixes: 6e7dba23af ("hw/pvrdma: Make default pkey 0x") Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/r

[Qemu-devel] [PATCH v8 06/23] hw/pvrdma: Make function reset_device return void

2018-12-17 Thread Yuval Shaia
This function cannot fail - fix it to return void Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 6c8c0154fa..fc2abd34af

[Qemu-devel] [PATCH v8 14/23] hw/rdma: Initialize node_guid from vmxnet3 mac address

2018-12-17 Thread Yuval Shaia
node_guid should be set once device is load. Make node_guid be GID format (32 bit) of PCI function 0 vmxnet3 device's MAC. A new function was added to do the conversion. So for example the MAC 56:b6:44:e9:62:dc will be converted to GID 54b6:44ff:fee9:62dc. Signed-off-by: Yuval Shaia Review

[Qemu-devel] [PATCH v8 08/23] hw/pvrdma: Set the correct opcode for recv completion

2018-12-17 Thread Yuval Shaia
The function pvrdma_post_cqe populates CQE entry with opcode from the given completion element. For receive operation value was not set. Fix it by setting it to IBV_WC_RECV. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 3 ++- 1 file changed, 2

[Qemu-devel] [PATCH v8 05/23] hw/rdma: Add support for MAD packets

2018-12-17 Thread Yuval Shaia
n Volume 1 Architecture Specification, Release 1.1 available here: https://www.infinibandta.org/ibta-specifications-download/ To support MAD packets the device uses an external utility (contrib/rdmacm-mux) to relay packets from and to the guest driver. Signed-off-by: Yuval Shaia Reviewed-

[Qemu-devel] [PATCH v8 13/23] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-12-17 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a

[Qemu-devel] [PATCH v8 10/23] qapi: Define new QMP message for pvrdma

2018-12-17 Thread Yuval Shaia
. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Acked-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile.objs | 3 ++- qapi/qapi-schema.json | 1 + qapi/rdma.json| 38 ++ 4 files changed, 42 insertions(+), 1 deletion

[Qemu-devel] [PATCH v8 12/23] vmxnet3: Move some definitions to header file

2018-12-17 Thread Yuval Shaia
x27;s MAC address. To be able to access vmxnet3 device the definition of VMXNET3State is moved to a new header file. Signed-off-by: Yuval Shaia Reviewed-by: Dmitry Fleytman --- hw/net/vmxnet3.c | 116 +--- hw/net/vmxnet3_defs.h

[Qemu-devel] [PATCH v8 16/23] hw/pvrdma: Fill all CQE fields

2018-12-17 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31

[Qemu-devel] [PATCH v8 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-12-17 Thread Yuval Shaia
Ethernet device. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 344 +--- hw/rdma/rdma_backend.h | 22 +-- hw/rdma/rdma_backend_defs.h | 11 +- hw/rdma/rdma_rm.c | 104 ++- hw/rdma/rdma_rm.h

[Qemu-devel] [PATCH v8 17/23] hw/pvrdma: Fill error code in command's response

2018-12-17 Thread Yuval Shaia
Driver checks error code let's set it. In addition, for code simplification purposes, set response's fields ack, response and err outside of the scope of command handlers. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_c

[Qemu-devel] [PATCH v8 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-12-17 Thread Yuval Shaia
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insert

[Qemu-devel] [PATCH v8 19/23] vl: Introduce shutdown_notifiers

2018-12-17 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia Reviewed-by: Cornelia Huck --- include/sysemu/sysemu.h | 1 + vl.c

[Qemu-devel] [PATCH v8 23/23] docs: Update pvrdma device documentation

2018-12-17 Thread Yuval Shaia
Interface with the device is changed with the addition of support for MAD packets. Adjust documentation accordingly. While there fix a minor mistake which may lead to think that there is a relation between using RXE on host and the compatibility with bare-metal peers. Signed-off-by: Yuval Shaia

[Qemu-devel] [PATCH v8 21/23] hw/rdma: Do not use bitmap_zero_extend to free bitmap

2018-12-17 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index

[Qemu-devel] [PATCH v8 18/23] hw/rdma: Remove unneeded code that handles more that one port

2018-12-17 Thread Yuval Shaia
Device supports only one port, let's remove a dead code that handles more than one port. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3

[Qemu-devel] [PATCH v8 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-12-17 Thread Yuval Shaia
In order to clean some external resources such as GIDs, QPs etc, register to receive notification when VM is shutdown. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 15 +++ 2 files changed, 17 insertions

[Qemu-devel] [PATCH v8 22/23] hw/rdma: Do not call rdma_backend_del_gid on an empty gid

2018-12-17 Thread Yuval Shaia
When device goes down the function fini_ports loops over all entries in gid table regardless of the fact whether entry is valid or not. In case that entry is not valid we'd like to skip from any further processing in backend device. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfe

Re: [Qemu-devel] [PATCH v2 3/6] pvrdma: check number of pages when creating rings

2018-12-17 Thread Yuval Shaia
On Tue, Dec 18, 2018 at 12:17:59AM +0530, P J P wrote: > Hello Yuval, > > +-- On Sun, 16 Dec 2018, Yuval Shaia wrote --+ > | With this patch the last step fails, the guest OS hangs, trying to probably > | unload pvrdma driver and finally gave up after 3 minutes. > > Stran

[Qemu-devel] [PATCH v9 01/23] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-12-21 Thread Yuval Shaia
ssage arrived (umad_recv()) the server, depending on the message type (attr_id) looks for target client by either searching in gid->fd table or in local_comm_id->fd table. With the extracted fd the server relays to incoming message to the client. Signed-off-by: Yuval Shaia Reviewed

[Qemu-devel] [PATCH v9 00/23] Add support for RDMA MAD

2018-12-21 Thread Yuval Shaia
P shutdown message in commit ecd7a0d5bbf ("qmp: Add reason to SHUTDOWN and RESET events"). * s/---/ in patch #1 Thanks, Yuval Yuval Shaia (23): contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer hw/rdma: Add ability to force notification without

[Qemu-devel] [PATCH v9 02/23] hw/rdma: Add ability to force notification without re-arm

2018-12-21 Thread Yuval Shaia
ds to be notified anyway, it even do not need to re-arm the notification bit. Enhance the notification field to support this. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 12 ++-- hw/rdma/rdma_rm_defs.h | 8 +++- hw/rdm

[Qemu-devel] [PATCH v9 07/23] hw/pvrdma: Make default pkey 0xFFFF

2018-12-21 Thread Yuval Shaia
Commit 6e7dba23af ("hw/pvrdma: Make default pkey 0x") exports default pkey as external definition but omit the change from 0x7FFF to 0x. Fixes: 6e7dba23af ("hw/pvrdma: Make default pkey 0x") Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/r

[Qemu-devel] [PATCH v9 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-12-21 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 86e8fe8ab6..3ccc9a2494 100644 --- a/hw/rdma

[Qemu-devel] [PATCH v9 06/23] hw/pvrdma: Make function reset_device return void

2018-12-21 Thread Yuval Shaia
This function cannot fail - fix it to return void Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 6c8c0154fa..fc2abd34af

[Qemu-devel] [PATCH v9 16/23] hw/pvrdma: Fill all CQE fields

2018-12-21 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31

[Qemu-devel] [PATCH v9 10/23] qapi: Define new QMP message for pvrdma

2018-12-21 Thread Yuval Shaia
. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Acked-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile.objs | 3 ++- qapi/qapi-schema.json | 1 + qapi/rdma.json| 38 ++ 4 files changed, 42 insertions(+), 1 deletion

[Qemu-devel] [PATCH v9 08/23] hw/pvrdma: Set the correct opcode for recv completion

2018-12-21 Thread Yuval Shaia
The function pvrdma_post_cqe populates CQE entry with opcode from the given completion element. For receive operation value was not set. Fix it by setting it to IBV_WC_RECV. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 3 ++- 1 file changed, 2

[Qemu-devel] [PATCH v9 04/23] hw/rdma: Abort send-op if fail to create addr handler

2018-12-21 Thread Yuval Shaia
Function create_ah might return NULL, let's exit with an error. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index d7a4bbd91f..1e148398a2 100644

[Qemu-devel] [PATCH v9 13/23] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-12-21 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a

[Qemu-devel] [PATCH v9 18/23] hw/rdma: Remove unneeded code that handles more that one port

2018-12-21 Thread Yuval Shaia
Device supports only one port, let's remove a dead code that handles more than one port. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3

[Qemu-devel] [PATCH v9 05/23] hw/rdma: Add support for MAD packets

2018-12-21 Thread Yuval Shaia
n Volume 1 Architecture Specification, Release 1.1 available here: https://www.infinibandta.org/ibta-specifications-download/ To support MAD packets the device uses an external utility (contrib/rdmacm-mux) to relay packets from and to the guest driver. Signed-off-by: Yuval Shaia Reviewed-

[Qemu-devel] [PATCH v9 12/23] vmxnet3: Move some definitions to header file

2018-12-21 Thread Yuval Shaia
x27;s MAC address. To be able to access vmxnet3 device the definition of VMXNET3State is moved to a new header file. Signed-off-by: Yuval Shaia Reviewed-by: Dmitry Fleytman --- hw/net/vmxnet3.c | 116 +--- hw/net/vmxnet3_defs.h

[Qemu-devel] [PATCH v9 17/23] hw/pvrdma: Fill error code in command's response

2018-12-21 Thread Yuval Shaia
Driver checks error code let's set it. In addition, for code simplification purposes, set response's fields ack, response and err outside of the scope of command handlers. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_c

[Qemu-devel] [PATCH v9 19/23] vl: Introduce shutdown_notifiers

2018-12-21 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia Reviewed-by: Cornelia Huck --- include/sysemu/sysemu.h | 1 + vl.c

[Qemu-devel] [PATCH v9 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-12-21 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c

[Qemu-devel] [PATCH v9 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-12-21 Thread Yuval Shaia
Ethernet device. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 344 +--- hw/rdma/rdma_backend.h | 22 +-- hw/rdma/rdma_backend_defs.h | 11 +- hw/rdma/rdma_rm.c | 104 ++- hw/rdma/rdma_rm.h

[Qemu-devel] [PATCH v9 23/23] docs: Update pvrdma device documentation

2018-12-21 Thread Yuval Shaia
Interface with the device is changed with the addition of support for MAD packets. Adjust documentation accordingly. While there fix a minor mistake which may lead to think that there is a relation between using RXE on host and the compatibility with bare-metal peers. Signed-off-by: Yuval Shaia

[Qemu-devel] [PATCH v9 21/23] hw/rdma: Do not use bitmap_zero_extend to free bitmap

2018-12-21 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index

[Qemu-devel] [PATCH v9 14/23] hw/rdma: Initialize node_guid from vmxnet3 mac address

2018-12-21 Thread Yuval Shaia
node_guid should be set once device is load. Make node_guid be GID format (32 bit) of PCI function 0 vmxnet3 device's MAC. A new function was added to do the conversion. So for example the MAC 56:b6:44:e9:62:dc will be converted to GID 54b6:44ff:fee9:62dc. Signed-off-by: Yuval Shaia Review

[Qemu-devel] [PATCH v9 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-12-21 Thread Yuval Shaia
In order to clean some external resources such as GIDs, QPs etc, register to receive notification when VM is shutdown. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 15 +++ 2 files changed, 17 insertions

[Qemu-devel] [PATCH v9 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-12-21 Thread Yuval Shaia
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insert

[Qemu-devel] [PATCH v9 22/23] hw/rdma: Do not call rdma_backend_del_gid on an empty gid

2018-12-21 Thread Yuval Shaia
When device goes down the function fini_ports loops over all entries in gid table regardless of the fact whether entry is valid or not. In case that entry is not valid we'd like to skip from any further processing in backend device. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfe

Re: [Qemu-devel] [PATCH v8 00/23] Add support for RDMA MAD

2018-12-21 Thread Yuval Shaia
On Fri, Dec 21, 2018 at 03:53:21PM +0200, Marcel Apfelbaum wrote: > > > On 12/17/18 8:45 PM, Yuval Shaia wrote: > > Hi all. > > Hi Yuval, > The series does not apply on master anymore, > can you please rebase it and send ii again? > > Thanks, > Marcel Y

Re: [Qemu-devel] [PATCH] hw/pvrdma: Post CQE when receive invalid gid index

2019-01-13 Thread Yuval Shaia
On Sat, Jan 12, 2019 at 05:11:39PM +0200, Marcel Apfelbaum wrote: > > > On 1/9/19 10:15 PM, Yuval Shaia wrote: > > This error should propagate back to guest. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_backend.h | 1 + > > h

Re: [Qemu-devel] [PATCH 2/3] hw/rdma: modify struct initialization

2019-01-13 Thread Yuval Shaia
x), > (long long unsigned int)be64_to_cpu(gid->global.interface_id)); > @@ -1138,9 +1144,11 @@ int rdma_backend_add_gid(RdmaBackendDev *backend_dev, > const char *ifname, > int rdma_backend_del_gid(RdmaBackendDev *backend_dev, const char *ifname, > union ibv

Re: [Qemu-devel] [PATCH 3/3] contrib/rdmacm-mux: fix clang compilation

2019-01-13 Thread Yuval Shaia
+++ b/contrib/rdmacm-mux/Makefile.objs > @@ -1,4 +1,3 @@ > ifdef CONFIG_PVRDMA > -CFLAGS += -libumad My bad, thanks for doing it the right way. Reviewed-by: Yuval Shaia > rdmacm-mux-obj-y = main.o > endif > -- > 2.17.1 >

Re: [Qemu-devel] [PATCH 2/3] hw/rdma: modify struct initialization

2019-01-13 Thread Yuval Shaia
On Sun, Jan 13, 2019 at 09:24:40PM +0200, Yuval Shaia wrote: > On Sat, Jan 12, 2019 at 05:02:24PM +0200, Marcel Apfelbaum wrote: > > Do not initialize structs with {0} since some > > CLANG versions do not support it. > > > > Use memset instead. > > It

Re: [Qemu-devel] [PATCH 1/3] contrib/rdmacm-mux: remove Wno-format-truncation flag

2019-01-13 Thread Yuval Shaia
his is temporary, final name will build below */ > -strncpy(unix_socket_path, optarg, PATH_MAX); > +strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX); > break; > Reviewed-by: Yuval Shaia > case 'p': > -- > 2.17.1 >

[Qemu-devel] [PATCH] hw/rdma: Verify that ptr is not NULL before freeing

2019-01-14 Thread Yuval Shaia
Make sure objects are not NULL before calling to non-nulll-safe destructors. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 6 -- hw/rdma/rdma_rm.c | 7 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c

Re: [Qemu-devel] [PATCH] hw/rdma: Verify that ptr is not NULL before freeing

2019-01-16 Thread Yuval Shaia
On Mon, Jan 14, 2019 at 04:11:22PM +0100, Philippe Mathieu-Daudé wrote: > Hi Yuval, > > On 1/14/19 3:10 PM, Yuval Shaia wrote: > > Make sure objects are not NULL before calling to non-nulll-safe > > null will fix > > > destructors. > > > > Signed

[Qemu-devel] [PATCH v1] hw/rdma: Verify that ptr is not NULL before freeing

2019-01-16 Thread Yuval Shaia
To cover the case where fini() was called even when init() fails make sure objects are not NULL before calling to non-null-safe destructors. Signed-off-by: Yuval Shaia Reviewed-by: Philippe Mathieu-Daudé --- v0 -> v1: * Fix comment per Philippe's comment * Add Philip

Re: [Qemu-devel] [PATCH] hw/pvrdma: Post CQE when receive invalid gid index

2019-01-18 Thread Yuval Shaia
On Fri, Jan 18, 2019 at 03:55:36PM +0200, Marcel Apfelbaum wrote: > Hi Yuval, > > On 1/9/19 10:15 PM, Yuval Shaia wrote: > > This error should propagate back to guest. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_backend.h | 1

Re: [Qemu-devel] [PATCH] hw: pvrdma: fix memory leak in error path

2019-01-07 Thread Yuval Shaia
On Thu, Jan 03, 2019 at 02:47:37PM +0100, Philippe Mathieu-Daudé wrote: > On 1/3/19 2:03 PM, Li Qiang wrote: > > Spotted by Coverity: CID 1398595 > > > > Fixes: 2b05705dc8 > > > Signed-off-by: Li Qiang > > Reviewed-by: Philippe Mathieu-Daudé > > > --- > > hw/rdma/vmw/pvrdma_qp_ops.c | 2 ++

Re: [Qemu-devel] [PATCH v2] hw: pvrdma: fix memory leak in error path

2019-01-09 Thread Yuval Shaia
+174,14 @@ int pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle) > return -EIO; > } > > +/* Prepare CQE */ > +comp_ctx = g_malloc(sizeof(CompHandlerCtx)); > +comp_ctx->dev = dev; > +comp_ctx->cq_handle = qp->send_cq_handle; > +

[Qemu-devel] [PATCH] hw/pvrdma: Remove max-sge command-line param

2019-01-09 Thread Yuval Shaia
oes not exceeds the backend device capability. This check is done in pvrdma level so check on rdma level is deleted. Signed-off-by: Yuval Shaia --- docs/pvrdma.txt | 1 - hw/rdma/rdma_backend.c | 23 ++- hw/rdma/rdma_backend.h | 11 +++ hw/rdma/vm

[Qemu-devel] [PATCH] hw/pvrdma: Post CQE when receive invalid gid index

2019-01-09 Thread Yuval Shaia
This error should propagate back to guest. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.h | 1 + hw/rdma/vmw/pvrdma_qp_ops.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index a9ba40ae48..5114c90e67 100644

[Qemu-devel] [PATCH] hw/rdma: Delete unused struct member

2019-01-09 Thread Yuval Shaia
This member is used only in init_device_caps function, make it local. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 26 ++ hw/rdma/rdma_backend_defs.h | 1 - 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma

[Qemu-devel] [PATCH] hw/pvrdma: Make function pvrdma_qp_send/recv return void.

2019-01-09 Thread Yuval Shaia
The functions handles errors internaly, callers have nothing to do with the return value. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_qp_ops.c | 14 ++ hw/rdma/vmw/pvrdma_qp_ops.h | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/rdma/vmw

Re: [Qemu-devel] [PATCH 0/2] pvrdma: Extend device state

2018-09-02 Thread Yuval Shaia
On Sun, Sep 02, 2018 at 11:48:11AM +0300, Yuval Shaia wrote: > pvrdma device state is compose of the state of the following: > - rdma backend device > - vmxnet3 device on PCI function 0 > - pvrdma device on PCI function 1 > > This patch-set aim to make it. > > Patch 1:

[Qemu-devel] [PATCH 01/13] hw/rdma: Make distinction between device init and start modes

2018-07-16 Thread Yuval Shaia
n of a CQ completion handler thread. Driver expects such distinction - implement it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 96 +-- hw/rdma/rdma_backend.h | 2 + hw/rdma/rdma_backend_defs.h | 3 +- hw/rdma/vmw/p

[Qemu-devel] [PATCH 02/13] hw/pvrdma: Bugfix - provide the correct attr_mask to query_qp

2018-07-16 Thread Yuval Shaia
Calling rdma_rm_query_qp with attr_mask equals to -1 leads to error where backend query_qp fails to retrieve the needed QP attributes. Fix it by providing the attr_mask we got from driver. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[Qemu-devel] [PATCH 00/13] Misc fixes for pvrdma device

2018-07-16 Thread Yuval Shaia
Hi, Please review some changes i've made for pvrdma device. Thanks, Yuval [Qemu-devel] [PATCH 01/13] hw/rdma: Make distinction between device init and start [Qemu-devel] [PATCH 02/13] hw/pvrdma: Bugfix - provide the correct attr_mask to [Qemu-devel] [PATCH 03/13] hw/rdma: Modify debug macros [Qe

[Qemu-devel] [PATCH 05/13] hw/pvrdma: Make default pkey 0xFFFF

2018-07-16 Thread Yuval Shaia
0x7FFF is not the default pkey - fix it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index e7d6589cdc..bb898265a3 100644 --- a/hw/rdma/vmw/pvrdma_cmd.c +++ b/hw

[Qemu-devel] [PATCH 03/13] hw/rdma: Modify debug macros

2018-07-16 Thread Yuval Shaia
- Add line counter to ease navigation in log - Print rdma instead of pvrdma Signed-off-by: Yuval Shaia --- hw/rdma/rdma_utils.c | 4 hw/rdma/rdma_utils.h | 16 hw/rdma/vmw/pvrdma_main.c | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 08/13] hw/rdma: Reorder resource cleanup

2018-07-16 Thread Yuval Shaia
To be consistence with allocation do the reverse order in deallocation Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index bf4a5c71b4..1f014b4ab2 100644 --- a/hw/rdma/rdma_rm.c +++ b

[Qemu-devel] [PATCH 09/13] hw/pvrdma: Cosmetic change - indent right

2018-07-16 Thread Yuval Shaia
Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 1b1330e113..3d448bffc4 100644 --- a/hw/rdma/vmw/pvrdma_main.c +++ b/hw/rdma/vmw/pvrdma_main.c @@ -430,7

[Qemu-devel] [PATCH 07/13] hw/rdma: Do not allocate memory for non-dma MR

2018-07-16 Thread Yuval Shaia
There is no use in the memory allocated for non-dma MR (one with host_virt equals to NULL). Delete the code that allocates it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 52 +++ 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a

[Qemu-devel] [PATCH 04/13] hw/pvrdma: Clean CQE before use

2018-07-16 Thread Yuval Shaia
Next CQE is fetched from CQ ring, clean it before usage as it still carries old CQE values. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_qp_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 99bb5e..a8664f40c8

[Qemu-devel] [PATCH 13/13] hw/rdma: Save pci dev in backend_dev

2018-07-16 Thread Yuval Shaia
This field is not initialized - fix it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c| 6 +- hw/rdma/rdma_backend.h| 2 +- hw/rdma/vmw/pvrdma_main.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index

[Qemu-devel] [PATCH 11/13] hw/rdma: Print backend QP number in hex format

2018-07-16 Thread Yuval Shaia
To be consistent with other prints throughout the code fix places that print it as decimal number. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 4 ++-- hw/rdma/vmw/pvrdma_qp_ops.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/rdma/rdma_rm.c b/hw

[Qemu-devel] [PATCH 10/13] hw/rdma: Cosmetic change - move to generic function

2018-07-16 Thread Yuval Shaia
To ease maintenance of struct comp_thread move all related code to dedicated function. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index 52981d652d

[Qemu-devel] [PATCH 06/13] hw/rdma: Get rid of unneeded structure

2018-07-16 Thread Yuval Shaia
This structure make no sense - removing it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 3 +-- hw/rdma/rdma_rm.c | 16 hw/rdma/rdma_rm_defs.h | 10 +++--- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma

[Qemu-devel] [PATCH 12/13] hw/rdma: Bugfix: Support non-aligned buffers

2018-07-16 Thread Yuval Shaia
rtual address in mr->virt. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c| 2 ++ hw/rdma/vmw/pvrdma_cmd.c | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index 859c93..8d59a42cd1 100644 --- a/hw/rdma/rdma_rm.c +++ b/hw/rdma/rdma_rm.c @

Re: [Qemu-devel] [PATCH v3 38/41] hw/rdma: Use the BYTE-based definitions

2018-04-21 Thread Yuval Shaia
R_IDX0 > #define RDMA_REG_BAR_IDX 1 > #define RDMA_UAR_BAR_IDX 2 > -#define RDMA_BAR0_MSIX_SIZE (16 * 1024) > +#define RDMA_BAR0_MSIX_SIZE (16 * K_BYTE) > #define RDMA_BAR1_REGS_SIZE 256 > #define RDMA_BAR2_UAR_SIZE (0x1000 * MAX_UCS) /* each uc gets page */ Reviewed-by: Yuval Shaia > > -- > 2.17.0 >

Re: [Qemu-devel] [PATCH] MAINTAINERS: update Marcel Apfelbaum email

2018-04-26 Thread Yuval Shaia
I > M: Michael S. Tsirkin > -M: Marcel Apfelbaum > +M: Marcel Apfelbaum > S: Supported > F: include/hw/pci/* > F: hw/misc/pci-testdev.c > @@ -2075,7 +2075,7 @@ F: docs/block-replication.txt > > PVRDMA > M: Yuval Shaia > -M: Marcel Apfelbaum > +M: Marcel Apfelbaum :( Reviewed-by: Yuval Shaia > S: Maintained > F: hw/rdma/* > F: hw/rdma/vmw/* > -- > 2.13.6 >

Re: [Qemu-devel] [PATCH PULL v2 09/10] hw/rdma: Implementation of PVRDMA device

2018-04-29 Thread Yuval Shaia
On Fri, Apr 27, 2018 at 03:55:16PM +0100, Peter Maydell wrote: > On 19 February 2018 at 11:43, Marcel Apfelbaum wrote: > > From: Yuval Shaia > > > > PVRDMA is the QEMU implementation of VMware's paravirtualized RDMA device. > > It works with its Linux Kernel drive

Re: [Qemu-devel] [PATCH PULL v2 08/10] hw/rdma: PVRDMA commands and data-path ops

2018-04-29 Thread Yuval Shaia
On Fri, Apr 27, 2018 at 09:20:44PM +0300, Marcel Apfelbaum wrote: > Hi Peter, > > On 27/04/2018 17:31, Peter Maydell wrote: > > On 19 February 2018 at 11:43, Marcel Apfelbaum wrote: > >> From: Yuval Shaia > >> > >> First PVRDMA sub-module - implemen

Re: [Qemu-devel] [PATCH PULL v2 09/10] hw/rdma: Implementation of PVRDMA device

2018-04-29 Thread Yuval Shaia
On Fri, Apr 27, 2018 at 10:36:33PM +0300, Marcel Apfelbaum wrote: > On 27/04/2018 17:49, Peter Maydell wrote: > > On 19 February 2018 at 11:43, Marcel Apfelbaum wrote: > >> From: Yuval Shaia > >> > >> PVRDMA is the QEMU implementation of VMware's paravi

Re: [Qemu-devel] [PATCH 01/13] hw/rdma: Make distinction between device init and start modes

2018-07-24 Thread Yuval Shaia
On Tue, Jul 24, 2018 at 03:08:10PM +0300, Marcel Apfelbaum wrote: > Hi Yuval, > > On 07/16/2018 10:40 AM, Yuval Shaia wrote: > > There are certain operations that are well considered as part of device > > configuration while others are needed only when "start"

Re: [Qemu-devel] [PATCH 07/13] hw/rdma: Do not allocate memory for non-dma MR

2018-08-05 Thread Yuval Shaia
On Tue, Jul 24, 2018 at 03:19:52PM +0300, Marcel Apfelbaum wrote: > > Hi Yuval, > > On 07/16/2018 10:40 AM, Yuval Shaia wrote: > > There is no use in the memory allocated for non-dma MR (one with > > host_virt equals to NULL). > > No need for the (one with...) W

[Qemu-devel] [PATCH v2 05/13] hw/pvrdma: Make default pkey 0xFFFF

2018-08-05 Thread Yuval Shaia
0x7FFF is not the default pkey - fix it. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 3 +++ hw/rdma/vmw/pvrdma_cmd.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index 81e0e0e99c

[Qemu-devel] [PATCH v2 04/13] hw/pvrdma: Clean CQE before use

2018-08-05 Thread Yuval Shaia
Next CQE is fetched from CQ ring, clean it before usage as it still carries old CQE values. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c

[Qemu-devel] [PATCH v2 00/13] Misc fixes for pvrdma device

2018-08-05 Thread Yuval Shaia
Hi, Please review some changes i've made for pvrdma device. v1 -> v2: * Fix various stuff pointed by Marcel * Add Marcel's r-b Yuval Shaia (13): hw/rdma: Make distinction between device init and start modes hw/pvrdma: Bugfix - provide the correct attr_mask to

[Qemu-devel] [PATCH v2 02/13] hw/pvrdma: Bugfix - provide the correct attr_mask to query_qp

2018-08-05 Thread Yuval Shaia
Calling rdma_rm_query_qp with attr_mask equals to -1 leads to error where backend query_qp fails to retrieve the needed QP attributes. Fix it by providing the attr_mask we got from driver. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- 1 file

[Qemu-devel] [PATCH v2 06/13] hw/rdma: Delete useless structure RdmaRmUserMR

2018-08-05 Thread Yuval Shaia
The structure RdmaRmUserMR has no benefits, remove it an move all its fields to struct RdmaRmMR. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 3 +-- hw/rdma/rdma_rm.c | 16 hw/rdma/rdma_rm_defs.h | 10 +++--- 3 files changed, 12 insertions(+), 17 deletions

[Qemu-devel] [PATCH v2 08/13] hw/rdma: Reorder resource cleanup

2018-08-05 Thread Yuval Shaia
To be consistence with allocation do the reverse order in deallocation Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index bf4a5c71b4..1f014b4ab2 100644

[Qemu-devel] [PATCH v2 01/13] hw/rdma: Make distinction between device init and start modes

2018-08-05 Thread Yuval Shaia
n of a CQ completion handler thread. Driver expects such distinction - implement it. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 96 +-- hw/rdma/rdma_backend.h | 2 + hw/rdma/rdma_backend_defs.h | 3 +- hw/rdma/vmw/p

[Qemu-devel] [PATCH v2 03/13] hw/rdma: Modify debug macros

2018-08-05 Thread Yuval Shaia
- Add line counter to ease navigation in log - Print rdma instead of pvrdma Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_utils.c | 4 hw/rdma/rdma_utils.h | 16 hw/rdma/vmw/pvrdma_main.c | 2 ++ 3 files changed, 18 insertions(+), 4

<    1   2   3   4   5   6   >