Skip to content

Commit

Permalink
hw/rdma: Delete port's pkey table
Browse files Browse the repository at this point in the history
Support for PKEY is not yet implemented. Removing the unneeded table
until a support will be added.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20180430200223.4119-4-marcel.apfelbaum@gmail.com>
  • Loading branch information
Yuval Shaia authored and marcel-apf committed May 3, 2018
1 parent b0197cf commit b9e3487
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
3 changes: 1 addition & 2 deletions hw/rdma/rdma_rm_defs.h
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
15 changes: 0 additions & 15 deletions hw/rdma/vmw/pvrdma_main.c
Expand Up @@ -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;
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b9e3487

Please sign in to comment.