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

2018-11-08 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 --- hw/rdma/vmw/pvrdma_qp_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

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

2018-11-08 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 --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

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

2018-11-08 Thread Yuval Shaia
Ethernet device. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 243 +++- hw/rdma/rdma_backend.h | 22 ++-- hw/rdma/rdma_backend_defs.h | 3 +- hw/rdma/rdma_rm.c | 104 ++- hw/rdma/rdma_rm.h | 17 ++- hw/rdma

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

2018-11-08 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 --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw

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

2018-11-08 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 --- hw/rdma/vmw/pvrdma.h | 2 +- 1 file

[Qemu-devel] [PATCH v2 16/22] hw/pvrdma: Fill all CQE fields

2018-11-08 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31 +++ 3 files changed, 58

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

2018-11-08 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 1

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

2018-11-08 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 --

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

2018-11-08 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 --- hw/net/vmxnet3.c | 116 +--- hw/net/vmxnet3_defs.h | 133 ++ 2 files ch

[Qemu-devel] [PATCH v2 10/22] json: Define new QMP message for pvrdma

2018-11-08 Thread Yuval Shaia
. Signed-off-by: Yuval Shaia --- MAINTAINERS | 1 + Makefile | 3 ++- Makefile.objs | 4 qapi/qapi-schema.json | 1 + qapi/rdma.json| 38 ++ 5 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 qapi

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

2018-11-08 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 --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3 files changed, 19 insertions(+

[Qemu-devel] [PATCH v2 21/22] rdma: Do not use bitmap_zero_extend to fee bitmap

2018-11-08 Thread Yuval Shaia
Signed-off-by: Yuval Shaia --- 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 0a5ab8935a..35a96d9a64 100644 --- a/hw/rdma/rdma_rm.c +++ b/hw/rdma/rdma_rm.c @@ -43,7 +43,7 @@ static inline void res_tbl_free

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

2018-11-08 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- 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 index 7b0f440fda..3388be1926 100644

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

2018-11-08 Thread Yuval Shaia
Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index 35a96d9a64..e3f6b2f6ea 100644 --- a/hw/rdma/rdma_rm.c +++ b/hw/rdma/rdma_rm.c @@ -555,6 +555,10 @@ int rdma_rm_del_gid(RdmaDeviceResources *dev_res

Re: [Qemu-devel] [PATCH v2 19/22] vl: Introduce shutdown_notifiers

2018-11-08 Thread Yuval Shaia
On Thu, Nov 08, 2018 at 05:26:06PM +0100, Cornelia Huck wrote: > On Thu, 8 Nov 2018 18:08:15 +0200 > Yuval Shaia wrote: > > > Notifier will be used for signaling shutdown event to inform system is > > shutdown. This will allow devices and other component to run some &g

Re: [Qemu-devel] [PATCH v2 01/22] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-11-10 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 10:10:04PM +0200, Shamir Rabinovitch wrote: > On Thu, Nov 08, 2018 at 06:07:57PM +0200, Yuval Shaia wrote: > > RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a > > given MAD class. > > This does not go hand-by-hand with qemu pvrdma

Re: [Qemu-devel] [PATCH v2 13/22] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-11-10 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 08:27:44PM +0200, Marcel Apfelbaum wrote: > > > On 11/8/18 6:08 PM, Yuval Shaia wrote: > > Guest driver enforces it, we should also. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/vmw/pvrdma.h | 2 ++ > > hw

Re: [Qemu-devel] [PATCH v2 10/22] json: Define new QMP message for pvrdma

2018-11-10 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 08:25:46PM +0200, Marcel Apfelbaum wrote: > > > +# > > +## > > +{ 'event': 'RDMA_GID_STATUS_CHANGED', > > + 'data': { 'netdev': 'str', > > +'gid-status': 'bool', > > 'git-status' naming as of indication if we add or remove a gid > is a little odd,

Re: [Qemu-devel] [PATCH v2 09/22] hw/pvrdma: Set the correct opcode for send completion

2018-11-11 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 08:21:51PM +0200, Marcel Apfelbaum wrote: > > > On 11/8/18 6:08 PM, Yuval Shaia wrote: > > opcode for WC should be set by the device and not taken from work > > element. > > > > Signed-off-by: Yuval Shaia > > --- > > hw

Re: [Qemu-devel] [PATCH v2 08/22] hw/pvrdma: Set the correct opcode for recv completion

2018-11-11 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 08:18:58PM +0200, Marcel Apfelbaum wrote: > > > On 11/8/18 6:08 PM, Yuval Shaia wrote: > > The function pvrdma_post_cqe populates CQE entry with opcode from the > > given completion element. For receive operation value was not set. Fix > > it b

Re: [Qemu-devel] [PATCH v2 03/22] hw/rdma: Return qpn 1 if ibqp is NULL

2018-11-11 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 07:59:00PM +0200, Marcel Apfelbaum wrote: > Hi Yuval, > > On 11/8/18 6:07 PM, Yuval Shaia wrote: > > Device is not supporting QP0, only QP1. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_backend.h | 2 +- > >

Re: [Qemu-devel] [PATCH v2 05/22] hw/rdma: Add support for MAD packets

2018-11-11 Thread Yuval Shaia
On Sat, Nov 10, 2018 at 08:15:27PM +0200, Marcel Apfelbaum wrote: > Hi Yuval > > On 11/8/18 6:08 PM, Yuval Shaia wrote: > > MAD (Management Datagram) packets are widely used by various modules > > both in kernel and in user space for example the rdma_* API which is > >

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

2018-11-12 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 v3 00/23] Add support for RDMA MAD

2018-11-12 Thread Yuval Shaia
Shamir Rabinovitch for UMAD multiplexer Thanks, Yuval Yuval Shaia (23): contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer hw/rdma: Add ability to force notification without re-arm hw/rdma: Return qpn 1 if ibqp is NULL hw/rdma: Abort send-op if fail to create addr handler hw/rdm

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

2018-11-12 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 v3 01/23] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-11-12 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 ---

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

