* |WARNING| pw126247 [PATCH] [v2] mempool: optimize get objects with constant n
@ 2023-04-18 19:35 dpdklab
0 siblings, 0 replies; 3+ messages in thread
From: dpdklab @ 2023-04-18 19:35 UTC (permalink / raw)
To: test-report; +Cc: dpdk-test-reports
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/126247
_apply patch failure_
Submitter: Morten Brorup <mb@smartsharesystems.com>
Date: Tuesday, April 18 2023 15:57:30
Applied on: CommitID:3b3fef9de22af80d173453ab65a80b01ce38cbfd
Apply patch set 126247 failed:
Checking patch lib/mempool/rte_mempool.h...
error: while searching for:
unsigned int n, struct rte_mempool_cache *cache)
{
int ret;
unsigned int remaining = n;
uint32_t index, len;
void **cache_objs;
/* No cache provided */
if (unlikely(cache == NULL))
goto driver_dequeue;
cache_objs = &cache->objs[cache->len];
error: patch failed: lib/mempool/rte_mempool.h:1492
error: while searching for:
return 0;
}
/* Use the cache as much as we have to return hot objects first */
len = __extension__(__builtin_constant_p(n)) ? cache->len :
RTE_MIN(remaining, cache->len);
cache->len -= len;
remaining -= len;
for (index = 0; index < len; index++)
*obj_table++ = *--cache_objs;
if (!__extension__(__builtin_constant_p(n)) && remaining == 0) {
/* The entire request is satisfied from the cache. */
error: patch failed: lib/mempool/rte_mempool.h:1518
Applying patch lib/mempool/rte_mempool.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
hint: Use 'git am --show-current-patch' to see the failed patch
diff a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h (rejected hunks)
@@ -1492,13 +1492,15 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,
unsigned int n, struct rte_mempool_cache *cache)
{
int ret;
- unsigned int remaining = n;
+ unsigned int remaining;
uint32_t index, len;
void **cache_objs;
/* No cache provided */
- if (unlikely(cache == NULL))
+ if (unlikely(cache == NULL)) {
+ remaining = n;
goto driver_dequeue;
+ }
cache_objs = &cache->objs[cache->len];
@@ -1518,14 +1520,23 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,
return 0;
}
- /* Use the cache as much as we have to return hot objects first */
+ /*
+ * Use the cache as much as we have to return hot objects first.
+ * If the request size 'n' is known at build time, the above comparison
+ * ensures that n > cache->len here, so omit RTE_MIN().
+ */
len = __extension__(__builtin_constant_p(n)) ? cache->len :
- RTE_MIN(remaining, cache->len);
+ RTE_MIN(n, cache->len);
cache->len -= len;
- remaining -= len;
+ remaining = n - len;
for (index = 0; index < len; index++)
*obj_table++ = *--cache_objs;
+ /*
+ * If the request size 'n' is known at build time, the case
+ * where the entire request can be satisfied from the cache
+ * has already been handled above, so omit handling it here.
+ */
if (!__extension__(__builtin_constant_p(n)) && remaining == 0) {
/* The entire request is satisfied from the cache. */
https://lab.dpdk.org/results/dashboard/patchsets/26038/
UNH-IOL DPDK Community Lab
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20230418155730.9911-1-mb@smartsharesystems.com>]
end of thread, other threads:[~2023-04-18 19:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 19:35 |WARNING| pw126247 [PATCH] [v2] mempool: optimize get objects with constant n dpdklab
[not found] <20230418155730.9911-1-mb@smartsharesystems.com>
2023-04-18 15:45 ` |WARNING| pw126247 [PATCH v2] " qemudev
2023-04-18 15:58 ` checkpatch
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).