[2/2] build: add module definitions and pci lib support
Checks
Commit Message
Added mman functions to eal exports list.
Added librte_pci support for Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
lib/librte_eal/rte_eal_exports.def | 2 ++
lib/meson.build | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
Comments
17/03/2020 01:48, Pallavi Kadam:
> Added mman functions to eal exports list.
[...]
> --- a/lib/librte_eal/rte_eal_exports.def
> +++ b/lib/librte_eal/rte_eal_exports.def
This file is generated. Only the .map can be updated.
> @@ -7,3 +7,5 @@ EXPORTS
> rte_eal_remote_launch
> rte_log
> rte_vlog
> + mmap
> + munmap
These functions should not be exported for Linux.
And in general, I think it would be better to state what is
the memory management strategy on Windows first.
Maybe we will need to use a different abstraction.
> 17/03/2020 01:48, Pallavi Kadam:
> > Added mman functions to eal exports list.
> [...]
> > --- a/lib/librte_eal/rte_eal_exports.def
> > +++ b/lib/librte_eal/rte_eal_exports.def
>
> This file is generated. Only the .map can be updated.
A minor correction: this file is not generated, it overrides generation of
*.def from *.map, see buildtools/map_to_def.py.
> > @@ -7,3 +7,5 @@ EXPORTS
> > rte_eal_remote_launch
> > rte_log
> > rte_vlog
> > + mmap
> > + munmap
>
> These functions should not be exported for Linux.
>
> And in general, I think it would be better to state what is
> the memory management strategy on Windows first.
> Maybe we will need to use a different abstraction.
I concur, this patch should be postponed at least. Hopefully we'll settle
to something regarding Windows MM at the nearest Community Call.
EAL will have to export mmap/munmap-like functions for mapping files and
anonymous pages to support library code. Depending on the approach to MM
implementation for Windows, not all mmap() calls may even translate into its
Win32 equivalent. For example, hugepage allocation on Windows will use
different approach that MMF.
Mapping device BARs can only be done using IOCTLs on Windows, so
rte_pci_map/unmap_resource() code will not work even if it compiles.
@@ -7,3 +7,5 @@ EXPORTS
rte_eal_remote_launch
rte_log
rte_vlog
+ mmap
+ munmap
@@ -33,7 +33,7 @@ libraries = [
'flow_classify', 'bpf', 'telemetry']
if is_windows
- libraries = ['kvargs','eal'] # only supported libraries for windows
+ libraries = ['kvargs','eal','pci'] # only supported libraries for windows
endif
default_cflags = machine_args