DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Matej Vido <vido@cesnet.cz>
Cc: Michael McConville <mmcco@mykolab.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
Date: Fri, 1 Dec 2017 16:54:10 -0800	[thread overview]
Message-ID: <c27364dc-4c2b-7511-1554-edcb5a162003@intel.com> (raw)
In-Reply-To: <24F37CB2-A34A-472D-88DF-3E27E0E98F78@mykolab.com>

On 11/30/2017 10:51 PM, Michael McConville wrote:
> Signed-off-by: Michael McConville <mmcco@mykolab.com>
> ---
> lib/librte_eal/bsdapp/eal/eal_memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
> index 6ba058578..2c8a4b592 100644
> --- a/lib/librte_eal/bsdapp/eal/eal_memory.c
> +++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
> @@ -155,7 +155,7 @@ rte_eal_hugepage_attach(void)
>        /* Map the shared hugepage_info into the process address spaces */
>        hpi = mmap(NULL, sizeof(struct hugepage_info), PROT_READ, MAP_PRIVATE,
>                        fd_hugepage_info, 0);
> -       if (hpi == NULL) {
> +       if (hpi == MAP_FAILED) {

Hi Matej,

Can you fix same thing in szedata2 PMD please [1] ?

[1]
http://dpdk.org/browse/dpdk/tree/drivers/net/szedata2/rte_eth_szedata2.c?h=v17.11#n1556

>                RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path());
>                goto error;
>        }
> 

  parent reply	other threads:[~2017-12-02  0:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01  6:51 Michael McConville
2017-12-02  0:50 ` Ferruh Yigit
2017-12-02  0:51   ` Ferruh Yigit
2018-01-09 16:03     ` Thomas Monjalon
2017-12-02  0:54 ` Ferruh Yigit [this message]
2017-12-04  7:32   ` Matej Vido

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=c27364dc-4c2b-7511-1554-edcb5a162003@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=mmcco@mykolab.com \
    --cc=vido@cesnet.cz \
    /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).