DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mem: fix handling return value
@ 2018-04-26  8:06 Jianfeng Tan
  2018-04-26  8:10 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Jianfeng Tan @ 2018-04-26  8:06 UTC (permalink / raw)
  To: dev; +Cc: Jianfeng Tan, Anatoly Burakov

resize_hugefile() returns either 0 (which indicates success) or -1
(which indicates failure). We failed to check the success as we
use --single-file-segments option.

Fixes: 2a04139f66b4 ("eal: add single file segments option")

Cc: Anatoly Burakov <anatoly.burakov@intel.com>

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index 1f553dd..301c34e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -419,7 +419,7 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 	if (internal_config.single_file_segments) {
 		map_offset = seg_idx * alloc_sz;
 		ret = resize_hugefile(fd, map_offset, alloc_sz, true);
-		if (ret < 1)
+		if (ret < 0)
 			goto resized;
 	} else {
 		map_offset = 0;
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] mem: fix handling return value
  2018-04-26  8:06 [dpdk-dev] [PATCH] mem: fix handling return value Jianfeng Tan
@ 2018-04-26  8:10 ` Burakov, Anatoly
  2018-04-27 21:38   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2018-04-26  8:10 UTC (permalink / raw)
  To: Jianfeng Tan, dev

On 26-Apr-18 9:06 AM, Jianfeng Tan wrote:
> resize_hugefile() returns either 0 (which indicates success) or -1
> (which indicates failure). We failed to check the success as we
> use --single-file-segments option.
> 
> Fixes: 2a04139f66b4 ("eal: add single file segments option")
> 
> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [PATCH] mem: fix handling return value
  2018-04-26  8:10 ` Burakov, Anatoly
@ 2018-04-27 21:38   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-04-27 21:38 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: dev, Burakov, Anatoly

26/04/2018 10:10, Burakov, Anatoly:
> On 26-Apr-18 9:06 AM, Jianfeng Tan wrote:
> > resize_hugefile() returns either 0 (which indicates success) or -1
> > (which indicates failure). We failed to check the success as we
> > use --single-file-segments option.
> > 
> > Fixes: 2a04139f66b4 ("eal: add single file segments option")
> > 
> > Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> > 
> > Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks

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

end of thread, other threads:[~2018-04-27 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26  8:06 [dpdk-dev] [PATCH] mem: fix handling return value Jianfeng Tan
2018-04-26  8:10 ` Burakov, Anatoly
2018-04-27 21:38   ` Thomas Monjalon

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