From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table Date: Mon, 7 May 2018 08:26:47 -0600 Message-ID: <4f3037fb-cf76-784f-bc7c-55e6e69104e9@gmail.com> References: <20180504025432.23451-1-dsahern@gmail.com> <20180504025432.23451-9-dsahern@gmail.com> <20180507153552.5063a4b2@redhat.com> <247aa1c4-e860-db72-fbb4-9da6c3a3f84c@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, borkmann@iogearbox.net, ast@kernel.org, davem@davemloft.net, shm@cumulusnetworks.com, roopa@cumulusnetworks.com, toke@toke.dk, john.fastabend@gmail.com To: Daniel Borkmann , Jesper Dangaard Brouer Return-path: Received: from mail-io0-f193.google.com ([209.85.223.193]:46077 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361AbeEGO0u (ORCPT ); Mon, 7 May 2018 10:26:50 -0400 Received: by mail-io0-f193.google.com with SMTP id c9-v6so27615553iob.12 for ; Mon, 07 May 2018 07:26:50 -0700 (PDT) In-Reply-To: <247aa1c4-e860-db72-fbb4-9da6c3a3f84c@iogearbox.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 5/7/18 8:10 AM, Daniel Borkmann wrote: > On 05/07/2018 03:35 PM, Jesper Dangaard Brouer wrote: >> On Thu, 3 May 2018 19:54:31 -0700 David Ahern wrote: >> >>> diff --git a/net/core/filter.c b/net/core/filter.c >>> index 6877426c23a6..cf0d27acf1d1 100644 >>> --- a/net/core/filter.c >>> +++ b/net/core/filter.c >> [...] >>> +static const struct bpf_func_proto bpf_xdp_fib_lookup_proto = { >>> + .func = bpf_xdp_fib_lookup, >>> + .gpl_only = true, >> >> Is it a deliberate choice to require BPF-progs using this helper to be >> GPL licensed? >> >> Asking as this seems to be the first network related helper with this >> requirement, while this is typical for tracing related helpers. > > Good point, we should remove that. In networking it's only the perf event > output helpers tying into tracing bits. After all, if you do a route lookup > via netlink from user space there's no such restriction at all. > Networking symbols are typically exported GPL for modules. The person writing the code and exporting GPL is specifying a desire that only GPL licensed modules can link to the symbol. Given the common analogy of modules and bpf programs, why can't a writer of a bpf helper specify a preference that only GPL licensed programs leverage a BPF helper?