eal/windows: add stub for rte_intr_callback_register
diff mbox series

Message ID 20201126080639.16240-1-talshn@nvidia.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • eal/windows: add stub for rte_intr_callback_register
Related show

Checks

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

Commit Message

Tal Shnaiderman Nov. 26, 2020, 8:06 a.m. UTC
interrupt callback register is not implemented in Windows.
Add stub with -ENOTSUP return value and export the function.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/librte_eal/rte_eal_exports.def      | 1 +
 lib/librte_eal/windows/eal_interrupts.c | 9 +++++++++
 2 files changed, 10 insertions(+)

Comments

Dmitry Kozlyuk Dec. 1, 2020, 4:41 p.m. UTC | #1
On Thu, 26 Nov 2020 10:06:39 +0200, Tal Shnaiderman wrote:
> interrupt callback register is not implemented in Windows.
> Add stub with -ENOTSUP return value and export the function.
> 
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>  lib/librte_eal/rte_eal_exports.def      | 1 +
>  lib/librte_eal/windows/eal_interrupts.c | 9 +++++++++
>  2 files changed, 10 insertions(+)
> 

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Pallavi Kadam Dec. 5, 2020, 12:56 a.m. UTC | #2
Hi Tal,

On 11/26/2020 12:06 AM, Tal Shnaiderman wrote:
> interrupt callback register is not implemented in Windows.
> Add stub with -ENOTSUP return value and export the function.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>   lib/librte_eal/rte_eal_exports.def      | 1 +
>   lib/librte_eal/windows/eal_interrupts.c | 9 +++++++++
>   2 files changed, 10 insertions(+)
>
> diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
> index 6a6be1cfa6..08cf25ea01 100644
> --- a/lib/librte_eal/rte_eal_exports.def
> +++ b/lib/librte_eal/rte_eal_exports.def
> @@ -63,6 +63,7 @@ EXPORTS
>   	rte_get_tsc_hz
>   	rte_hexdump
>   	rte_hypervisor_get
> +	rte_intr_callback_register
>   	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 6c64a48f34..fea338d705 100644
> --- a/lib/librte_eal/windows/eal_interrupts.c
> +++ b/lib/librte_eal/windows/eal_interrupts.c
> @@ -105,3 +105,12 @@ 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;
> +}

We have also included the same code as it is required to compile i40e PMD.

Will remove it from our patch once this code is merged.

Thanks,
Pallavi Kadam Dec. 5, 2020, 12:57 a.m. UTC | #3
On 11/26/2020 12:06 AM, Tal Shnaiderman wrote:
> interrupt callback register is not implemented in Windows.
> Add stub with -ENOTSUP return value and export the function.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Thomas Monjalon Dec. 7, 2020, 8:43 p.m. UTC | #4
05/12/2020 01:56, Kadam, Pallavi:
> Hi Tal,
> 
> On 11/26/2020 12:06 AM, Tal Shnaiderman wrote:
> > interrupt callback register is not implemented in Windows.
> > Add stub with -ENOTSUP return value and export the function.
> >
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> >   lib/librte_eal/rte_eal_exports.def      | 1 +
> >   lib/librte_eal/windows/eal_interrupts.c | 9 +++++++++
> >   2 files changed, 10 insertions(+)
> >
> > diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
> > index 6a6be1cfa6..08cf25ea01 100644
> > --- a/lib/librte_eal/rte_eal_exports.def
> > +++ b/lib/librte_eal/rte_eal_exports.def
> > @@ -63,6 +63,7 @@ EXPORTS
> >   	rte_get_tsc_hz
> >   	rte_hexdump
> >   	rte_hypervisor_get
> > +	rte_intr_callback_register
> >   	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 6c64a48f34..fea338d705 100644
> > --- a/lib/librte_eal/windows/eal_interrupts.c
> > +++ b/lib/librte_eal/windows/eal_interrupts.c
> > @@ -105,3 +105,12 @@ 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;
> > +}
> 
> We have also included the same code as it is required to compile i40e PMD.
> 
> Will remove it from our patch once this code is merged.

It would make more sense to have a patch which introduces all
intr-related stubs, including epoll ones.

There are already 3 patches around, none of them is complete:
	https://patches.dpdk.org/patch/84389/
	https://patches.dpdk.org/patch/84567/
	https://patches.dpdk.org/patch/84771/

Patch
diff mbox series

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 6a6be1cfa6..08cf25ea01 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -63,6 +63,7 @@  EXPORTS
 	rte_get_tsc_hz
 	rte_hexdump
 	rte_hypervisor_get
+	rte_intr_callback_register
 	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 6c64a48f34..fea338d705 100644
--- a/lib/librte_eal/windows/eal_interrupts.c
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -105,3 +105,12 @@  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;
+}