From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] net/tap: fix build issue with ARM32 Date: Wed, 31 Jan 2018 15:53:54 +0530 Message-ID: <20180131102352.GA24477@jerin> References: <20180131051408.3652-1-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "dev@dpdk.org" , Thomas Monjalon , Pascal Mazon , Jan Viktorin , Jianbo Liu To: Ophir Munk Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0041.outbound.protection.outlook.com [104.47.37.41]) by dpdk.org (Postfix) with ESMTP id 075031B76B for ; Wed, 31 Jan 2018 11:24:18 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Wed, 31 Jan 2018 09:59:45 +0000 > From: Ophir Munk > To: Jerin Jacob , "dev@dpdk.org" > > CC: Thomas Monjalon , Pascal Mazon > , Jan Viktorin , Jianbo > Liu > Subject: RE: [dpdk-dev] [PATCH] net/tap: fix build issue with ARM32 > > Hi, > Please see comments inline > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob > > Sent: Wednesday, January 31, 2018 7:14 AM > > To: dev@dpdk.org > > Cc: Thomas Monjalon ; Jerin Jacob > > ; Pascal Mazon > > ; Jan Viktorin ; > > Jianbo Liu > > Subject: [dpdk-dev] [PATCH] net/tap: fix build issue with ARM32 > > > > arm32 Linux does not support eBPF interface. > > Since tap PMD driver has a dependency on eBPF(the symbol __NR_bpf), > > disabling it armv7 config. > > > > compilation error log: > > In file included from /tmp/dpdk/drivers/net/tap/tap_bpf_api.c:15:0: > > /tmp/dpdk/drivers/net/tap/tap_bpf.h:103:4: error: #error __NR_bpf not > > defined # error __NR_bpf not defined > > ^ > > arm architecture is missing is file drivers/tap/tap_bpf.h > I suggest adding it, for example > > # elif defined(__arm__) > # define __NR_bpf 386 By looking at Linux source code http://elixir.free-electrons.com/linux/v4.15/source/tools/build/feature/test-bpf.c#L6 I am not sure, Is eBPF support available for arm32 support? > > It should work for you. Can you please try it? I don't have access to an arm32 board. I was facing cross compilation build issue with arm32. > If it doesn't work for you, please have a look in this link: > https://sourceforge.net/p/predef/wiki/Architectures/ > where you can see more arm architecture definitions. > You should find the one suitable for you. I guess, it is not just matter of enabling the build for arm32. It should work at runtime too, If some can confirm following addition in the drivers/net/tap/tap_bpf.h works then we can add it. # elif defined(__arm__) # define __NR_bpf 386 > > > /tmp/dpdk/drivers/net/tap/tap_bpf_api.c: In function ‘sys_bpf’: > > /tmp/dpdk/drivers/net/tap/tap_bpf_api.c:92:17: error: ‘__NR_bpf’ > > undeclared (first use in this function) > > return syscall(__NR_bpf, cmd, attr, size); > > ^ > > /tmp/dpdk/drivers/net/tap/tap_bpf_api.c:92:17: note: each undeclared > > identifier is reported only once for each function it appears in > > /tmp/dpdk/drivers/net/tap/tap_bpf_api.c:93:1: error: control reaches end of > > non-void function [-Werror=return-type] } ^ > > cc1: all warnings being treated as errors > > > > Fixes: b02d85e1 ("net/tap: add eBPF API") > > > > Cc: Pascal Mazon > > Cc: Jan Viktorin > > Cc: Jianbo Liu > > > > Signed-off-by: Jerin Jacob > > --- > > config/defconfig_arm-armv7a-linuxapp-gcc | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc > > b/config/defconfig_arm-armv7a-linuxapp-gcc > > index a20b7a85f..4a55bb397 100644 > > --- a/config/defconfig_arm-armv7a-linuxapp-gcc > > +++ b/config/defconfig_arm-armv7a-linuxapp-gcc > > @@ -80,3 +80,4 @@ CONFIG_RTE_LIBRTE_BNX2X_PMD=n > > CONFIG_RTE_LIBRTE_QEDE_PMD=n CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n > > CONFIG_RTE_LIBRTE_AVP_PMD=n > > +CONFIG_RTE_LIBRTE_PMD_TAP=n > > -- > > I suggest fixing the compilation issue by adding the missing architecture system call number > (as suggested above) instead of disabling TAP compilation by default > > > 2.16.1 >