DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/enic: re-enable link status change interrupt
@ 2019-11-02  1:35 Hyong Youb Kim
  2019-11-06 17:38 ` Ferruh Yigit
  2019-11-07 14:42 ` [dpdk-dev] [PATCH v2] " Hyong Youb Kim
  0 siblings, 2 replies; 4+ messages in thread
From: Hyong Youb Kim @ 2019-11-02  1:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim, stable

When INTx is used, the interrupt handler needs to explicitly re-enable
interrupt in order to receive another one in future. The LSC interrupt
handler currently does not, and the link state never gets updated when
INTx is used (e.g. uio_pci_generic). Call rte_intr_ack() at the end of
the handler, to re-enable INTx.

Fixes: fefed3d1e62c ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/Makefile    | 1 +
 drivers/net/enic/enic_main.c | 2 ++
 drivers/net/enic/meson.build | 1 +
 3 files changed, 4 insertions(+)

diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile
index 10736a567..686efa5af 100644
--- a/drivers/net/enic/Makefile
+++ b/drivers/net/enic/Makefile
@@ -13,6 +13,7 @@ EXPORT_MAP := rte_pmd_enic_version.map
 
 LIBABIVER := 1
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -I$(SRCDIR)/base/
 CFLAGS += -I$(SRCDIR)
 CFLAGS += -O3
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index f5b9b0dcb..57574a5f7 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -448,6 +448,8 @@ enic_intr_handler(void *arg)
 	enic_link_update(dev);
 	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
+	/* Re-enable irq in case of INTx */
+	rte_intr_ack(&enic->pdev->intr_handle);
 }
 
 static int enic_rxq_intr_init(struct enic *enic)
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 1bd7cc7e1..204c97fa0 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cisco Systems, Inc.
 
+cflags += ['-DALLOW_EXPERIMENTAL_API']
 sources = files(
 	'base/vnic_cq.c',
 	'base/vnic_dev.c',
-- 
2.22.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/enic: re-enable link status change interrupt
  2019-11-02  1:35 [dpdk-dev] [PATCH] net/enic: re-enable link status change interrupt Hyong Youb Kim
@ 2019-11-06 17:38 ` Ferruh Yigit
  2019-11-07 14:42 ` [dpdk-dev] [PATCH v2] " Hyong Youb Kim
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-11-06 17:38 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: dev, John Daley, stable

On 11/2/2019 1:35 AM, Hyong Youb Kim wrote:
> When INTx is used, the interrupt handler needs to explicitly re-enable
> interrupt in order to receive another one in future. The LSC interrupt
> handler currently does not, and the link state never gets updated when
> INTx is used (e.g. uio_pci_generic). Call rte_intr_ack() at the end of
> the handler, to re-enable INTx.
> 
> Fixes: fefed3d1e62c ("enic: new driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>
> ---
>  drivers/net/enic/Makefile    | 1 +
>  drivers/net/enic/enic_main.c | 2 ++
>  drivers/net/enic/meson.build | 1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile
> index 10736a567..686efa5af 100644
> --- a/drivers/net/enic/Makefile
> +++ b/drivers/net/enic/Makefile
> @@ -13,6 +13,7 @@ EXPORT_MAP := rte_pmd_enic_version.map
>  
>  LIBABIVER := 1
>  
> +CFLAGS += -DALLOW_EXPERIMENTAL_API

Can you please add which function(s) requires this flag, as comment, both for
make and meson?
This can help figuring out when to remove this flag.

>  CFLAGS += -I$(SRCDIR)/base/
>  CFLAGS += -I$(SRCDIR)
>  CFLAGS += -O3
> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
> index f5b9b0dcb..57574a5f7 100644
> --- a/drivers/net/enic/enic_main.c
> +++ b/drivers/net/enic/enic_main.c
> @@ -448,6 +448,8 @@ enic_intr_handler(void *arg)
>  	enic_link_update(dev);
>  	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
>  	enic_log_q_error(enic);
> +	/* Re-enable irq in case of INTx */
> +	rte_intr_ack(&enic->pdev->intr_handle);
>  }
>  
>  static int enic_rxq_intr_init(struct enic *enic)
> diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
> index 1bd7cc7e1..204c97fa0 100644
> --- a/drivers/net/enic/meson.build
> +++ b/drivers/net/enic/meson.build
> @@ -1,6 +1,7 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2018 Cisco Systems, Inc.
>  
> +cflags += ['-DALLOW_EXPERIMENTAL_API']
>  sources = files(
>  	'base/vnic_cq.c',
>  	'base/vnic_dev.c',
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] net/enic: re-enable link status change interrupt
  2019-11-02  1:35 [dpdk-dev] [PATCH] net/enic: re-enable link status change interrupt Hyong Youb Kim
  2019-11-06 17:38 ` Ferruh Yigit
@ 2019-11-07 14:42 ` Hyong Youb Kim
  2019-11-07 20:33   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Hyong Youb Kim @ 2019-11-07 14:42 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim, stable

When INTx is used, the interrupt handler needs to explicitly re-enable
interrupt in order to receive another one in future. The LSC interrupt
handler currently does not, and the link state never gets updated when
INTx is used (e.g. uio_pci_generic). Call rte_intr_ack() at the end of
the handler, to re-enable INTx.

Fixes: fefed3d1e62c ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
v2: spell out experimental APIs used

 drivers/net/enic/Makefile    | 2 ++
 drivers/net/enic/enic_main.c | 2 ++
 drivers/net/enic/meson.build | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile
index 10736a567..4e0c83da5 100644
--- a/drivers/net/enic/Makefile
+++ b/drivers/net/enic/Makefile
@@ -13,6 +13,8 @@ EXPORT_MAP := rte_pmd_enic_version.map
 
 LIBABIVER := 1
 
+# Experimental APIs used: rte_intr_ack
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -I$(SRCDIR)/base/
 CFLAGS += -I$(SRCDIR)
 CFLAGS += -O3
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index f5b9b0dcb..57574a5f7 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -448,6 +448,8 @@ enic_intr_handler(void *arg)
 	enic_link_update(dev);
 	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
+	/* Re-enable irq in case of INTx */
+	rte_intr_ack(&enic->pdev->intr_handle);
 }
 
 static int enic_rxq_intr_init(struct enic *enic)
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 1bd7cc7e1..e5eeb5667 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -1,6 +1,8 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cisco Systems, Inc.
 
+# Experimental APIs used: rte_intr_ack
+cflags += ['-DALLOW_EXPERIMENTAL_API']
 sources = files(
 	'base/vnic_cq.c',
 	'base/vnic_dev.c',
-- 
2.22.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/enic: re-enable link status change interrupt
  2019-11-07 14:42 ` [dpdk-dev] [PATCH v2] " Hyong Youb Kim
@ 2019-11-07 20:33   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-11-07 20:33 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: dev, John Daley, stable

On 11/7/2019 2:42 PM, Hyong Youb Kim wrote:
> When INTx is used, the interrupt handler needs to explicitly re-enable
> interrupt in order to receive another one in future. The LSC interrupt
> handler currently does not, and the link state never gets updated when
> INTx is used (e.g. uio_pci_generic). Call rte_intr_ack() at the end of
> the handler, to re-enable INTx.
> 
> Fixes: fefed3d1e62c ("enic: new driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-07 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02  1:35 [dpdk-dev] [PATCH] net/enic: re-enable link status change interrupt Hyong Youb Kim
2019-11-06 17:38 ` Ferruh Yigit
2019-11-07 14:42 ` [dpdk-dev] [PATCH v2] " Hyong Youb Kim
2019-11-07 20:33   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).