2018-11-12 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 v3 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-11-12 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia --- 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/rdma_backend.h +++ b/hw/rdma

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

2018-11-12 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 v3 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-11-12 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- 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 index 7b0f440fda..3388be1926 100644

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

2018-11-12 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 --

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

2018-11-12 Thread Yuval Shaia
al utility (contrib/rdmacm-mux) to relay packets from and to the guest driver. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 263 +++- hw/rdma/rdma_backend.h | 4 +- hw/rdma/rdma_backend_defs.h | 10 +- hw/rdma/vmw/pvrdma.h| 2 + h

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

2018-11-12 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 v3 11/23] hw/pvrdma: Add support to allow guest to configure GID table

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

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

2018-11-12 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31 +++ 3 files changed, 58

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

2018-11-12 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/rdma/vm

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

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

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

2018-11-12 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 1

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

2018-11-12 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 --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3 files changed, 19 insertions(+

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

2018-11-12 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 --- include/sysemu/sysemu.h | 1 + vl.c| 15 ++- 2

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

2018-11-12 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 --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

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

2018-11-12 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/rdma/vm

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

2018-11-12 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a..10a3c4fb7c 100644 --- a/hw/rdma/vmw/pvrdma.h

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

2018-11-12 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 --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw

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

2018-11-12 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia --- 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 0a5ab8935a..35a96d9a64 100644 --- a/hw

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

2018-11-12 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- 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 index 7b0f440fda..3388be1926 100644

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

2018-11-12 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 v3 10/23] json: Define new QMP message for pvrdma

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

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

2018-11-12 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 --- hw/rdma/rdma_rm.c | 4 ++

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

2018-11-12 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia --- 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/rdma_backend.h +++ b/hw/rdma

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

2018-11-12 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31 +++ 3 files changed, 58

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

2018-11-12 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 v3 00/23] Add support for RDMA MAD

2018-11-12 Thread Yuval Shaia
Shamir Rabinovitch for UMAD multiplexer Thanks, Yuval Yuval Shaia (23): contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer hw/rdma: Add ability to force notification without re-arm hw/rdma: Return qpn 1 if ibqp is NULL hw/rdma: Abort send-op if fail to create addr handler hw/rdm

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

2018-11-12 Thread Yuval Shaia
al utility (contrib/rdmacm-mux) to relay packets from and to the guest driver. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 263 +++- hw/rdma/rdma_backend.h | 4 +- hw/rdma/rdma_backend_defs.h | 10 +- hw/rdma/vmw/pvrdma.h| 2 + h

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

2018-11-12 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 v3 06/23] hw/pvrdma: Make function reset_device return void

2018-11-12 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 v3 17/23] hw/pvrdma: Fill error code in command's response

2018-11-12 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 1

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

2018-11-12 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 ---

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

2018-11-12 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 v3 22/23] hw/rdma: Do not call rdma_backend_del_gid on an empty gid

2018-11-12 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 --- hw/rdma/rdma_rm.c | 4 ++

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

