DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ophir Munk <ophirmu@mellanox.com>
To: Pascal Mazon <pascal.mazon@6wind.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Olga Shern <olgas@mellanox.com>
Subject: Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
Date: Wed, 13 Dec 2017 09:58:18 +0000	[thread overview]
Message-ID: <DB5PR05MB1254251D3AAFE546840D45D8D1350@DB5PR05MB1254.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <8254049b-9661-3048-756c-b0b1d738885a@6wind.com>

Any eBPF program must be GPL compatible to use GPL-ed functions.

Please see kernel code snippet http://elixir.free-electrons.com/linux/latest/source/kernel/bpf/syscall.c 

/* eBPF programs must be GPL compatible to use GPL-ed functions */
	is_gpl = license_is_gpl_compatible(license);

where you can find in http://elixir.free-electrons.com/linux/latest/source/include/linux/license.h#L4 the implementation of licensing checking:

static inline int license_is_gpl_compatible(const char *license)
{
	return (strcmp(license, "GPL") == 0
		|| strcmp(license, "GPL v2") == 0
		|| strcmp(license, "GPL and additional rights") == 0
		|| strcmp(license, "Dual BSD/GPL") == 0
		|| strcmp(license, "Dual MIT/GPL") == 0
		|| strcmp(license, "Dual MPL/GPL") == 0);
}

Calling BPF system call to download an eBPF program will require using any one of the GPL strings listed above.

Is "Dual BSD/GPL" acceptable?

Please advise.

> -----Original Message-----
> From: Pascal Mazon [mailto:pascal.mazon@6wind.com]
> Sent: Tuesday, December 05, 2017 9:59 AM
> To: Thomas Monjalon <thomas@monjalon.net>; Stephen Hemminger
> <stephen@networkplumber.org>
> Cc: dev@dpdk.org; Ophir Munk <ophirmu@mellanox.com>; Olga Shern
> <olgas@mellanox.com>
> Subject: Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
> 
> Indeed, the spirit of the initial work was to publish source code, compiled
> BPF bytecode, and Makefile for re-generating the latter.
> I have no clue regarding licensing, I'll trust you guys on that.
> 
> On 30/11/2017 18:39, Thomas Monjalon wrote:
> > 30/11/2017 18:20, Stephen Hemminger:
> >> On Thu, 30 Nov 2017 18:05:22 +0100
> >> Thomas Monjalon <thomas@monjalon.net> wrote:
> >>
> >>> 30/11/2017 17:54, Stephen Hemminger:
> >>>> Loading BPF is a could solution to doing dynamic flow matching.
> >>>> It needs to be done differently to be accepted.
> >>>>
> >>>> Putting raw machine instructions in source code is as bad as binary
> >>>> blobs. You need to provide original source of program and then have
> >>>> build instructions to create any needed code.
> >>> The source program is provided in this patch: tap_bpf_program.c It
> >>> is pre-compiled to avoid requiring too many dependencies when building
> DPDK.
> >> But the "freedom to modify" comes into play here. If a *evil* vendor
> >> builds an application based on DPDK and does not provide source. Then
> >> user still deserves the right to modify the eBPF program that it
> >> loads as GPL.  The best solution is to make the TAP PMD loader routine
> load the program from a file.
> >> Although I am certainly not a FSF legal scholar, putting GPL'd object
> >> code in TAP PMD risks accusations of being a derived or combined work.
> > Good point.
> > The compiled BPF may be provided as a plugin file.
> > So we would be free to not package this GPL file.


  reply	other threads:[~2017-12-13  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  8:01 [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Ophir Munk
2017-11-30  8:01 ` [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions Ophir Munk
2017-11-30 16:54   ` Stephen Hemminger
2017-11-30 17:05     ` Thomas Monjalon
2017-11-30 17:20       ` Stephen Hemminger
2017-11-30 17:39         ` Thomas Monjalon
2017-12-05  7:59           ` Pascal Mazon
2017-12-13  9:58             ` Ophir Munk [this message]
2017-11-30 16:47 ` [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Stephen Hemminger
2017-11-30 16:54   ` Thomas Monjalon
2017-12-05  7:53 ` Pascal Mazon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB5PR05MB1254251D3AAFE546840D45D8D1350@DB5PR05MB1254.eurprd05.prod.outlook.com \
    --to=ophirmu@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=olgas@mellanox.com \
    --cc=pascal.mazon@6wind.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).