automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw117374-117373 [PATCH] [v2, 6/6] service: provide links to functions in documentation
@ 2022-10-05  9:39 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-10-05  9:39 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 6140 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/117374

_apply patch failure_

Submitter: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Date: Wednesday, October 05 2022 09:16:15 
Applied on: CommitID:d5262b521d096349e9e96b436f90eee6554ba595
Apply patch set 117374-117373 failed:

Checking patch lib/eal/common/rte_service.c...
error: while searching for:
	 * on currently.
	 */
	uint32_t num_mapped_cores;

	/* 32-bit builds won't naturally align a uint64_t, so force alignment,
	 * allowing regular reads to be atomic.
	 */
	uint64_t calls __rte_aligned(8);
	uint64_t cycles_spent __rte_aligned(8);
} __rte_cache_aligned;

/* Mask used to ensure uint64_t 8 byte vars are naturally aligned. */
#define RTE_SERVICE_STAT_ALIGN_MASK (8 - 1)

/* the internal values of a service core */
struct core_state {

error: patch failed: lib/eal/common/rte_service.c:50
Hunk #2 succeeded at 63 (offset -3 lines).
Hunk #3 succeeded at 131 (offset -3 lines).
Hunk #4 succeeded at 151 (offset -3 lines).
Hunk #5 succeeded at 213 (offset -3 lines).
Hunk #6 succeeded at 250 (offset -3 lines).
error: while searching for:
{
	void *userdata = s->spec.callback_userdata;

	/* Ensure the atomically stored variables are naturally aligned,
	 * as required for regular loads to be atomic.
	 */
	RTE_BUILD_BUG_ON((offsetof(struct rte_service_spec_impl, calls)
		& RTE_SERVICE_STAT_ALIGN_MASK) != 0);
	RTE_BUILD_BUG_ON((offsetof(struct rte_service_spec_impl, cycles_spent)
		& RTE_SERVICE_STAT_ALIGN_MASK) != 0);

	if (service_stats_enabled(s)) {
		uint64_t start = rte_rdtsc();
		s->spec.callback(userdata);
		uint64_t end = rte_rdtsc();
		uint64_t cycles = end - start;
		cs->calls_per_service[service_idx]++;
		if (service_mt_safe(s)) {
			__atomic_fetch_add(&s->cycles_spent, cycles, __ATOMIC_RELAXED);
			__atomic_fetch_add(&s->calls, 1, __ATOMIC_RELAXED);
		} else {
			uint64_t cycles_new = s->cycles_spent + cycles;
			uint64_t calls_new = s->calls++;
			__atomic_store_n(&s->cycles_spent, cycles_new, __ATOMIC_RELAXED);
			__atomic_store_n(&s->calls, calls_new, __ATOMIC_RELAXED);
		}
	} else
		s->spec.callback(userdata);
}

error: patch failed: lib/eal/common/rte_service.c:366
Hunk #8 succeeded at 416 (offset -17 lines).
Hunk #9 succeeded at 463 (offset -17 lines).
Hunk #10 succeeded at 589 (offset -17 lines).
Hunk #11 succeeded at 794 (offset -17 lines).
Hunk #12 succeeded at 884 (offset -17 lines).
Hunk #13 succeeded at 894 (offset -17 lines).
Hunk #14 succeeded at 926 (offset -17 lines).
Hunk #15 succeeded at 955 (offset -17 lines).
Hunk #16 succeeded at 973 (offset -17 lines).
Applying patch lib/eal/common/rte_service.c with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Rejected hunk #7.
Hunk #8 applied cleanly.
Hunk #9 applied cleanly.
Hunk #10 applied cleanly.
Hunk #11 applied cleanly.
Hunk #12 applied cleanly.
Hunk #13 applied cleanly.
Hunk #14 applied cleanly.
Hunk #15 applied cleanly.
Hunk #16 applied cleanly.
diff a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c	(rejected hunks)
@@ -50,16 +50,12 @@ struct rte_service_spec_impl {
 	 * on currently.
 	 */
 	uint32_t num_mapped_cores;
-
-	/* 32-bit builds won't naturally align a uint64_t, so force alignment,
-	 * allowing regular reads to be atomic.
-	 */
-	uint64_t calls __rte_aligned(8);
-	uint64_t cycles_spent __rte_aligned(8);
 } __rte_cache_aligned;
 
-/* Mask used to ensure uint64_t 8 byte vars are naturally aligned. */
-#define RTE_SERVICE_STAT_ALIGN_MASK (8 - 1)
+struct service_stats {
+	uint64_t calls;
+	uint64_t cycles;
+};
 
