@@ -12,6 +12,8 @@ AM_CFLAGS += -I$(srcdir)/include/api
AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include
AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include/api
AM_CFLAGS += -I$(top_srcdir)/helper/include
+# Disable cast errors until the problem in netmap_user.h is fixed upstream
+AM_CFLAGS += -Wno-cast-qual
include_HEADERS = \
$(top_srcdir)/platform/linux-generic/include/api/odp.h \
@@ -22,28 +22,35 @@ at runtime.
2. Build
==================================
-2.1 Building netmap
---------------------
+ODP works with the latest release version of netmap, which is currently at API
+version 11.1.
-Netmap is currently hosted on https://code.google.com/p/netmap/ but
-ODP only works at this point with netmap API version 10 so you will need
-a specific revision of netmap.
+2.1 Build netmap
+----------------
+
+Netmap is currently hosted on https://code.google.com/p/netmap/
git clone https://code.google.com/p/netmap/
cd netmap
- git reset --hard 1f462ef
+ git co v11.1
+
+This is enough to build ODP, if you don't want to build netmap kernel modules
+you can jump to section 2.2.
+
+2.3 Building netmap kernel modules
+----------------------------------
-Netmap consists of a core kernel module (netmap_lin.ko) and optional modified
-device drivers.
+Netmap consists of a core kernel module (netmap.ko), optional modified
+device drivers and user space API headers to access the netmap functionality.
Netmap builds as an out-of-tree kernel module, you need matching kernel sources
to compile it. General build instructions can be found in the packet README:
-http://code.google.com/p/netmap/source/browse/README
+https://code.google.com/p/netmap/source/browse/LINUX/README
-2.1.1 Building netmap on Ubuntu with stock kernel
+2.1.1 Building netmap kernel modules on Ubuntu with stock kernel
If you are running Ubuntu/Debian with the stock kernel and you want to compile
-both netmap_lin.ko and modified drivers, these steps will guide you through it.
+both netmap.ko and modified drivers, these steps will guide you through it.
You will need the linux-headers and linux-source packages for this.
@@ -53,21 +60,24 @@ You will need the linux-headers and linux-source packages for this.
The source archive will be placed in /usr/src/linux-source-<kernel-version>
You will need to locate it and extract it to a convenient place.
-Now compile netmap:
+To compile:
cd LINUX
- make SRC=<path_to_kernel_source>
+ ./configure --kernel-sources=<path_to_kernel_src>
+ make
-2.1.2 Building netmap for kernel built from sources
+2.1.2 Building netmap kernel modules for kernel built from sources
cd LINUX
- make KSRC=<path_to_kernel_source>
+ ./configure --kernel-dir=<path_to_kernel_tree>
+ make
2.2 Building ODP
----------------
The default platform is linux-netmap, if you want linux-generic you need to
-specify it to configure --with-platform.
+specify it using configure --with-platform.
+
The --with-sdk-install-path can be used to point to the netmap sources.
@@ -29,7 +29,7 @@ typedef struct {
size_t max_frame_len; /**< max frame len = buf_size - sizeof(pkt_hdr) */
size_t frame_offset; /**< frame start offset from start of pkt buf */
size_t buf_size; /**< size of buffer payload in 'pool' */
- struct nm_desc_t *nm_desc;
+ struct nm_desc *nm_desc;
uint32_t begin;
uint32_t end;
struct netmap_ring *rxring;
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> --- platform/linux-netmap/Makefile.am | 2 ++ platform/linux-netmap/README | 42 ++++++++++++++--------- platform/linux-netmap/include/odp_packet_netmap.h | 2 +- 3 files changed, 29 insertions(+), 17 deletions(-)