eal/windows: add interrupt functions stub
authorPallavi Kadam <pallavi.kadam@intel.com>
Tue, 15 Dec 2020 00:26:22 +0000 (16:26 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 5 Jan 2021 21:45:00 +0000 (22:45 +0100)
Add some missing interrupt implementations on Windows.
Also add respective functions to export file.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
lib/librte_eal/rte_eal_exports.def
lib/librte_eal/windows/eal_interrupts.c

index 6a6be1c..4597eb8 100644 (file)
@@ -56,6 +56,8 @@ EXPORTS
        rte_eal_tailq_register
        rte_eal_using_phys_addrs
        rte_eal_wait_lcore
+       rte_epoll_ctl
+       rte_epoll_wait
        rte_exit
        rte_free
        rte_get_main_lcore
@@ -63,7 +65,18 @@ EXPORTS
        rte_get_tsc_hz
        rte_hexdump
        rte_hypervisor_get
+       rte_intr_allow_others
+       rte_intr_callback_register
+       rte_intr_callback_unregister
+       rte_intr_cap_multiple
+       rte_intr_disable
+       rte_intr_dp_is_en
+       rte_intr_efd_disable
+       rte_intr_efd_enable
+       rte_intr_enable
+       rte_intr_free_epoll_fd
        rte_intr_rx_ctl
+       rte_intr_tls_epfd
        rte_lcore_count
        rte_lcore_has_role
        rte_lcore_index
@@ -246,8 +259,10 @@ EXPORTS
        rte_fbarray_find_biggest_used
        rte_fbarray_find_rev_biggest_free
        rte_fbarray_find_rev_biggest_used
+       rte_intr_callback_unregister_pending
        rte_realloc_socket
 
+       rte_intr_ack
        rte_lcore_cpuset
        rte_lcore_to_cpu_id
        rte_mcfg_timer_lock
@@ -303,6 +318,7 @@ EXPORTS
        rte_thread_register
        rte_thread_unregister
 
+       rte_epoll_wait_interruptible
        rte_vect_get_max_simd_bitwidth
        rte_vect_set_max_simd_bitwidth
 
index 6c64a48..3b8266d 100644 (file)
@@ -105,3 +105,132 @@ eal_intr_thread_schedule(void (*func)(void *arg), void *arg)
 
        return 0;
 }
+
+int
+rte_intr_callback_register(
+       __rte_unused const struct rte_intr_handle *intr_handle,
+       __rte_unused rte_intr_callback_fn cb, __rte_unused void *cb_arg)
+{
+       return -ENOTSUP;
+}
+
+int
+rte_intr_callback_unregister_pending(
+       __rte_unused const struct rte_intr_handle *intr_handle,
+       __rte_unused rte_intr_callback_fn cb_fn, __rte_unused void *cb_arg,
+       __rte_unused rte_intr_unregister_callback_fn ucb_fn)
+{
+       return -ENOTSUP;
+}
+
+int
+rte_intr_callback_unregister(
+       __rte_unused const struct rte_intr_handle *intr_handle,
+       __rte_unused rte_intr_callback_fn cb_fn, __rte_unused void *cb_arg)
+{
+       return 0;
+}
+
+int
+rte_intr_enable(__rte_unused const struct rte_intr_handle *intr_handle)
+{
+       return -ENOTSUP;
+}
+
+int
+rte_intr_ack(__rte_unused const struct rte_intr_handle *intr_handle)
+{
+       return -ENOTSUP;
+}
+
+int
+rte_intr_disable(__rte_unused const struct rte_intr_handle *intr_handle)
+{
+       return -ENOTSUP;
+}
+
+int
+rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
+{
+       RTE_SET_USED(intr_handle);
+       RTE_SET_USED(nb_efd);
+
+       return 0;
+}
+
+void
+rte_intr_efd_disable(struct rte_intr_handle *intr_handle)
+{
+       RTE_SET_USED(intr_handle);
+}
+
+int
+rte_intr_dp_is_en(struct rte_intr_handle *intr_handle)
+{
+       RTE_SET_USED(intr_handle);
+
+       return 0;
+}
+
+int
+rte_intr_allow_others(struct rte_intr_handle *intr_handle)
+{
+       RTE_SET_USED(intr_handle);
+
+       return 1;
+}
+
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
+{
+       RTE_SET_USED(intr_handle);
+
+       return 0;
+}
+
+int
+rte_epoll_wait(int epfd, struct rte_epoll_event *events,
+               int maxevents, int timeout)
+{
+       RTE_SET_USED(epfd);
+       RTE_SET_USED(events);
+       RTE_SET_USED(maxevents);
+       RTE_SET_USED(timeout);
+
+       return -ENOTSUP;
+}
+
+int
+rte_epoll_wait_interruptible(int epfd, struct rte_epoll_event *events,
+                            int maxevents, int timeout)
+{
+       RTE_SET_USED(epfd);
+       RTE_SET_USED(events);
+       RTE_SET_USED(maxevents);
+       RTE_SET_USED(timeout);
+
+       return -ENOTSUP;
+}
+
+int
+rte_epoll_ctl(int epfd, int op, int fd, struct rte_epoll_event *event)
+{
+       RTE_SET_USED(epfd);
+       RTE_SET_USED(op);
+       RTE_SET_USED(fd);
+       RTE_SET_USED(event);
+
+       return -ENOTSUP;
+}
+
+int
+rte_intr_tls_epfd(void)
+{
+       return -ENOTSUP;
+}
+
+void
+rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle)
+{
+       RTE_SET_USED(intr_handle);
+}