[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/7] hw/rdma: Delete port's pkey table
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH 3/7] hw/rdma: Delete port's pkey table |
Date: |
Mon, 30 Apr 2018 23:02:19 +0300 |
From: Yuval Shaia <address@hidden>
Support for PKEY is not yet implemented. Removing the unneeded table
until a support will be added.
Signed-off-by: Yuval Shaia <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
---
hw/rdma/rdma_rm_defs.h | 3 +--
hw/rdma/vmw/pvrdma_main.c | 15 ---------------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
index fc646da61f..45503f14e0 100644
--- a/hw/rdma/rdma_rm_defs.h
+++ b/hw/rdma/rdma_rm_defs.h
@@ -21,7 +21,7 @@
#define MAX_PORTS 1
#define MAX_PORT_GIDS 1
#define MAX_PORT_PKEYS 1
-#define MAX_PKEYS 1
+#define MAX_PKEYS MAX_PORT_PKEYS
#define MAX_GIDS 2048
#define MAX_UCS 512
#define MAX_MR_SIZE (1UL << 27)
@@ -87,7 +87,6 @@ typedef struct RdmaRmQP {
typedef struct RdmaRmPort {
union ibv_gid gid_tbl[MAX_PORT_GIDS];
enum ibv_port_state state;
- int *pkey_tbl; /* TODO: Not yet supported */
} RdmaRmPort;
typedef struct RdmaDeviceResources {
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
index c552248c90..994220b58e 100644
--- a/hw/rdma/vmw/pvrdma_main.c
+++ b/hw/rdma/vmw/pvrdma_main.c
@@ -275,15 +275,6 @@ static void init_dsr_dev_caps(PVRDMADev *dev)
pr_dbg("Initialized\n");
}
-static void free_ports(PVRDMADev *dev)
-{
- int i;
-
- for (i = 0; i < MAX_PORTS; i++) {
- g_free(dev->rdma_dev_res.ports[i].gid_tbl);
- }
-}
-
static void init_ports(PVRDMADev *dev, Error **errp)
{
int i;
@@ -292,10 +283,6 @@ static void init_ports(PVRDMADev *dev, Error **errp)
for (i = 0; i < MAX_PORTS; i++) {
dev->rdma_dev_res.ports[i].state = IBV_PORT_DOWN;
-
- dev->rdma_dev_res.ports[i].pkey_tbl =
- g_malloc0(sizeof(*dev->rdma_dev_res.ports[i].pkey_tbl) *
- MAX_PORT_PKEYS);
}
}
@@ -622,8 +609,6 @@ static void pvrdma_exit(PCIDevice *pdev)
pvrdma_qp_ops_fini();
- free_ports(dev);
-
rdma_rm_fini(&dev->rdma_dev_res);
rdma_backend_fini(&dev->backend_dev);
--
2.14.3
- [Qemu-devel] [PATCH 0/7] hw/rdma: coverity fixes, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 1/7] hw/rdma: Fix possible munmap call on a NULL pointer, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 3/7] hw/rdma: Delete port's pkey table,
Marcel Apfelbaum <=
- [Qemu-devel] [PATCH 4/7] hw/rdma: Fix possible out of bounds access to GID table, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 2/7] hw/rdma: Fix possible usage of a NULL pointer, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 5/7] hw/rdma: Fix possible out of bounds access to regs array, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 6/7] hw/rdma: Delete duplicate definition of MAX_RM_TBL_NAME, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 7/7] hw/rdma: Fix possible out of bounds access to port GID index, Marcel Apfelbaum, 2018/04/30