From patchwork Fri Nov 14 12:48:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 40827 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7DEDF240ED for ; Fri, 14 Nov 2014 12:49:02 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id b13sf8892474wgh.2 for ; Fri, 14 Nov 2014 04:49:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=IXsQ1I/Jj+S5T9r3OvmY0XkjC6RcNvVKIjTPj/84jpk=; b=OSGrdouqJ+1IeSbfiYGtoNNdpwvG9R/WyH0jMJ/vkuAwUBE7w6n+UdMrLbHDwdY4sx +bQE1GWupVIPpf1337/zm0p6evp7wQRtz5YefvZdB5Nk1B+6f7cZyQFFLEbdPrhqDN8o G4gb509451amlxD8j2hi++GkkVQabn1Zjg5eG7D+qhM7u2ri/2qBJRdgOXI6LMSO8suy XqI4ViKf5ggRTmWwt/YUuU48rjEnZTXSlU3y6GdhL4LO97QZ4Xm40v0pqzg2eEfHsGKJ k7CL+f+wG1AEeA+KwDGPH06dDXHVZ+JO1Wc17dlTjLHTEXJFuBqoTMeqooJDhoXIkw93 2WOg== X-Gm-Message-State: ALoCoQnd0VLyUtSt+3GkpWA/AcI4bye8er0MkHUlbihn4UwiuaScYgmSDFe+t/bPXM6cAy/M4ZUv X-Received: by 10.112.32.163 with SMTP id k3mr345163lbi.17.1415969341758; Fri, 14 Nov 2014 04:49:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.201 with SMTP id s9ls613732laj.100.gmail; Fri, 14 Nov 2014 04:49:01 -0800 (PST) X-Received: by 10.112.151.70 with SMTP id uo6mr8040754lbb.2.1415969341508; Fri, 14 Nov 2014 04:49:01 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id sd7si41606031lbb.51.2014.11.14.04.49.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 04:49:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id ge10so15010327lab.2 for ; Fri, 14 Nov 2014 04:49:01 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr8019086lbc.66.1415969341427; Fri, 14 Nov 2014 04:49:01 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp757611lbc; Fri, 14 Nov 2014 04:48:59 -0800 (PST) X-Received: by 10.140.86.135 with SMTP id p7mr11267743qgd.54.1415969338763; Fri, 14 Nov 2014 04:48:58 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id dc5si15282822qcb.20.2014.11.14.04.48.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Nov 2014 04:48:58 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XpGJ6-0005Qi-Te; Fri, 14 Nov 2014 12:48:56 +0000 Received: from mail-la0-f48.google.com ([209.85.215.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XpGIx-0005PK-Tf for lng-odp@lists.linaro.org; Fri, 14 Nov 2014 12:48:48 +0000 Received: by mail-la0-f48.google.com with SMTP id s18so1067410lam.7 for ; Fri, 14 Nov 2014 04:48:42 -0800 (PST) X-Received: by 10.152.87.18 with SMTP id t18mr8202432laz.0.1415969321962; Fri, 14 Nov 2014 04:48:41 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id r4sm8175438lar.3.2014.11.14.04.48.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 04:48:41 -0800 (PST) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Fri, 14 Nov 2014 14:48:22 +0200 Message-Id: <1415969305-13255-2-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1415969305-13255-1-git-send-email-ciprian.barbu@linaro.org> References: <1415969305-13255-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 NETMAP 1/4] Update to netmap_v11.1 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ciprian.barbu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Ciprian Barbu --- 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(-) diff --git a/platform/linux-netmap/Makefile.am b/platform/linux-netmap/Makefile.am index eae382a..0b08cad 100644 --- a/platform/linux-netmap/Makefile.am +++ b/platform/linux-netmap/Makefile.am @@ -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 \ diff --git a/platform/linux-netmap/README b/platform/linux-netmap/README index abcb187..4ddcc84 100644 --- a/platform/linux-netmap/README +++ b/platform/linux-netmap/README @@ -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- You will need to locate it and extract it to a convenient place. -Now compile netmap: +To compile: cd LINUX - make SRC= + ./configure --kernel-sources= + 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= + ./configure --kernel-dir= + 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. diff --git a/platform/linux-netmap/include/odp_packet_netmap.h b/platform/linux-netmap/include/odp_packet_netmap.h index b4c523f..576385d 100644 --- a/platform/linux-netmap/include/odp_packet_netmap.h +++ b/platform/linux-netmap/include/odp_packet_netmap.h @@ -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;