patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] memory: fix alignment in eal_get_virtual_area()
@ 2018-06-13 19:08 Dariusz Stojaczyk
  2018-06-14  7:29 ` Burakov, Anatoly
  2018-07-16 12:58 ` Burakov, Anatoly
  0 siblings, 2 replies; 10+ messages in thread
From: Dariusz Stojaczyk @ 2018-06-13 19:08 UTC (permalink / raw)
  To: dev, Anatoly Burakov; +Cc: Dariusz Stojaczyk, stable

Although the alignment mechanism works as intended, the
`no_align` bool flag was set incorrectly. We were aligning
buffers that didn't need extra alignment, and weren't
aligning ones that really needed it.

Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory")
Cc: anatoly.burakov@intel.com
Cc: stable@dpdk.org

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
---
 lib/librte_eal/common/eal_common_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 4f0688f..a7c89f0 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -70,7 +70,7 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 	 * system page size is the same as requested page size.
 	 */
 	no_align = (requested_addr != NULL &&
-		((uintptr_t)requested_addr & (page_sz - 1)) == 0) ||
+		((uintptr_t)requested_addr & (page_sz - 1))) ||
 		page_sz == system_page_sz;
 
 	do {
-- 
2.7.4

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

end of thread, other threads:[~2018-07-17  9:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-13 19:08 [dpdk-stable] [PATCH] memory: fix alignment in eal_get_virtual_area() Dariusz Stojaczyk
2018-06-14  7:29 ` Burakov, Anatoly
2018-07-12 21:52   ` Thomas Monjalon
2018-07-16 12:58 ` Burakov, Anatoly
2018-07-16 13:29   ` Stojaczyk, DariuszX
2018-07-16 14:01     ` Burakov, Anatoly
2018-07-16 14:16       ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
2018-07-17  9:53         ` Stojaczyk, DariuszX
2018-07-17  9:22       ` Xu, Qian Q
2018-07-17  9:25         ` Burakov, Anatoly

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