DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
@ 2017-12-01  6:51 Michael McConville
  2017-12-02  0:50 ` Ferruh Yigit
  2017-12-02  0:54 ` Ferruh Yigit
  0 siblings, 2 replies; 6+ messages in thread
From: Michael McConville @ 2017-12-01  6:51 UTC (permalink / raw)
  To: dev

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) {
               RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path());
               goto error;
       }
-- 
2.15.1

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

* Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
  2017-12-01  6:51 [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure Michael McConville
@ 2017-12-02  0:50 ` Ferruh Yigit
  2017-12-02  0:51   ` Ferruh Yigit
  2017-12-02  0:54 ` Ferruh Yigit
  1 sibling, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2017-12-02  0:50 UTC (permalink / raw)
  To: Michael McConville, dev

On 11/30/2017 10:51 PM, Michael McConville wrote:
> Signed-off-by: Michael McConville <mmcco@mykolab.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>


Hi Michael,

Thanks you for the patch, can you please check the contribution guide [1] for
expected patch format for next patches.

[1]
http://dpdk.org/doc/guides/contributing/patches.html

<...>

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

* Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
  2017-12-02  0:50 ` Ferruh Yigit
@ 2017-12-02  0:51   ` Ferruh Yigit
  2018-01-09 16:03     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2017-12-02  0:51 UTC (permalink / raw)
  To: Michael McConville, dev

On 12/1/2017 4:50 PM, Ferruh Yigit wrote:
> On 11/30/2017 10:51 PM, Michael McConville wrote:
>> Signed-off-by: Michael McConville <mmcco@mykolab.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> 
> Hi Michael,
> 
> Thanks you for the patch, can you please check the contribution guide [1] for
> expected patch format for next patches.

Ahh, there is checkpatch warning as well, can you make a new version of the
patch with updated patch title and warning fixed?

> 
> [1]
> http://dpdk.org/doc/guides/contributing/patches.html
> 
> <...>
> 

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

* Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
  2017-12-01  6:51 [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure Michael McConville
  2017-12-02  0:50 ` Ferruh Yigit
@ 2017-12-02  0:54 ` Ferruh Yigit
  2017-12-04  7:32   ` Matej Vido
  1 sibling, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2017-12-02  0:54 UTC (permalink / raw)
  To: Matej Vido; +Cc: Michael McConville, dev

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;
>        }
> 

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

* Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
  2017-12-02  0:54 ` Ferruh Yigit
@ 2017-12-04  7:32   ` Matej Vido
  0 siblings, 0 replies; 6+ messages in thread
From: Matej Vido @ 2017-12-04  7:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Michael McConville, dev

On 02.12.2017 01:54, Ferruh Yigit wrote:
> 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

Hi Ferruh,

I will send a patch.

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

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

* Re: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
  2017-12-02  0:51   ` Ferruh Yigit
@ 2018-01-09 16:03     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-01-09 16:03 UTC (permalink / raw)
  To: Michael McConville; +Cc: dev, Ferruh Yigit

02/12/2017 01:51, Ferruh Yigit:
> On 12/1/2017 4:50 PM, Ferruh Yigit wrote:
> > On 11/30/2017 10:51 PM, Michael McConville wrote:
> >> Signed-off-by: Michael McConville <mmcco@mykolab.com>
> > 
> > Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > 
> > 
> > Hi Michael,
> > 
> > Thanks you for the patch, can you please check the contribution guide [1] for
> > expected patch format for next patches.
> 
> Ahh, there is checkpatch warning as well, can you make a new version of the
> patch with updated patch title and warning fixed?

Fixed and applied, thanks

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

end of thread, other threads:[~2018-01-09 16:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01  6:51 [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure 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
2017-12-04  7:32   ` Matej Vido

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