DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Qi Zhang" <qi.z.zhang@intel.com>,
	dev@dpdk.org, "Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"Björn Töpel" <bjorn.topel@intel.com>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>
Subject: Re: [dpdk-dev] [RFC v2 6/7] net/af_xdp: load BPF file
Date: Wed, 9 May 2018 09:02:22 +0200	[thread overview]
Message-ID: <CAJ+HfNg_dfu8PXAV=KL+PJwXzx0r2PTxVhSratZsgg_8HxBSBg@mail.gmail.com> (raw)
In-Reply-To: <20180308151500.2365b677@xeon-e3>

2018-03-09 0:15 GMT+01:00 Stephen Hemminger <stephen@networkplumber.org>:
> On Thu,  8 Mar 2018 21:52:48 +0800
> Qi Zhang <qi.z.zhang@intel.com> wrote:
>
>> +struct bpf_insn prog[] = {
>> +     {
>> +             .code = 0x85, //call imm
>> +             .dst_reg = 0,
>> +             .src_reg = 0,
>> +             .off = 0,
>> +             .imm = BPF_FUNC_xdpsk_redirect,
>> +     },
>> +     {
>> +             .code = 0x95, //exit
>> +             .dst_reg = 0,
>> +             .src_reg = 0,
>> +             .off = 0,
>> +             .imm = 0,
>> +     },
>> +};
>> +
>> +int load_bpf_file(void)
>> +{
>> +     int fd;
>> +
>> +     fd = bpf_load_program(BPF_PROG_TYPE_XDP, prog,
>> +                           ARRAY_SIZE(prog),
>> +                           "GPL", 0,
>> +                           bpf_log_buf, BPF_LOG_BUF_SIZE);
>
> Still have license conflict here. The short bpf program is in BSD code and therefore
> is BSD, not GPL. But kernel won't let you load non-GPL programs.
>

Raising a dead thread! Loading a bpf program that's *not* gpl is not
an issue. The only think to keep in mind is that some bpf helpers are
gpl only -- still -- loading non-gpl bpf code is perfectly ok. So, the
issue here is that bpf_load_program passes "GPL" and therefore making
the program gpl.


Björn

> Please check with Intel open source compliance to find a GPL solution.
>
> A possible license safe solution is more complex. You need to provide original program
> source for the BPF program under dual clause (GPL-2/BSD-3); then read in that object
> file and load it.  A user wishing to exercise their GPL rights can then take your
> source file and modify and create new file to load.
>
> Doing this also creates additional GPL issues for appliance vendors using AF_XDP.
> They need to make available the source of all these XDP BPF programs.
>
> Complying with mixed licenses is hard.

  reply	other threads:[~2018-05-09  7:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 13:52 [dpdk-dev] [RFC v2 0/7] PMD driver for AF_XDP Qi Zhang
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 1/7] net/af_xdp: new PMD driver Qi Zhang
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 2/7] lib/mbuf: enable parse flags when create mempool Qi Zhang
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 3/7] lib/mempool: allow page size aligned mempool Qi Zhang
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 4/7] net/af_xdp: use mbuf mempool for buffer management Qi Zhang
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 5/7] net/af_xdp: enable share mempool Qi Zhang
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 6/7] net/af_xdp: load BPF file Qi Zhang
2018-03-08 14:20   ` Zhang, Qi Z
2018-03-08 23:15   ` Stephen Hemminger
2018-05-09  7:02     ` Björn Töpel [this message]
2018-03-08 13:52 ` [dpdk-dev] [RFC v2 7/7] app/testpmd: enable parameter for mempool flags Qi Zhang

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='CAJ+HfNg_dfu8PXAV=KL+PJwXzx0r2PTxVhSratZsgg_8HxBSBg@mail.gmail.com' \
    --to=bjorn.topel@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=brouer@redhat.com \
    --cc=dev@dpdk.org \
    --cc=magnus.karlsson@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stephen@networkplumber.org \
    /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).