summaryrefslogtreecommitdiffstats
path: root/hw/rdma/rdma_rm_defs.h
Commit message (Collapse)AuthorAgeFilesLines
* hw/rdma: Add support for managing SRQ resourceKamal Heib2019-05-041-0/+8
| | | | | | | | | | Adding the required functions and definitions for support managing the shared receive queues (SRQs). Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Message-Id: <20190403113343.26384-3-kamalheib1@gmail.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: Add SRQ support to backend layerKamal Heib2019-05-041-0/+1
| | | | | | | | | | Add the required functions and definitions to support shared receive queues (SRQs) in the backend layer. Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Message-Id: <20190403113343.26384-2-kamalheib1@gmail.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: another clang compilation fixMarcel Apfelbaum2019-03-161-2/+2
| | | | | | | | | | | | | | | | | | | Configuring QEMU with: configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma Results in: qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition] } RdmaDeviceResources; ^ qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition is here typedef struct RdmaDeviceResources RdmaDeviceResources; Fix by removing one of the 'typedef' definitions. Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20190214154053.15050-1-marcel.apfelbaum@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/pvrdma: Collect debugging statisticsYuval Shaia2019-03-161-1/+26
| | | | | | | | | Add counters to enable enhance debugging Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Message-Id: <1552300155-25216-5-git-send-email-yuval.shaia@oracle.com> Reviewed-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: Protect against concurrent execution of poll_cqYuval Shaia2019-03-161-0/+1
| | | | | | | | | | | | | | The function rdma_poll_cq is called from two contexts - completion handler thread which sense new completion on backend channel and explicitly as result of guest issuing poll_cq command. Add lock to protect against concurrent executions. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <1552300155-25216-4-git-send-email-yuval.shaia@oracle.com> Reviewed-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: Remove unneeded code that handles more that one portYuval Shaia2018-12-221-2/+2
| | | | | | | | | Device supports only one port, let's remove a dead code that handles more than one port. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/pvrdma: Add support to allow guest to configure GID tableYuval Shaia2018-12-221-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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 by the MAC address, the second by the first IPv6 address and the third by the IPv4 address. Other entries can be added by adding more IP addresses. The opposite is the same, i.e. whenever an address is removed, the corresponding GID entry is removed. The process is done by the network and RDMA stacks. Whenever an address is added the ib_core driver is notified and calls the device driver add_gid function which in turn update the device. To support this in pvrdma device we need to hook into the create_bind and destroy_bind HW commands triggered by pvrdma driver in guest. Whenever a change is made to the pvrdma port's GID table a special QMP message is sent to be processed by libvirt to update the address of the backend Ethernet device. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: Add ability to force notification without re-armYuval Shaia2018-12-221-1/+7
| | | | | | | | | | | | | | | Upon completion of incoming packet the device pushes CQE to driver's RX ring and notify the driver (msix). While for data-path incoming packets the driver needs the ability to control whether it wished to receive interrupts or not, for control-path packets such as incoming MAD the driver needs 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 <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: Delete useless structure RdmaRmUserMRYuval Shaia2018-08-181-7/+3Star
| | | | | | | | | | The structure RdmaRmUserMR has no benefits, remove it an move all its fields to struct RdmaRmMR. Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Message-Id: <20180805153518.2983-7-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* hw/rdma: Delete duplicate definition of MAX_RM_TBL_NAMEYuval Shaia2018-05-031-2/+2
| | | | | | | | By a mistake this constant was defined twice - remove the duplication. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20180430200223.4119-7-marcel.apfelbaum@gmail.com>
* hw/rdma: Fix possible out of bounds access to GID tableYuval Shaia2018-05-031-1/+1
| | | | | | | | | | | | Array size is MAX_PORT_GIDS, let's make sure the given index is in range. While there limit device table size to 1. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20180430200223.4119-5-marcel.apfelbaum@gmail.com>
* hw/rdma: Delete port's pkey tableYuval Shaia2018-05-031-2/+1Star
| | | | | | | | | 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>
* hw/rdma: Change host_virt to void *Yuval Shaia2018-03-231-1/+1
| | | | | | | | | | | | | | | | To avoid compilation warnings on 32-bit machines: rdma_backend.c: In function 'rdma_backend_create_mr': rdma_backend.c:409:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] mr->ibmr = ibv_reg_mr(pd->ibpd, (void *)addr, length, access); Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180322095220.9976-2-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
* hw/rdma: Definitions for rdma device and rdma resource managerYuval Shaia2018-02-191-0/+104
Definition of various structures and constants used in backend and resource manager modules. Reviewed-by: Dotan Barak <dotanb@mellanox.com> Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>