 /* the internal values of a service core */
 struct core_state {
@@ -366,29 +365,27 @@ service_runner_do_callback(struct rte_service_spec_impl *s,
 {
 	void *userdata = s->spec.callback_userdata;
 
-	/* Ensure the atomically stored variables are naturally aligned,
-	 * as required for regular loads to be atomic.
-	 */
-	RTE_BUILD_BUG_ON((offsetof(struct rte_service_spec_impl, calls)
-		& RTE_SERVICE_STAT_ALIGN_MASK) != 0);
-	RTE_BUILD_BUG_ON((offsetof(struct rte_service_spec_impl, cycles_spent)
-		& RTE_SERVICE_STAT_ALIGN_MASK) != 0);
-
 	if (service_stats_enabled(s)) {
 		uint64_t start = rte_rdtsc();
 		s->spec.callback(userdata);
 		uint64_t end = rte_rdtsc();
 		uint64_t cycles = end - start;
-		cs->calls_per_service[service_idx]++;
-		if (service_mt_safe(s)) {
-			__atomic_fetch_add(&s->cycles_spent, cycles, __ATOMIC_RELAXED);
-			__atomic_fetch_add(&s->calls, 1, __ATOMIC_RELAXED);
-		} else {
-			uint64_t cycles_new = s->cycles_spent + cycles;
-			uint64_t calls_new = s->calls++;
-			__atomic_store_n(&s->cycles_spent, cycles_new, __ATOMIC_RELAXED);
-			__atomic_store_n(&s->calls, calls_new, __ATOMIC_RELAXED);
-		}
+
+		/* The lcore service worker thread is the only writer,
+		 * and thus only a non-atomic load and an atomic store
+		 * is needed, and not the more expensive atomic
+		 * add.
+		 */
+		struct service_stats *service_stats =
+			&cs->service_stats[service_idx];
+
+		__atomic_store_n(&service_stats->calls,
+				 service_stats->calls + 1,
+				 __ATOMIC_RELAXED);
+
+		__atomic_store_n(&service_stats->cycles,
+				 service_stats->cycles + cycles,
+				 __ATOMIC_RELAXED);
 	} else
 		s->spec.callback(userdata);
 }
Checking patch app/test/test_service_cores.c...
Checking patch lib/eal/common/rte_service.c...
error: lib/eal/common/rte_service.c: does not match index
Checking patch lib/eal/include/rte_service.h...
Applied patch app/test/test_service_cores.c cleanly.
Applied patch lib/eal/include/rte_service.h cleanly.
Checking patch lib/eal/common/rte_service.c...
error: lib/eal/common/rte_service.c: does not match index
Checking patch lib/eal/common/rte_service.c...
error: lib/eal/common/rte_service.c: does not match index
Checking patch lib/eal/include/rte_service_component.h...
Applied patch lib/eal/include/rte_service_component.h cleanly.
Checking patch lib/eal/include/rte_service.h...
error: lib/eal/include/rte_service.h: does not match index

https://lab.dpdk.org/results/dashboard/patchsets/23777/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-05  9:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05  9:39 |WARNING| pw117374-117373 [PATCH] [v2, 6/6] service: provide links to functions in documentation dpdklab

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).