DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD
@ 2024-03-20 13:02 Tom Jones
  2024-03-21  9:50 ` Tom Jones
  2024-03-21 10:31 ` Tom Jones
  0 siblings, 2 replies; 6+ messages in thread
From: Tom Jones @ 2024-03-20 13:02 UTC (permalink / raw)
  To: jbehrens; +Cc: dev, thj

Commit 29a1c9107bb disabled interrupts on FreeBSD for the vmxnet3 driver
as they are not supported. Rx queue interrupts were missed by this
change, don't attempt to enable them on FreeBSD.

Without this change applications enabling interrupts encounter an
immediate abort on FreeBSD.

Signed-off-by: Tom Jones <thj@freebsd.org>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2707b25148..8b12967fa2 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1938,9 +1938,11 @@ vmxnet3_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 
+#ifndef RTE_EXEC_ENV_FREEBSD
 	vmxnet3_enable_intr(hw,
 			    rte_intr_vec_list_index_get(dev->intr_handle,
 							       queue_id));
+#endif
 
 	return 0;
 }
-- 
2.43.0


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

* [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD
  2024-03-20 13:02 [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD Tom Jones
@ 2024-03-21  9:50 ` Tom Jones
  2024-03-21 10:15   ` David Marchand
  2024-03-21 10:31 ` Tom Jones
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Jones @ 2024-03-21  9:50 UTC (permalink / raw)
  To: dev; +Cc: Tom Jones

Commit 29a1c9107bb disabled interrupts on FreeBSD for the vmxnet3 driver
as they are not supported. Rx queue interrupts were missed by this
change, don't attempt to enable them on FreeBSD.

Without this change applications enabling interrupts encounter an
immediate abort on FreeBSD.

Signed-off-by: Tom Jones <thj@freebsd.org>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2707b25148..ce7c347254 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1936,11 +1936,13 @@ vmxnet3_interrupt_handler(void *param)
 static int
 vmxnet3_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
+#ifndef RTE_EXEC_ENV_FREEBSD
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 
 	vmxnet3_enable_intr(hw,
 			    rte_intr_vec_list_index_get(dev->intr_handle,
 							       queue_id));
+#endif
 
 	return 0;
 }
-- 
2.43.0


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

* Re: [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD
  2024-03-21  9:50 ` Tom Jones
@ 2024-03-21 10:15   ` David Marchand
  2024-03-21 10:33     ` Tom Jones
  0 siblings, 1 reply; 6+ messages in thread
From: David Marchand @ 2024-03-21 10:15 UTC (permalink / raw)
  To: Tom Jones; +Cc: dev, Bruce Richardson

Hello Tom,

On Thu, Mar 21, 2024 at 11:00 AM Tom Jones <thj@freebsd.org> wrote:
>
> Commit 29a1c9107bb disabled interrupts on FreeBSD for the vmxnet3 driver
> as they are not supported. Rx queue interrupts were missed by this
> change, don't attempt to enable them on FreeBSD.
>
> Without this change applications enabling interrupts encounter an
> immediate abort on FreeBSD.

Thanks for the patch, you will probably want this fix backported in
LTS versions.
If so, please add a Fixes: tag and Cc: stable@dpdk.org.
I guess here, it is:
Fixes: 40d5676ff1ea ("net/vmxnet3: fix initialization on FreeBSD")

Cc: Bruce

Reading again the commitlog, I wonder if we should error out in
vmxnet3_configure_msix() if rx (and/or lsc) interrupts are requested
for FreeBSD.
Did you consider this approach?


-- 
David Marchand


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

* [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD
  2024-03-20 13:02 [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD Tom Jones
  2024-03-21  9:50 ` Tom Jones
@ 2024-03-21 10:31 ` Tom Jones
  2024-03-21 14:30   ` Ferruh Yigit
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Jones @ 2024-03-21 10:31 UTC (permalink / raw)
  To: dev; +Cc: Tom Jones, stable

Commit 29a1c9107bb disabled interrupts on FreeBSD for the vmxnet3 driver
as they are not supported. Rx queue interrupts were missed by this
change, don't attempt to enable them on FreeBSD.

Without this change applications enabling interrupts encounter an
immediate abort on FreeBSD.

Fixes: 40d5676ff1ea ("net/vmxnet3: fix initialization on FreeBSD")
Cc: stable@dpdk.org

Signed-off-by: Tom Jones <thj@freebsd.org>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2707b25148..ce7c347254 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1936,11 +1936,13 @@ vmxnet3_interrupt_handler(void *param)
 static int
 vmxnet3_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
+#ifndef RTE_EXEC_ENV_FREEBSD
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 
 	vmxnet3_enable_intr(hw,
 			    rte_intr_vec_list_index_get(dev->intr_handle,
 							       queue_id));
+#endif
 
 	return 0;
 }
-- 
2.43.0


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

* Re: [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD
  2024-03-21 10:15   ` David Marchand
@ 2024-03-21 10:33     ` Tom Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Jones @ 2024-03-21 10:33 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Bruce Richardson



On Thu, Mar 21, 2024, at 10:15, David Marchand wrote:
> Hello Tom,
>
> On Thu, Mar 21, 2024 at 11:00 AM Tom Jones <thj@freebsd.org> wrote:
>>
>> Commit 29a1c9107bb disabled interrupts on FreeBSD for the vmxnet3 driver
>> as they are not supported. Rx queue interrupts were missed by this
>> change, don't attempt to enable them on FreeBSD.
>>
>> Without this change applications enabling interrupts encounter an
>> immediate abort on FreeBSD.
>
> Thanks for the patch, you will probably want this fix backported in
> LTS versions.
> If so, please add a Fixes: tag and Cc: stable@dpdk.org.
> I guess here, it is:
> Fixes: 40d5676ff1ea ("net/vmxnet3: fix initialization on FreeBSD")

Thanks! updated

>
> Reading again the commitlog, I wonder if we should error out in
> vmxnet3_configure_msix() if rx (and/or lsc) interrupts are requested
> for FreeBSD.
> Did you consider this approach?
>

I haven't dug much futher into this. I also changed the application side (vpp) to not request interrupts. I think there are probably some other FreeBSD specific cases to explore in vmxnet3, but I don't have a great environment for testing yet.

- Tom

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

* Re: [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD
  2024-03-21 10:31 ` Tom Jones
@ 2024-03-21 14:30   ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2024-03-21 14:30 UTC (permalink / raw)
  To: Tom Jones, dev; +Cc: stable, David Marchand

On 3/21/2024 10:31 AM, Tom Jones wrote:
> Commit 29a1c9107bb disabled interrupts on FreeBSD for the vmxnet3 driver
> as they are not supported. Rx queue interrupts were missed by this
> change, don't attempt to enable them on FreeBSD.
> 
> Without this change applications enabling interrupts encounter an
> immediate abort on FreeBSD.
> 
> Fixes: 40d5676ff1ea ("net/vmxnet3: fix initialization on FreeBSD")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tom Jones <thj@freebsd.org>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

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


(
- Commit log updated slightly, removed "Commit 29a1c9107bb" references
- updated .mailmap
)

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

end of thread, other threads:[~2024-03-21 14:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 13:02 [PATCH] net/vmxnet3: Don't enable rx queue interrupts on FreeBSD Tom Jones
2024-03-21  9:50 ` Tom Jones
2024-03-21 10:15   ` David Marchand
2024-03-21 10:33     ` Tom Jones
2024-03-21 10:31 ` Tom Jones
2024-03-21 14:30   ` 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).