a_backend_add_gid(RdmaBackendDev *backend_dev,
> const char *ifname,
> gid->global.subnet_prefix,
> gid->global.interface_id);
>
> -return ret;
> + /*
> + * We ignore return value since operation might have completed
> + * successfully by the QMP consumer
> + */
> +netlink_route_update(ifname, gid, RTM_NEWADDR);
> +
> +return 0;
> }
>
> int rdma_backend_del_gid(RdmaBackendDev *backend_dev, const char *ifname,
> @@ -1149,6 +1215,12 @@ int rdma_backend_del_gid(RdmaBackendDev *backend_dev,
> const char *ifname,
> gid->global.subnet_prefix,
> gid->global.interface_id);
>
> +/*
> + * We ignore return value since operation might have completed
> + * successfully by the QMP consumer
> + */
> +netlink_route_update(ifname, gid, RTM_DELADDR);
> +
> return 0;
> }
>
>
Reviewed-by: Kamal Heib
t; -#include "qapi/qmp/qnum.h"
> #include "qapi/qapi-events-rdma.h"
>
> #include
> -#include
> -#include
> -#include
>
> #include "contrib/rdmacm-mux/rdmacm-mux.h"
> #include "trace.h"
>
Reviewed-by: Kamal Heib
On 4/3/19 9:05 PM, Yuval Shaia wrote:
> On Wed, Apr 03, 2019 at 02:33:40PM +0300, Kamal Heib wrote:
>> Add the required functions and definitions to support shared receive
>> queues (SRQs) in the backend layer.
>>
>> Signed-off-by: Kamal Heib
>> ---
>
Implement the pvrdma device commands for supporting SRQ
Signed-off-by: Kamal Heib
---
hw/rdma/vmw/pvrdma_cmd.c| 147
hw/rdma/vmw/pvrdma_main.c | 16
hw/rdma/vmw/pvrdma_qp_ops.c | 46 ++-
hw/rdma/vmw/pvrdma_qp_ops.h | 1 +
4 files
Modify create/destroy QP to support shared receive queue and rearrange
the destroy_qp() code to avoid touching the QP after calling
rdma_rm_dealloc_qp().
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 9 --
hw/rdma/rdma_backend.h | 6 ++--
hw/rdma/rdma_rm.c| 22
Adding the required functions and definitions for support managing the
shared receive queues (SRQs).
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_rm.c | 93 ++
hw/rdma/rdma_rm.h | 10 +
hw/rdma/rdma_rm_defs.h | 8
3 files changed, 111
>v2:
- Handle checkpatch.pl warnings.
Kamal Heib (4):
hw/rdma: Add SRQ support to backend layer
hw/rdma: Add support for managing SRQ resource
hw/rdma: Modify create/destroy QP to support SRQ
hw/pvrdma: Add support for SRQ
hw/rdma/rdma_backend.c | 125 +-
h
Add the required functions and definitions to support shared receive
queues (SRQs) in the backend layer.
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 116 +++-
hw/rdma/rdma_backend.h | 12
hw/rdma/rdma_backend_defs.h | 5 ++
hw/rdma
On 3/27/19 6:18 PM, Yuval Shaia wrote:
> On Tue, Mar 26, 2019 at 02:54:29PM +0200, Kamal Heib wrote:
>> This series implements the SRQ (Shared Receive Queue) for the pvrdma
>> device, It also includes all the needed functions and definitions for
>> support SRQ in the
On 3/27/19 6:16 PM, Yuval Shaia wrote:
> On Tue, Mar 26, 2019 at 02:54:33PM +0200, Kamal Heib wrote:
>> Implement the pvrdma device commands for supporting SRQ
>>
>> Signed-off-by: Kamal Heib
>> ---
>> hw/rdma/vmw/pvrdma_cmd.c| 147 +++
On 3/27/19 5:54 PM, Yuval Shaia wrote:
> On Tue, Mar 26, 2019 at 02:54:32PM +0200, Kamal Heib wrote:
>> Modify create/destroy QP to support shared receive queue.
>>
>> Signed-off-by: Kamal Heib
>> ---
>> hw/rdma/rdma_backend.c | 9 --
>> hw/rdma
On 3/27/19 6:03 PM, Yuval Shaia wrote:
> On Tue, Mar 26, 2019 at 02:54:31PM +0200, Kamal Heib wrote:
>> Adding the required functions and definitions for support managing the
>> shared receive queues (SRQs).
>>
>> Signed-off-by: Kamal Heib
>> --
On 3/27/19 8:44 AM, Yuval Shaia wrote:
> On Tue, Mar 26, 2019 at 02:54:30PM +0200, Kamal Heib wrote:
>> Add the required function and definitions for support shared receive
>
> s/function/functions
> s/for/to (but not sure about that though)
>
OK, I'll fix it in v3
Modify create/destroy QP to support shared receive queue.
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 9 --
hw/rdma/rdma_backend.h | 6 ++--
hw/rdma/rdma_rm.c| 23 +--
hw/rdma/rdma_rm.h| 3 +-
hw/rdma/rdma_rm_defs.h | 1 +
hw/rdma/vmw
Adding the required functions and definitions for support managing the
shared receive queues (SRQs).
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_rm.c | 83 ++
hw/rdma/rdma_rm.h | 10 +
hw/rdma/rdma_rm_defs.h | 8
3 files changed, 101
Implement the pvrdma device commands for supporting SRQ
Signed-off-by: Kamal Heib
---
hw/rdma/vmw/pvrdma_cmd.c| 147
hw/rdma/vmw/pvrdma_main.c | 16
hw/rdma/vmw/pvrdma_qp_ops.c | 46 ++-
hw/rdma/vmw/pvrdma_qp_ops.h | 1 +
4 files
Add the required function and definitions for support shared receive
queues (SRQs) in the backend layer.
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 116 +++-
hw/rdma/rdma_backend.h | 12
hw/rdma/rdma_backend_defs.h | 5 ++
3 files
This series implements the SRQ (Shared Receive Queue) for the pvrdma
device, It also includes all the needed functions and definitions for
support SRQ in the backend and resource management layers.
Changes from v1->v2:
- Handle checkpatch.pl warnings.
Kamal Heib (4):
hw/rdma: Add SRQ supp
Modify create/destroy QP to support shared receive queue.
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 9 --
hw/rdma/rdma_backend.h | 6 ++--
hw/rdma/rdma_rm.c| 23 +--
hw/rdma/rdma_rm.h| 3 +-
hw/rdma/rdma_rm_defs.h | 1 +
hw/rdma/vmw
This series implements the SRQ (Shared Receive Queue) for the pvrdma
device, It also includes all the needed functions and definitions for
support SRQ in the backend and resource management layers.
Kamal Heib (4):
hw/rdma: Add SRQ support to backend layer
hw/rdma: Add support for managing SRQ
Add the required function and definitions for support shared receive
queues (SRQs) in the backend layer.
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 115 +++-
hw/rdma/rdma_backend.h | 12
hw/rdma/rdma_backend_defs.h | 5 ++
3 files
Adding the required functions and definitions for support managing the
shared receive queues (SRQs).
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_rm.c | 83 ++
hw/rdma/rdma_rm.h | 10 +
hw/rdma/rdma_rm_defs.h | 8
3 files changed, 101
Implement the pvrdma device commands for supporting SRQ
Signed-off-by: Kamal Heib
---
hw/rdma/vmw/pvrdma_cmd.c| 147
hw/rdma/vmw/pvrdma_main.c | 16
hw/rdma/vmw/pvrdma_qp_ops.c | 46 ++-
hw/rdma/vmw/pvrdma_qp_ops.h | 1 +
4 files
Make sure to zero-initialize only the pvrdma_cmd_query_qp_resp and not
the whole pvrdma_cmd_resp for query_qp, in modify_qp the resp isn't used
so remove it.
Reviewed-by: Yuval Shaia
Signed-off-by: Kamal Heib
---
hw/rdma/vmw/pvrdma_cmd.c | 4 +---
1 file changed, 1 insertion(+), 3 dele
Initialize structs with {} instead of {0} to make sure that all code is
using the same convention.
Reviewed-by: Marcel Apfelbaum
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 18 +-
hw/rdma/vmw/pvrdma_cmd.c| 2 +-
hw/rdma/vmw/pvrdma_qp_ops.c | 2 +-
3 files
The 'rdma_dev_res' parameter is not used in rdma_poll_cq(), so remove it.
Reviewed-by: Yuval Shaia
Reviewed-by: Marcel Apfelbaum
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/rdma/rdma_backend.c
The following patch set includes few misc fixes for the pvrdma driver.
Note: this patch set depends on the latest patch set from Yuval.
Changes from v1-v2:
- Update the commit message of patch #3.
Kamal Heib (4):
hw/rdma: Fix broken paths to docs/devel/tracing.txt
hw/rdma: Remove unused
The tracing.txt file is under "docs/devel" and not "docs".
Reviewed-by: Yuval Shaia
Signed-off-by: Kamal Heib
---
hw/rdma/trace-events | 2 +-
hw/rdma/vmw/trace-events | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/rdma/trace-events b/hw/rdm
On 3/13/19 2:25 PM, Eric Blake wrote:
> On 3/13/19 3:46 AM, Kamal Heib wrote:
>> Signed-off-by: Kamal Heib
>> ---
>> hw/rdma/rdma_backend.c | 18 +-
>> hw/rdma/vmw/pvrdma_cmd.c| 2 +-
>> hw/rdma/vmw/pvrdma_qp_ops.c | 2 +-
>>
On 3/13/19 11:33 AM, Yuval Shaia wrote:
> On Wed, Mar 13, 2019 at 10:46:47AM +0200, Kamal Heib wrote:
>> Signed-off-by: Kamal Heib
>
> To be consist please copy git message as well as header message from
> commit 555b3d67bc ("hw/rdma: modify struct initialization"
The tracing.txt file is under "docs/devel" and not "docs".
Signed-off-by: Kamal Heib
---
hw/rdma/trace-events | 2 +-
hw/rdma/vmw/trace-events | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/rdma/trace-events b/hw/rdma/trace-events
index 0fad56
The 'rdma_dev_res' parameter is not used in rdma_poll_cq(), so remove it.
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index 66185bd487b6..78bafc13642a 10
Signed-off-by: Kamal Heib
---
hw/rdma/rdma_backend.c | 18 +-
hw/rdma/vmw/pvrdma_cmd.c| 2 +-
hw/rdma/vmw/pvrdma_qp_ops.c | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index 78bafc13642a
The following patch set includes few misc fixes for the pvrdma driver.
Note: this patch set depends on the latest patch set from Yuval.
Kamal Heib (4):
hw/rdma: Fix broken paths to docs/devel/tracing.txt
hw/rdma: Remove unused parameter from rdma_poll_cq()
hw/rdma: Use {} instead of {0
Make sure to zero-initialize only the pvrdma_cmd_query_qp_resp and not
the whole pvrdma_cmd_resp for query_qp, in modify_qp the resp isn't used
so remove it.
Signed-off-by: Kamal Heib
---
hw/rdma/vmw/pvrdma_cmd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/rdm
On 3/12/19 1:56 PM, Yuval Shaia wrote:
> On Tue, Mar 12, 2019 at 12:08:53PM +0200, Kamal Heib wrote:
>>
>>
>> On 3/11/19 12:29 PM, Yuval Shaia wrote:
>>> When device is going down free all saved MAD buffers.
>>>
>>> Signed-off-by: Yuval Shaia
&g
sage to include that some of the functions got
renamed to include prefix "rdma/pvrdma" in the function name.
Other than that:
Reviewed-by: Kamal Heib
> Signed-off-by: Yuval Shaia
> Reviewed-by: Marcel Apfelbaum
> ---
> hw/rdma/rdma_backend.c| 354
> +
dma/rdma_utils.h b/hw/rdma/rdma_utils.h
> index a8bf1d4..2d42249 100644
> --- a/hw/rdma/rdma_utils.h
> +++ b/hw/rdma/rdma_utils.h
> @@ -34,12 +34,23 @@ typedef struct RdmaProtectedQList {
> QList *list;
> } RdmaProtectedQList;
>
> +typedef struct RdmaProtectedGSList {
> +QemuMutex lock;
> +GSList *list;
> +} RdmaProtectedGSList;
> +
> void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen);
> void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len);
> void rdma_protected_qlist_init(RdmaProtectedQList *list);
> void rdma_protected_qlist_destroy(RdmaProtectedQList *list);
> void rdma_protected_qlist_append_int64(RdmaProtectedQList *list, int64_t
> value);
> int64_t rdma_protected_qlist_pop_int64(RdmaProtectedQList *list);
> +void rdma_protected_gslist_init(RdmaProtectedGSList *list);
> +void rdma_protected_gslist_destroy(RdmaProtectedGSList *list);
> +void rdma_protected_gslist_append_int32(RdmaProtectedGSList *list,
> +int32_t value);
> +void rdma_protected_gslist_remove_int32(RdmaProtectedGSList *list,
> +int32_t value);
>
> static inline void addrconf_addr_eui48(uint8_t *eui, const char *addr)
> {
>
Reviewed-by: Kamal Heib
gt;uc_tbl);
> diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
> index 0ba61d1..f0ee1f3 100644
> --- a/hw/rdma/rdma_rm_defs.h
> +++ b/hw/rdma/rdma_rm_defs.h
> @@ -105,6 +105,7 @@ typedef struct RdmaDeviceResources {
> RdmaRmResTbl cq_tbl;
> RdmaRmResTbl cqe_ctx_tbl;
> GHashTable *qp_hash; /* Keeps mapping between real and emulated */
> +QemuMutex lock;
> } RdmaDeviceResources;
>
> #endif
>
Reviewed-by: Kamal Heib
to(QNum, obj));
> +}
> diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h
> index acd1488..a8bf1d4 100644
> --- a/hw/rdma/rdma_utils.h
> +++ b/hw/rdma/rdma_utils.h
> @@ -29,8 +29,17 @@
> #define rdma_info_report(fmt, ...) \
> info_report("%s: " fmt, "rdma", ## __VA_ARGS__)
>
> +typedef struct RdmaProtectedQList {
> +QemuMutex lock;
> +QList *list;
> +} RdmaProtectedQList;
> +
> void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen);
> void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len);
> +void rdma_protected_qlist_init(RdmaProtectedQList *list);
> +void rdma_protected_qlist_destroy(RdmaProtectedQList *list);
> +void rdma_protected_qlist_append_int64(RdmaProtectedQList *list, int64_t
> value);
> +int64_t rdma_protected_qlist_pop_int64(RdmaProtectedQList *list);
>
> static inline void addrconf_addr_eui48(uint8_t *eui, const char *addr)
> {
>
Reviewed-by: Kamal Heib
On 3/11/19 12:29 PM, Yuval Shaia wrote:
> When device is going down free all saved MAD buffers.
>
> Signed-off-by: Yuval Shaia
> Reviewed-by: Marcel Apfelbaum
> ---
> hw/rdma/rdma_backend.c| 34 +-
> hw/rdma/vmw/pvrdma_main.c | 2 ++
> 2 files changed, 35
handle)
> continue;
> }
>
> -rdma_backend_post_recv(&dev->backend_dev, &dev->rdma_dev_res,
> - &qp->backend_qp, qp->qp_type,
> +rdma_backend_post_recv(&dev->backend_dev, &qp->backend_qp,
> qp->qp_type,
> (struct ibv_sge *)&wqe->sge[0],
> wqe->hdr.num_sge,
> comp_ctx);
>
>
Reviewed-by: Kamal Heib
i(PCIDevice *pdev)
> {
> PVRDMADev *dev = PVRDMA_DEV(pdev);
>
> +notifier_remove(&dev->shutdown_notifier);
> +
> pvrdma_qp_ops_fini();
>
> rdma_backend_stop(&dev->backend_dev);
>
Reviewed-by: Kamal Heib
vmxnet3 device in slot 0 */
> -if (strcmp(object_get_typename(&func0->qdev.parent_obj), TYPE_VMXNET3)) {
> +if (strcmp(object_get_typename(OBJECT(func0)), TYPE_VMXNET3)) {
> error_setg(errp, "Device on %x.0 must be %s", PCI_SLOT(pdev->devfn),
> TYPE_VMXNET3);
> return;
>
Reviewed-by: Kamal Heib
LASS(klass);
>
> k->realize = pvrdma_realize;
> -k->exit = pvrdma_exit;
> k->vendor_id = PCI_VENDOR_ID_VMWARE;
> k->device_id = PCI_DEVICE_ID_VMWARE_PVRDMA;
> k->revision = 0x00;
>
Reviewed-by: Kamal Heib
c_cmd(PVRDMADev *dev)
>
> trace_pvrdma_exec_cmd(dsr_info->req->hdr.cmd, dsr_info->rsp->hdr.err);
>
> +dev->stats.commands++;
> +
> out:
> set_reg_val(dev, PVRDMA_REG_ERR, err);
> post_interrupt(dev, INTR_VEC_CMD_RING);
> diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
> index 81ae08b..dd35646 100644
> --- a/hw/rdma/vmw/pvrdma_main.c
> +++ b/hw/rdma/vmw/pvrdma_main.c
> @@ -337,6 +337,8 @@ static uint64_t pvrdma_regs_read(void *opaque, hwaddr
> addr, unsigned size)
> PVRDMADev *dev = opaque;
> uint32_t val;
>
> +dev->stats.regs_reads++;
> +
> if (get_reg_val(dev, addr, &val)) {
> rdma_error_report("Failed to read REG value from address 0x%x",
>(uint32_t)addr);
> @@ -353,6 +355,8 @@ static void pvrdma_regs_write(void *opaque, hwaddr addr,
> uint64_t val,
> {
> PVRDMADev *dev = opaque;
>
> +dev->stats.regs_writes++;
> +
> if (set_reg_val(dev, addr, val)) {
> rdma_error_report("Failed to set REG value, addr=0x%"PRIx64 ",
> val=0x%"PRIx64,
>addr, val);
> @@ -421,6 +425,8 @@ static void pvrdma_uar_write(void *opaque, hwaddr addr,
> uint64_t val,
> {
> PVRDMADev *dev = opaque;
>
> +dev->stats.uar_writes++;
> +
> switch (addr & 0xFFF) { /* Mask with 0xFFF as each UC gets page */
> case PVRDMA_UAR_QP_OFFSET:
> if (val & PVRDMA_UAR_QP_SEND) {
> @@ -612,6 +618,8 @@ static void pvrdma_realize(PCIDevice *pdev, Error **errp)
> goto out;
> }
>
> +memset(&dev->stats, 0, sizeof(dev->stats));
> +
> dev->shutdown_notifier.notify = pvrdma_shutdown_notifier;
> qemu_register_shutdown_notifier(&dev->shutdown_notifier);
>
>
Reviewed-by: Kamal Heib
The prints should indicate that we are talking about QP and not CQ.
Fixes: 98d176f8e592 ("hw/rdma: PVRDMA commands and data-path ops")
Reviewed-by: Yuval Shaia
Signed-off-by: Kamal Heib
---
hw/rdma/vmw/pvrdma_cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
esTbl mr_tbl;
> @@ -105,6 +105,6 @@ typedef struct RdmaDeviceResources {
> RdmaRmResTbl cq_tbl;
> RdmaRmResTbl cqe_ctx_tbl;
> GHashTable *qp_hash; /* Keeps mapping between real and emulated */
> -} RdmaDeviceResources;
> +};
>
> #endif
>
Acked-by: Kamal Heib
Before running the rdmacm-mux need to make sure that both the ib_cm
and rdma_cm kernel modules are unloaded.
Reviewed-by: Yuval Shaia
Signed-off-by: Kamal Heib
---
docs/pvrdma.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/pvrdma.txt b/docs/pvrdma.txt
index 5175251b47d6
49 matches
Mail list logo