eal/windows: add interrupt functions stub

Message ID 20201211002607.8240-1-pallavi.kadam@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series eal/windows: add interrupt functions stub |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed

Commit Message

Kadam, Pallavi Dec. 11, 2020, 12:26 a.m. UTC
  Add some missing interrupt implementations on Windows.
Also add respestive 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>
---
 lib/librte_eal/rte_eal_exports.def      | 11 ++++
 lib/librte_eal/windows/eal_interrupts.c | 76 +++++++++++++++++++++++++
 2 files changed, 87 insertions(+)
  

Comments

Narcisa Ana Maria Vasile Dec. 11, 2020, 7:53 p.m. UTC | #1
On Thu, Dec 10, 2020 at 04:26:07PM -0800, Pallavi Kadam wrote:
> Add some missing interrupt implementations on Windows.
> Also add respestive 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>
> ---
>  lib/librte_eal/rte_eal_exports.def      | 11 ++++
>  lib/librte_eal/windows/eal_interrupts.c | 76 +++++++++++++++++++++++++
>  2 files changed, 87 insertions(+)
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
  
Dmitry Kozlyuk Dec. 11, 2020, 9:07 p.m. UTC | #2
On Thu, 10 Dec 2020 16:26:07 -0800, Pallavi Kadam wrote:
> Add some missing interrupt implementations on Windows.
> Also add respestive 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>
> ---
>  lib/librte_eal/rte_eal_exports.def      | 11 ++++
>  lib/librte_eal/windows/eal_interrupts.c | 76 +++++++++++++++++++++++++
>  2 files changed, 87 insertions(+)
> 
> diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
> index 6a6be1cfa..98a38ed32 100644
> --- a/lib/librte_eal/rte_eal_exports.def
> +++ b/lib/librte_eal/rte_eal_exports.def
> @@ -63,6 +63,17 @@ EXPORTS
>  	rte_get_tsc_hz
>  	rte_hexdump
>  	rte_hypervisor_get
> +	rte_intr_ack
> +	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

Might as well add all remaining interrupt APIs:

	rte_intr_callback_unregister_pending
	rte_intr_tls_epfd

>  	rte_intr_rx_ctl
>  	rte_lcore_count
>  	rte_lcore_has_role
  
Kadam, Pallavi Dec. 15, 2020, 12:38 a.m. UTC | #3
Hi Dmitry,

On 12/11/2020 1:07 PM, Dmitry Kozlyuk wrote:
> On Thu, 10 Dec 2020 16:26:07 -0800, Pallavi Kadam wrote:
>> Add some missing interrupt implementations on Windows.
>> Also add respestive 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>
>> ---
>>   lib/librte_eal/rte_eal_exports.def      | 11 ++++
>>   lib/librte_eal/windows/eal_interrupts.c | 76 +++++++++++++++++++++++++
>>   2 files changed, 87 insertions(+)
>>
>> diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
>> index 6a6be1cfa..98a38ed32 100644
>> --- a/lib/librte_eal/rte_eal_exports.def
>> +++ b/lib/librte_eal/rte_eal_exports.def
>> @@ -63,6 +63,17 @@ EXPORTS
>>   	rte_get_tsc_hz
>>   	rte_hexdump
>>   	rte_hypervisor_get
>> +	rte_intr_ack
>> +	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
> Might as well add all remaining interrupt APIs:
>
> 	rte_intr_callback_unregister_pending
> 	rte_intr_tls_epfd

Sent out v2 with additional interrupt APIs.

Please let me know if anything is missing.

Thanks,

>
>>   	rte_intr_rx_ctl
>>   	rte_lcore_count
>>   	rte_lcore_has_role
  

Patch

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 6a6be1cfa..98a38ed32 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -63,6 +63,17 @@  EXPORTS
 	rte_get_tsc_hz
 	rte_hexdump
 	rte_hypervisor_get
+	rte_intr_ack
+	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_lcore_count
 	rte_lcore_has_role
diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
index 6c64a48f3..feaaf3afe 100644
--- a/lib/librte_eal/windows/eal_interrupts.c
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -105,3 +105,79 @@  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(
+	__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;
+}
+
+void
+rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle)
+{
+	RTE_SET_USED(intr_handle);
+}