From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by dpdk.org (Postfix) with ESMTP id 7655C1C0B for ; Wed, 9 May 2018 09:02:23 +0200 (CEST) Received: by mail-qt0-f194.google.com with SMTP id q13-v6so43572076qtp.4 for ; Wed, 09 May 2018 00:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bG0j2XqvHCKZEetjsQCRwuMtoot29sl9uGdgXvk0jxk=; b=UhqqTf+g9/o85jO9bIKGyWwQWh2qtd5eU/pdL1veHXBm65LxAI66g7kpjHkMP/SUp5 m5kZI60sRhCNODC7fadmCHF0IsBSPUrKIC/FOWl5wT/y7xE1Ek505tZpS5XE9evWFrfp q2fvFtGC6r/hc95PqVfJokHioCmcLubh6V1YwGnN3P68h7caihJ6Eja3zBooXA9czhM6 ZFXJ9oDzSKMoCbyXqkQo5VVbUoHjkJukcaUTQvhQD6Vb41ZCJGVMO92IVPUm3wR3ggo0 LC5vLzea/M3//+ErsG3JeOgVDUiiHqaXcEK1IvvktBjMrwMZvtxmBF9cLQZfaT5R5Qql AUoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bG0j2XqvHCKZEetjsQCRwuMtoot29sl9uGdgXvk0jxk=; b=hZjumcT7H3ttpZeK7DoB0mo3ivhUFO+4xtXx/sTMPHFSlYMesVfHvopXjCSCV1SyaN 5tpZZIbNBh/hcYatB0yrcaLhW5uE3q42BwuDXTQnk/kxw1ez8Zbjamq+TFcAlgXEbYir ut038/+IwY1wKLZBLydAVaMv/KO7bkbWvvEOna0HZzuM4NU5MIQPfIIg+BeiuBVrjLpA 6Q/M3SLaHDQMNvct6Mbas6AOZQLowiiucxoaKjTf1SeWTek8kAwIxFTYBjlxNgMrQvLg +kIIvf/Xi6UUtejjLdwinqnlW4rgw5msH6UP8WHRfPnciRsfVQi0OAej1jHiwqPo3QRK 7imw== X-Gm-Message-State: ALQs6tB/v3grQEkyJ88NJJd2nlridxuhluvft1JpWV9xFQ9H5I6yMzUX aCY9R1OsD5jpSvaCCoTKH4aVp93h7Xn6vSxXssQ= X-Google-Smtp-Source: AB8JxZobWfNSJbuyp6KBor2cROyTuxeI1gyXvAaoEHdbOb7XUHe/JsmttfYRBS0yTnEjczUUslwm+ih8gTNbJoA0X5s= X-Received: by 2002:aed:3245:: with SMTP id y63-v6mr38881296qtd.7.1525849342754; Wed, 09 May 2018 00:02:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.49.26 with HTTP; Wed, 9 May 2018 00:02:22 -0700 (PDT) In-Reply-To: <20180308151500.2365b677@xeon-e3> References: <20180308135249.28187-1-qi.z.zhang@intel.com> <20180308135249.28187-7-qi.z.zhang@intel.com> <20180308151500.2365b677@xeon-e3> From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Date: Wed, 9 May 2018 09:02:22 +0200 Message-ID: To: Stephen Hemminger Cc: Qi Zhang , dev@dpdk.org, "Karlsson, Magnus" , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Jesper Dangaard Brouer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [RFC v2 6/7] net/af_xdp: load BPF file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 07:02:23 -0000 2018-03-09 0:15 GMT+01:00 Stephen Hemminger : > On Thu, 8 Mar 2018 21:52:48 +0800 > Qi Zhang wrote: > >> +struct bpf_insn prog[] =3D { >> + { >> + .code =3D 0x85, //call imm >> + .dst_reg =3D 0, >> + .src_reg =3D 0, >> + .off =3D 0, >> + .imm =3D BPF_FUNC_xdpsk_redirect, >> + }, >> + { >> + .code =3D 0x95, //exit >> + .dst_reg =3D 0, >> + .src_reg =3D 0, >> + .off =3D 0, >> + .imm =3D 0, >> + }, >> +}; >> + >> +int load_bpf_file(void) >> +{ >> + int fd; >> + >> + fd =3D 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 an= d 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=C3=B6rn > Please check with Intel open source compliance to find a GPL solution. > > A possible license safe solution is more complex. You need to provide ori= ginal 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 t= ake 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.