[v1,43/72] common/mlx5/windows: wrap event channel APIs with OS calls

Message ID 20201027232335.31427-44-ophirmu@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers
Series mlx5 Windows support - part #5 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ophir Munk Oct. 27, 2020, 11:23 p.m. UTC
  From: Tal Shnaiderman <talshn@nvidia.com>

This commit is the Windows equivalent of the Linux implementation.
Windows returns an error ENOTSUP for the APIs to create/destroy event
channel or to subscribe an event.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
---
 drivers/common/mlx5/windows/mlx5_common_os.h | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
  

Patch

diff --git a/drivers/common/mlx5/windows/mlx5_common_os.h b/drivers/common/mlx5/windows/mlx5_common_os.h
index 9ff6bef..855a93f 100644
--- a/drivers/common/mlx5/windows/mlx5_common_os.h
+++ b/drivers/common/mlx5/windows/mlx5_common_os.h
@@ -218,6 +218,35 @@  mlx5_os_get_devx_uar_page_id(void *uar)
 	return ((devx_uar_handle *)uar)->uar_index;
 }
 
+static inline void *
+mlx5_os_devx_create_event_channel(void *ctx, int flags)
+{
+	(void)ctx;
+	(void)flags;
+	errno = ENOTSUP;
+	return NULL;
+}
+
+static inline void
+mlx5_os_devx_destroy_event_channel(void *eventc)
+{
+	(void)eventc;
+}
+
+static inline int
+mlx5_os_devx_subscribe_devx_event(void *eventc,
+				    void *obj,
+				    uint16_t events_sz, uint16_t events_num[],
+				    uint64_t cookie)
+{
+	(void)eventc;
+	(void)obj;
+	(void)events_sz;
+	(void)events_num;
+	(void)cookie;
+	return -ENOTSUP;
+}
+
 void *mlx5_os_alloc_pd(void *ctx);
 int mlx5_os_dealloc_pd(void *pd);
 void *mlx5_os_umem_reg(void *ctx, void *addr, size_t size, uint32_t access);