Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-15 Thread David Marchand
On Fri, Jul 10, 2020 at 6:17 PM Thomas Monjalon wrote: > The problem is that we have an API which is taking mmap flags as input. > "int additional_flags" is a parameter of the function, > and are supposed to be mmap flags. But it is not stated clearly. > When Windows will use this function, it won

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-13 Thread Burakov, Anatoly
On 10-Jul-20 5:17 PM, Thomas Monjalon wrote: 10/07/2020 17:39, Burakov, Anatoly: On 10-Jul-20 12:53 PM, Thomas Monjalon wrote: The function pci_map_resource() returns MAP_FAILED in case of error. When replacing the call to mmap() by rte_mem_map(), the error code became NULL, breaking the API. T

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Ma, LihongX
, Bruce ; dmitry.kozl...@gmail.com; navas...@linux.microsoft.com; dmit...@microsoft.com; Kadam, Pallavi ; tal...@mellanox.com Subject: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values The function pci_map_resource() returns MAP_FAILED in case of error. When replacing the call to

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Thomas Monjalon
10/07/2020 20:31, Dmitry Kozlyuk: > On Fri, 10 Jul 2020 13:53:24 +0200, Thomas Monjalon wrote: > > --- /dev/null > > +++ b/lib/librte_eal/windows/include/sys/mman.h > > @@ -0,0 +1,9 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright 2020 Mellanox Technologies, Ltd > > + */ > > + > >

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Dmitry Kozlyuk
My apologies for not examining mmap() usage thoroughly enough when designing these internal APIs. I support your suggestion to move PCI mapping functions to bus driver after proper deprecation. On Fri, 10 Jul 2020 13:53:24 +0200, Thomas Monjalon wrote: [snip] > diff --git a/lib/librte_eal/include/

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Thomas Monjalon
10/07/2020 13:53, Thomas Monjalon: > The function pci_map_resource() returns MAP_FAILED in case of error. > When replacing the call to mmap() by rte_mem_map(), > the error code became NULL, breaking the API. > This function is probably not used outside of DPDK, > but it is still a problem for two r

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Thomas Monjalon
10/07/2020 17:39, Burakov, Anatoly: > On 10-Jul-20 12:53 PM, Thomas Monjalon wrote: > > The function pci_map_resource() returns MAP_FAILED in case of error. > > When replacing the call to mmap() by rte_mem_map(), > > the error code became NULL, breaking the API. > > This function is probably not us

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Burakov, Anatoly
On 10-Jul-20 12:53 PM, Thomas Monjalon wrote: The function pci_map_resource() returns MAP_FAILED in case of error. When replacing the call to mmap() by rte_mem_map(), the error code became NULL, breaking the API. This function is probably not used outside of DPDK, but it is still a problem for tw

Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread David Marchand
On Fri, Jul 10, 2020 at 1:53 PM Thomas Monjalon wrote: > > The function pci_map_resource() returns MAP_FAILED in case of error. > When replacing the call to mmap() by rte_mem_map(), > the error code became NULL, breaking the API. > This function is probably not used outside of DPDK, > but it is st

[dpdk-dev] [PATCH] pci: keep API compatibility with mmap values

2020-07-10 Thread Thomas Monjalon
The function pci_map_resource() returns MAP_FAILED in case of error. When replacing the call to mmap() by rte_mem_map(), the error code became NULL, breaking the API. This function is probably not used outside of DPDK, but it is still a problem for two reasons: - the deprecation process was