From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw126247 [PATCH] [v2] mempool: optimize get objects with constant n
Date: Tue, 18 Apr 2023 19:35:38 +0000 (UTC) [thread overview]
Message-ID: <20230418193538.0B33C60095@dpdk-ubuntu.dpdklab.iol.unh.edu> (raw)
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
next reply other threads:[~2023-04-18 19:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 19:35 dpdklab [this message]
[not found] <20230418155730.9911-1-mb@smartsharesystems.com>
2023-04-18 15:45 ` |WARNING| pw126247 [PATCH v2] " qemudev
2023-04-18 15:58 ` checkpatch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230418193538.0B33C60095@dpdk-ubuntu.dpdklab.iol.unh.edu \
--to=dpdklab@iol.unh.edu \
--cc=dpdk-test-reports@iol.unh.edu \
--cc=test-report@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).