2018-11-12 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 --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3 files changed, 19 insertions(+

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

2018-11-12 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 v3 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-11-12 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 --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

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

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

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

2018-11-12 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 v3 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-11-12 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 --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw

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

2018-11-12 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a..10a3c4fb7c 100644 --- a/hw/rdma/vmw/pvrdma.h

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

2018-11-12 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 --- include/sysemu/sysemu.h | 1 + vl.c| 15 ++- 2

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

2018-11-12 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 --

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

2018-11-12 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia --- 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 0a5ab8935a..35a96d9a64 100644 --- a/hw

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

2018-11-17 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 02:34:18PM +0200, Marcel Apfelbaum wrote: > > > On 11/13/18 9:13 AM, Yuval Shaia wrote: > > Interface with the device is changed with the addition of support for > > MAD packets. > > Adjust documentation accordingly. > > > > While t

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

2018-11-18 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 02:48:34PM +0200, Marcel Apfelbaum wrote: > > > On 11/13/18 9:13 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

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

2018-11-18 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 02:22:31PM +0200, Marcel Apfelbaum wrote: > > > On 11/13/18 9:13 AM, Yuval Shaia wrote: > > Driver checks error code let's set it. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/vmw/pvrdma_cmd.c | 67 +

Re: [Qemu-devel] [PATCH v2 13/22] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-11-18 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 01:41:41PM +0200, Marcel Apfelbaum wrote: > > > On 11/11/18 9:45 AM, Yuval Shaia wrote: > > On Sat, Nov 10, 2018 at 08:27:44PM +0200, Marcel Apfelbaum wrote: > > > > > > On 11/8/18 6:08 PM, Yuval Shaia wrote: > > >

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

2018-11-18 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 02:25:55PM +0200, Marcel Apfelbaum wrote: > > > On 11/13/18 9:13 AM, Yuval Shaia wrote: > > 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 > > t

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

2018-11-18 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 02:06:48PM +0200, Marcel Apfelbaum wrote: > Hi Yuval, > > On 11/13/18 9:12 AM, Yuval Shaia wrote: > > MAD (Management Datagram) packets are widely used by various modules > > Please add a link to Spec, I sent it in the V1 mail-thread > Please add

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

2018-11-18 Thread Yuval Shaia
On Sat, Nov 17, 2018 at 07:27:43PM +0200, Shamir Rabinovitch wrote: > On Tue, Nov 13, 2018 at 09:13:14AM +0200, Yuval Shaia wrote: > > RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a > > given MAD class. > > This does not go hand-by-hand with qemu pvrdma

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

2018-11-18 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 v4 05/23] hw/rdma: Add support for MAD packets

2018-11-18 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 --- hw/rdma/rdma

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

2018-11-18 Thread Yuval Shaia
ddress comments from Shamir Rabinovitch for UMAD multiplexer v3 -> v4: * Address some comments from Marcel * Add some R-Bs from Cornelia Huck and Shamir Rabinovitch Yuval Shaia (23): contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer hw/rdma: Add ability

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

2018-11-18 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 v4 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-11-18 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 v4 08/23] hw/pvrdma: Set the correct opcode for recv completion

2018-11-18 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 v4 04/23] hw/rdma: Abort send-op if fail to create addr handler

2018-11-18 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 v4 10/23] json: Define new QMP message for pvrdma

2018-11-18 Thread Yuval Shaia
. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- MAINTAINERS | 1 + Makefile | 3 ++- Makefile.objs | 4 qapi/qapi-schema.json | 1 + qapi/rdma.json| 38 ++ 5 files changed, 46 insertions(+), 1 deletion

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

2018-11-18 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 v4 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-11-18 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 v4 12/23] vmxnet3: Move some definitions to header file

2018-11-18 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 v4 14/23] hw/rdma: Initialize node_guid from vmxnet3 mac address

2018-11-18 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 v4 02/23] hw/rdma: Add ability to force notification without re-arm

2018-11-18 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 v4 16/23] hw/pvrdma: Fill all CQE fields

2018-11-18 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 v4 19/23] vl: Introduce shutdown_notifiers

2018-11-18 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 v4 17/23] hw/pvrdma: Fill error code in command's response

2018-11-18 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 1

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

2018-11-18 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 v4 07/23] hw/pvrdma: Make default pkey 0xFFFF

2018-11-18 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 v4 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-11-18 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 | 12 2 files changed, 14 insertions

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

2018-11-18 Thread Yuval Shaia
Ethernet device. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 268 hw/rdma/rdma_backend.h | 22 +-- hw/rdma/rdma_backend_defs.h | 3 +- hw/rdma/rdma_rm.c | 104 +- hw/rdma/rdma_rm.h | 17 ++- hw/rdma

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

2018-11-18 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

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

2018-11-18 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- 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..10a3c4fb7c 100644 --- a/hw/rdma

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

2018-11-18 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

<    1   2   3   4   5   6   >