[dpdk-stable] patch 'test/interrupt: account for race with callback' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:32:44 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 59a289f01f0e8dcfbe3bc1848abd36c764bf7bc6 Mon Sep 17 00:00:00 2001
From: Aaron Conole <aconole at redhat.com>
Date: Thu, 8 Aug 2019 13:38:35 -0400
Subject: [PATCH] test/interrupt: account for race with callback

[ upstream commit 73afc9df00d8ba4ff58d4a7a86691ca10520d462 ]

Because the eal interrupt framework can race when invoking the callback
and a separate unregister call, the test needs to accommodate the chance
that the two collide.  Do this by checking the return value of unregister
against the race-condition flag (EAGAIN).

Fixes: f1a6c22424ce ("app/test: update interrupts test")

Signed-off-by: Aaron Conole <aconole at redhat.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 test/test/test_interrupts.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/test/test_interrupts.c b/test/test/test_interrupts.c
index e0cd8a82fc..fedd34b0ef 100644
--- a/test/test/test_interrupts.c
+++ b/test/test/test_interrupts.c
@@ -378,9 +378,13 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)
 		rte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL);
 
 	rte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL);
-	if (rte_intr_callback_unregister(&test_intr_handle,
-			test_interrupt_callback, &test_intr_handle) < 0)
-		return -1;
+	while ((count =
+		rte_intr_callback_unregister(&test_intr_handle,
+					     test_interrupt_callback,
+					     &test_intr_handle)) < 0) {
+		if (count != -EAGAIN)
+			return -1;
+	}
 
 	if (flag == 0) {
 		printf("callback has not been called\n");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:27.013971218 +0000
+++ 0017-test-interrupt-account-for-race-with-callback.patch	2019-12-19 14:32:25.449284817 +0000
@@ -1,27 +1,28 @@
-From 73afc9df00d8ba4ff58d4a7a86691ca10520d462 Mon Sep 17 00:00:00 2001
+From 59a289f01f0e8dcfbe3bc1848abd36c764bf7bc6 Mon Sep 17 00:00:00 2001
 From: Aaron Conole <aconole at redhat.com>
 Date: Thu, 8 Aug 2019 13:38:35 -0400
 Subject: [PATCH] test/interrupt: account for race with callback
 
+[ upstream commit 73afc9df00d8ba4ff58d4a7a86691ca10520d462 ]
+
 Because the eal interrupt framework can race when invoking the callback
 and a separate unregister call, the test needs to accommodate the chance
 that the two collide.  Do this by checking the return value of unregister
 against the race-condition flag (EAGAIN).
 
 Fixes: f1a6c22424ce ("app/test: update interrupts test")
-Cc: stable at dpdk.org
 
 Signed-off-by: Aaron Conole <aconole at redhat.com>
 Reviewed-by: David Marchand <david.marchand at redhat.com>
 ---
- app/test/test_interrupts.c | 10 +++++++---
+ test/test/test_interrupts.c | 10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
 
-diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
-index d8c2d8124a..233b14a70b 100644
---- a/app/test/test_interrupts.c
-+++ b/app/test/test_interrupts.c
-@@ -370,9 +370,13 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)
+diff --git a/test/test/test_interrupts.c b/test/test/test_interrupts.c
+index e0cd8a82fc..fedd34b0ef 100644
+--- a/test/test/test_interrupts.c
++++ b/test/test/test_interrupts.c
+@@ -378,9 +378,13 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)
  		rte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL);
  
  	rte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL);


More information about the stable mailing list