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 18:10:44 +0530 Message-ID: <20180131124042.GA5540@jerin> References: <20180131051408.3652-1-jerin.jacob@caviumnetworks.com> <20180131102352.GA24477@jerin> <20180131113049.GA30737@jerin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , Thomas Monjalon , Pascal Mazon , Jan Viktorin , Jianbo Liu To: Ophir Munk Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0087.outbound.protection.outlook.com [104.47.33.87]) by dpdk.org (Postfix) with ESMTP id 99A4D1B7A1 for ; Wed, 31 Jan 2018 13:41:17 +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 11:57:10 +0000 > From: Ophir Munk > To: Jerin Jacob > CC: "dev@dpdk.org" , Thomas Monjalon , > Pascal Mazon , Jan Viktorin > , Jianbo Liu > Subject: RE: [dpdk-dev] [PATCH] net/tap: fix build issue with ARM32 > > > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Wednesday, January 31, 2018 1:31 PM > > To: Ophir Munk > > Cc: dev@dpdk.org; Thomas Monjalon ; Pascal > > Mazon ; Jan Viktorin > > ; Jianbo Liu > > Subject: Re: [dpdk-dev] [PATCH] net/tap: fix build issue with ARM32 > > > > -----Original Message----- > > > Date: Wed, 31 Jan 2018 10:38:32 +0000 > > > From: Ophir Munk > > > To: Jerin Jacob > > > CC: "dev@dpdk.org" , Thomas Monjalon > > > , Pascal Mazon , > > Jan > > > Viktorin , Jianbo Liu > > > Subject: RE: [dpdk-dev] [PATCH] net/tap: fix build issue with ARM32 > > > > > > Hi, > > > Please see inline > > > > > > > -----Original Message----- > > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > > > Sent: Wednesday, January 31, 2018 12:24 PM > > > > To: Ophir Munk > > > > Cc: dev@dpdk.org; Thomas Monjalon ; Pascal > > > > Mazon ; Jan Viktorin > > > > ; Jianbo Liu > > > > Subject: Re: [dpdk-dev] [PATCH] net/tap: fix build issue with ARM32 > > > > > > > > -----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 > > > > > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fel > > > > ixi > > > > r.free- > > > > > > electrons.com%2Flinux%2Fv4.15%2Fsource%2Ftools%2Fbuild%2Ffeature%2 > > > > Ftest- > > > > > > bpf.c%23L6&data=02%7C01%7Cophirmu%40mellanox.com%7C19f50ad7f27 > > > > > > 34d00173808d56894c997%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0% > > > > > > 7C0%7C636529910613736017&sdata=ynsxHG9fvao4LyfWLo4GVJjlKNmcF0q > > > > 0BkFocJyarAE%3D&reserved=0 > > > > I am not sure, Is eBPF support available for arm32 support? > > > > > > TAP eBPF has a graceful approach: it must successfully compile on all > > > Linux distributions. If a specific kernel cannot support eBPF it will > > > gracefully refuse the eBPF netlink message sent to it. > > > Thus, there is no harm even if there is no eBPF support available for arm32. > > > > OK. But, To enable grace full refuse, we should not any random system call > > number like #define __NR_bpf 386. > > It should at least unused for arm32. > > > > For arm - system call 386 seems to be used only for eBPF > http://elixir.free-electrons.com/linux/v4.15/source/arch/arm64/include/asm/unistd32.h#L796 > > > > > > > > You should enable TAP compilation for cases where you only need TAP > > without eBPF. > > > > Yes. It would have been better if new eBPF depended features would have > > under conditional compilation flag so it it can be turned off selectively. > > > > I am in favor of keeping configuration as simple as possible if possible. > I will issue a PR which includes arm BPF definition OK. Looks like systemd is using the similar method. https://github.com/systemd/systemd/blob/master/src/basic/missing_syscall.h#L334